Skip to main content

Logto MCP Server

Logto MCP Server is a remote MCP (Model Context Protocol) server. Add the URL to your AI application, sign in with your Logto Cloud account, and start talking to Logto.

tip:

Logto MCP Server is built with Logto and MCP Auth. If you want to build your own remote MCP server, see Build your own remote MCP server.

What you can do​

  • Add authentication to your project: The AI detects your framework, creates a Logto application, and generates working integration code. Supports 38+ frameworks including React, Next.js, Vue, Nuxt, SvelteKit, Express, Go, Python, iOS, Android, Flutter, and more.
  • Ask questions about Logto: The AI searches Logto documentation and gives you answers with sources.

More capabilities are coming soon, including sign-in experience configuration, RBAC and permission management with best practice guidance, multi-tenancy setup for building B2B apps with organizations, and more.

How your AI application connects​

Logto MCP Server supports two ways for an AI application to identify itself when you sign in. You don't need to create anything in Logto Cloud for either one.

  • Server URL only (recommended): Most AI applications now support client ID metadata documents (CIMD). The application uses a URL it owns as its client ID, and Logto reads the application's name and redirect URIs from that URL. You only enter the server URL https://mcp.logto.io.
  • Static client ID: For applications that don't support CIMD yet, enter the public OAuth client ID mcp-client. This client accepts loopback redirect URIs (http://localhost or http://127.0.0.1 with any port).

If your application has both options, use the server URL only. Existing connections that use mcp-client keep working, so you don't need to reconnect them.

When you connect with the server URL only, the Logto Cloud sign-in page shows a consent screen with the application's name and the host of its client ID URL, such as claude.ai or vscode.dev. Check that the host matches the application you are using before you authorize.

Set up in your AI application​

Amp​

  1. In Amp, open Personal Settings > Integrations & MCP and click Add MCP Server.
  2. Enter the name Logto MCP Server and the server URL: https://mcp.logto.io. Amp automatically detects the authentication method.
  3. Click Connect and follow Amp's prompt to sign in.
  4. Sign in with your Logto Cloud account and authorize to connect.
tip:

If Amp stays on Detecting Authentication for a long time, click Change and select OAuth to skip automatic authentication detection. Leave OAuth Client ID and OAuth Client Secret under Use Your Own OAuth App empty, then click Connect and follow the sign-in prompt. Amp supports CIMD, so you don't need to register an OAuth app or enter mcp-client.

Claude Code​

claude mcp add --transport http logto https://mcp.logto.io

Then, run /mcp in Claude Code, select logto, and follow the browser login flow to authenticate with your Logto Cloud account. You can also run claude mcp login logto in your shell.

Claude (web and desktop)​

  1. Open Customize > Connectors and click Add custom connector.
  2. Enter the name Logto MCP Server and the remote MCP server URL: https://mcp.logto.io. Leave the OAuth settings under Advanced settings empty, and click Add.
  3. In the Connectors list, find Logto MCP Server and click Connect.
  4. You will be redirected to the Logto Cloud sign-in page. Sign in with your Logto Cloud account and authorize to connect.

Connectors are saved to your Claude account, so they are available in both Claude on the web and Claude Desktop.

Codex​

codex mcp add logto --url https://mcp.logto.io
codex mcp login logto

A browser window will open. Sign in with your Logto Cloud account to connect. The ChatGPT desktop app, Codex CLI, and Codex IDE extension share this configuration.

Cursor​

Cursor doesn't support CIMD yet, so it uses the static client ID.

  1. Open Customize > MCPs, or open ~/.cursor/mcp.json (global) or .cursor/mcp.json (project).

  2. Add the following configuration:

    {
    "mcpServers": {
    "Logto": {
    "url": "https://mcp.logto.io",
    "auth": {
    "CLIENT_ID": "mcp-client",
    "scopes": ["mcp:all"]
    }
    }
    }
    }
  3. Click Connect next to the server. A Logto Cloud sign-in page will appear. Sign in with your Logto Cloud account to connect.

Sign in from the Cursor desktop app. The web callback used by Cursor on the web and Cursor Agents is not supported.

OpenCode​

  1. Add the following configuration to your opencode.json file:

    {
    "$schema": "https://opencode.ai/config.json",
    "mcp": {
    "Logto": {
    "enabled": true,
    "type": "remote",
    "url": "https://mcp.logto.io"
    }
    }
    }
  2. Run the following command to authenticate:

    opencode mcp auth Logto

    Note that Logto corresponds to the MCP server name in your configuration file.

A browser window will open. Sign in with your Logto Cloud account to authorize and connect.

VS Code​

  1. Open the command palette (Command + Shift + P), and select MCP: Add Server....
  2. Choose HTTP as the server type.
  3. Enter the URL: https://mcp.logto.io. You can choose to install it to your workspace for better isolation and management.
  4. When VS Code asks to authenticate, allow it. You will be redirected to the Logto Cloud sign-in page. Sign in with your Logto Cloud account to connect.

Alternatively, add the server to .vscode/mcp.json or your user mcp.json:

{
"servers": {
"logto": {
"type": "http",
"url": "https://mcp.logto.io"
}
}
}

Windsurf​

Windsurf doesn't document CIMD support, so use mcp-remote with the static client ID.

  1. Open the command palette (Command + Shift + P) and select Windsurf: MCP Marketplace.

  2. In the Installed MCPs section, click the settings icon on the right to open the MCP config file.

  3. Add the following configuration:

    {
    "mcpServers": {
    "Logto": {
    "command": "npx",
    "args": [
    "mcp-remote",
    "https://mcp.logto.io",
    "--allow-http",
    "--static-oauth-client-info",
    "{ \"client_id\": \"mcp-client\", \"scope\": \"mcp:all\" }",
    "--resource",
    "https://mcp.logto.io/"
    ]
    }
    }
    }

A Logto Cloud sign-in page will appear automatically. Sign in with your Logto Cloud account to connect.

Other MCP clients​

Logto MCP Server works with any MCP client that supports OAuth authorization:

  • If your client supports CIMD: Enter only the MCP server URL https://mcp.logto.io. The client discovers everything else from the server.
  • Otherwise: Use the following configuration.
    • MCP server URL: https://mcp.logto.io
    • OAuth client ID: mcp-client (no client secret)
    • Redirect URI: a loopback address, such as http://localhost:<port>/callback
    • Resource: https://mcp.logto.io/ (if your client requires it)
    • Scope: mcp:all (if your client requires it)

Logto MCP Server doesn't support Dynamic Client Registration (DCR). If you are an AI application developer, publish a client ID metadata document for your application, and it can connect without any setup in Logto. If that's not possible, contact us with your application details.

Build your own remote MCP server​

Logto MCP Server is built with Logto and MCP Auth. If you want to build your own remote MCP server with authentication, check out the following resources: