Skip to content

No way to send custom headers in claude_desktop_config.json #1789

@jigarvyasidea

Description

@jigarvyasidea

Enhancement

Currently, the MCP client configuration (claude_desktop_config.json) only specifies which MCP server to run and how to connect to it.


{
  "mcpServers": {
    "jigar-mcp-server": {
      "command": "C:\\nylim\\mcp_project\\venv\\Scripts\\python.exe",
      "args": [
        "C:\\virtual_Protocol\\mcp_project\\mcp_server.py"
      ]
    }
  }
}

This works fine for starting the server, but there is no option to send custom headers or authentication tokens with the MCP client connection.

Problem:

Many real-world MCP server setups require auth headers / API keys / session IDs to validate the client.

Without a way to configure headers in the MCP client config, authentication becomes hard to implement.

Feature Request:
Add support in claude_desktop_config.json for passing custom headers (e.g., Authorization, Session-Id, User-Id).

Eg


{
  "mcpServers": {
    "Tejas-mcp-server": {
      "command": "C:\\nylim\\mcp_project\\venv\\Scripts\\python.exe",
      "args": [
        "C:\\nylim\\mcp_project\\mcp_server.py"
      ],
      "headers": {
        "Authorization": "Bearer <TOKEN>",
        "User-Id": "12345"
      }
    }
  }
}

Why important:

Enables secure authentication between MCP client and server.

Makes MCP more production-ready for enterprise and multi-user use cases.

Metadata

Metadata

Assignees

No one assigned

    Labels

    authRelated to authentication (Bearer, JWT, OAuth, WorkOS) for client or server.clientRelated to the FastMCP client SDK or client-side functionality.enhancementImprovement to existing functionality. For issues and smaller PR improvements.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions