# Google Gemini CLI MCP Authentication Issue

**URL:** <https://community.directus.com/t/google-gemini-cli-mcp-authentication-issue/1534>\
**Category:** Help\
**Tags:** authentication, mcp\
**Created:** [November 18, 2025, 1:11am UTC](https://community.directus.com/t/google-gemini-cli-mcp-authentication-issue/1534 "2025-11-18T01:11:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![developer](https://sea2.discourse-cdn.com/flex002/user_avatar/community.directus.com/developer/32/1103_2.png) [@developer](https://community.directus.com/u/developer)\
**Post date:** [November 18, 2025, 1:11am UTC](https://community.directus.com/t/google-gemini-cli-mcp-authentication-issue/1534/1 "2025-11-18T01:11:00Z")

</div>

```
 "directus": {

  "type": "http",

  "httpUrl": "https://xx.xx/mcp",

  "headers": {

    "Authorization": " **token**",

    "Content-Type": "application/json"

  }

}

```

Hi, I installed directus into my gcp server with in docker nginx reverse proxy.

I also implement gemini cli inside of server trying to connection of mcp server

but it says

✕ Error during discovery for server ‘directus’: Connection failed for ‘directus’: Error POSTing to endpoint  
(HTTP 403): {“errors”:[{“message”:“You don’t have permission to access  
this.”,“extensions”:{“code”:“FORBIDDEN”}}]}

can someone help me ? I’m sorry for my bad england (:

 ![Screenshot_1](https://us1.discourse-cdn.com/flex002/uploads/directus/original/2X/4/4e736edd67c0ca34932da46d4fb46b05d58613d2.png)

---

<div class="post-metadata">

**Author:** ![bryantgillespie](https://sea2.discourse-cdn.com/flex002/user_avatar/community.directus.com/bryantgillespie/32/33_2.png) [@bryantgillespie](https://community.directus.com/u/bryantgillespie)\
**Post date:** [November 18, 2025, 2:59pm UTC](https://community.directus.com/t/google-gemini-cli-mcp-authentication-issue/1534/2 "2025-11-18T14:59:50Z")

</div>

I think you’d probably need to add Bearer before the token like this

```auto
  "type": "http",
  "httpUrl": "https://xx.xx/mcp",
  "headers": {
    "Authorization": "Bearer **token**",
    "Content-Type": "application/json"
  }
}

```

I’m not a Gemini CLI user but I downloaded it to test this.

I was also able to connect using this configuration in my user root `~/.gemini/settings.json`.

```auto
{
  "security": {
    "auth": {
      "selectedType": "oauth-personal"
    }
  },
  "mcpServers": {
    "directus": {
      "httpUrl": "http://localhost:8055/mcp?access_token=my_access_token"
    }
  }
}

```
