Skip to content

MCP Server Auth Template for Grok

io.github.brunovicco/mcp-server-auth-template

OAuth 2.1/OIDC resource-server reference for secure MCP authorization

client:Grok transport:stdio runtime:oci

Install MCP Server Auth Template in Grok

.mcp.json (in your project root)

Held in this page only — never stored, logged, or sent anywhere but back to your screen.

{
  "mcpServers": {
    "mcp-server-auth-template": {
      "type": "stdio",
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "ghcr.io/brunovicco/mcp-server-auth-template:v0.7.0"
      ],
      "env": {
        "MCP_SERVER_RESOURCE_SERVER_URL": "<MCP_SERVER_RESOURCE_SERVER_URL>",
        "MCP_SERVER_AUTH_PROVIDER": "<MCP_SERVER_AUTH_PROVIDER>",
        "MCP_SERVER_REQUIRED_SCOPES": "<MCP_SERVER_REQUIRED_SCOPES>",
        "MCP_SERVER_TRANSPORT_ALLOWED_HOSTS": "<MCP_SERVER_TRANSPORT_ALLOWED_HOSTS>",
        "MCP_SERVER_ENTRA_TENANT_ID": "<MCP_SERVER_ENTRA_TENANT_ID>",
        "MCP_SERVER_ENTRA_AUDIENCE": "<MCP_SERVER_ENTRA_AUDIENCE>",
        "MCP_SERVER_ENTRA_APPLICATION_ID_URI": "<MCP_SERVER_ENTRA_APPLICATION_ID_URI>",
        "MCP_SERVER_GENERIC_ISSUER_URL": "<MCP_SERVER_GENERIC_ISSUER_URL>",
        "MCP_SERVER_GENERIC_AUDIENCE": "<MCP_SERVER_GENERIC_AUDIENCE>",
        "MCP_SERVER_GENERIC_JWKS_ALLOWED_ORIGINS": "<MCP_SERVER_GENERIC_JWKS_ALLOWED_ORIGINS>"
      }
    }
  }
}

Grok Build reads Claude Code's .mcp.json and Claude Desktop's config unchanged, so a server you have already set up there needs nothing new. The Grok web app and X integration do not take custom servers. Grok docs

MCP Server Auth Template in other clients