|
| 1 | +--- |
| 2 | +id: logto-mcp-server |
| 3 | +title: Logto MCP Server |
| 4 | +sidebar_position: 7 |
| 5 | +--- |
| 6 | + |
| 7 | +# Logto MCP Server |
| 8 | + |
| 9 | +Logto MCP Server is a remote [MCP (Model Context Protocol)](https://modelcontextprotocol.io/) server. Add the URL to your AI application, sign in with your Logto Cloud account, and start talking to Logto. |
| 10 | + |
| 11 | +:::tip |
| 12 | +Logto MCP Server is built with Logto and [MCP Auth](https://mcp-auth.dev). If you want to build your own remote MCP server, see [Build your own remote MCP server](#build-your-own-remote-mcp-server). |
| 13 | +::: |
| 14 | + |
| 15 | +## What you can do |
| 16 | + |
| 17 | +- **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. |
| 18 | +- **Ask questions about Logto**: The AI searches Logto documentation and gives you answers with sources. |
| 19 | + |
| 20 | +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. |
| 21 | + |
| 22 | +## Set up in your AI application |
| 23 | + |
| 24 | +### VS Code |
| 25 | + |
| 26 | +1. Open the command palette (`Command + Shift + P`), and select **MCP: Add Server...**. |
| 27 | +2. Choose **HTTP** as the server type. |
| 28 | +3. Enter the URL: `https://mcp.logto.io`. You can choose to install it to your workspace for better isolation and management. |
| 29 | +4. When the OAuth flow starts, enter the App ID: `mcp-client`. Leave the App Secret empty and press Enter to skip. |
| 30 | +5. You will be redirected to the Logto Cloud sign-in page. Sign in with your Logto Cloud account to connect. |
| 31 | + |
| 32 | +### Cursor |
| 33 | + |
| 34 | +1. Open the command palette (`Command + Shift + P`), and select **View: Open MCP Settings**. |
| 35 | +2. In the **Installed MCP Servers** section, click the **Add Custom MCP** button. |
| 36 | +3. In the `mcp.json` file that opens, add the following configuration: |
| 37 | + |
| 38 | +```json |
| 39 | +{ |
| 40 | + "mcpServers": { |
| 41 | + "logto": { |
| 42 | + "command": "npx", |
| 43 | + "args": [ |
| 44 | + "mcp-remote", |
| 45 | + "https://mcp.logto.io", |
| 46 | + "--allow-http", |
| 47 | + "--static-oauth-client-info", |
| 48 | + "{ \"client_id\": \"mcp-client\", \"scope\": \"mcp:all\" }", |
| 49 | + "--resource", |
| 50 | + "https://mcp.logto.io/" |
| 51 | + ] |
| 52 | + } |
| 53 | + } |
| 54 | +} |
| 55 | +``` |
| 56 | + |
| 57 | +A Logto Cloud sign-in page will appear automatically. Sign in with your Logto Cloud account to connect. |
| 58 | + |
| 59 | +### Claude Desktop |
| 60 | + |
| 61 | +1. Open **Settings** from the main menu, navigate to **Connectors**, and click **Add custom connector**. |
| 62 | +2. Enter the name `Logto MCP Server` and the remote MCP server URL: `https://mcp.logto.io`. |
| 63 | +3. Expand **Advanced settings** and enter the OAuth Client ID: `mcp-client`. Click **Add**. |
| 64 | +4. In the **Connectors** list, find **Logto MCP Server** and click **Connect**. |
| 65 | +5. You will be redirected to the Logto Cloud sign-in page. Sign in and authorize to connect. |
| 66 | + |
| 67 | +### Other MCP clients |
| 68 | + |
| 69 | +Logto MCP Server works with any MCP client that supports OAuth authorization. Use the following configuration: |
| 70 | + |
| 71 | +- **MCP server URL:** `https://mcp.logto.io` |
| 72 | +- **OAuth client ID:** `mcp-client` |
| 73 | +- **Resource:** `https://mcp.logto.io/` (if your client requires it) |
| 74 | +- **Scope:** `mcp:all` (if your client requires it) |
| 75 | + |
| 76 | +If you are an AI application developer and want to support connecting to Logto MCP Server, but Logto MCP Server does not yet support your application's redirect URI, please [contact us](https://logto.io/contact) with your application details. |
| 77 | + |
| 78 | +## Build your own remote MCP server |
| 79 | + |
| 80 | +Logto MCP Server is built with Logto and [MCP Auth](https://mcp-auth.dev). If you want to build your own remote MCP server with authentication, check out the following resources: |
| 81 | + |
| 82 | +- [Remote MCP server in action: a new entry point for SaaS products in the AI era](https://blog.logto.io/remote-mcp-server-in-action) |
| 83 | +- [Join our Discord](https://discord.gg/logto): Share learnings and best practices on building remote MCP servers |
| 84 | +- [MCP Auth](https://mcp-auth.dev): Everything you need to add production-ready auth to your MCP server. No weeks spent reading specs or wiring things up. |
0 commit comments