Skip to content

Commit 87db381

Browse files
committed
docs: add Logto MCP Server documentation
1 parent 1d86b09 commit 87db381

File tree

9 files changed

+121
-2
lines changed

9 files changed

+121
-2
lines changed

docs/integrate-logto/README.mdx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ import ProtectedAppIcon from '@site/src/assets/protected-app.svg';
1010

1111
# Integrate Logto authentication
1212

13+
:::tip[Use AI to integrate (Logto Cloud)]
14+
If you're using AI-powered development tools, try [Logto MCP Server](/logto-cloud/logto-mcp-server) to integrate Logto with the help of AI. It detects your framework, creates applications, and generates working code.
15+
:::
16+
1317
Logto provides comprehensive authentication solutions for web, mobile and desktop applications, supports [Machine-to-Machine (M2M)](/quick-starts/m2m) authentication between services, and can serve as an Identity Provider (IdP) for [third-party applications](/integrate-logto/third-party-applications) through standard protocols like [OpenID Connect(OIDC)](https://auth.wiki/openid-connect) and [OAuth 2.0](https://auth.wiki/oauth-2.0).
1418

1519
Start your integration by selecting the solution that best matches your needs:

docs/introduction/README.mdx

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import LinkIcon from '@site/src/assets/link.svg';
1717
import LockIcon from '@site/src/assets/lock.svg';
1818
import LockoutIcon from '@site/src/assets/lockout.svg';
1919
import LogtoApiIcon from '@site/src/assets/logto-api.svg';
20+
import McpIcon from '@site/src/assets/mcp.svg';
2021
import OpenSourceIcon from '@site/src/assets/open-source.svg';
2122
import OrganizationIcon from '@site/src/assets/organization.svg';
2223
import ScreenIcon from '@site/src/assets/screen.svg';
@@ -203,6 +204,16 @@ Logto’s capabilities are built on four key pillars, forming the foundation for
203204
icon: <SdkIcon />,
204205
},
205206
},
207+
{
208+
type: 'link',
209+
label: 'Logto MCP Server',
210+
href: '/logto-cloud/logto-mcp-server',
211+
description:
212+
'A remote MCP server that connects AI tools and IDEs to Logto Cloud, enabling resource management and authentication integration.',
213+
customProps: {
214+
icon: <McpIcon />,
215+
},
216+
},
206217
]}
207218
/>
208219

docs/introduction/set-up-logto-cloud.mdx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,8 @@ This setup allows your project to have both development testing and production e
3535

3636
## Migrate from the existing system \{#migrate-from-the-existing-system}
3737

38-
If you’re working on an existing project and need to switch auth providers, Logto supports user migration from other platforms. You can migrate [basic data](/user-management/user-data#basic-data), [custom data](/user-management/user-data#custom-data), [social identities](/user-management/user-data#social-identities), and password hashes. For details, see the [Migrate to Logto](../user-management/user-migration.mdx) guide.
38+
If you're working on an existing project and need to switch auth providers, Logto supports user migration from other platforms. You can migrate [basic data](/user-management/user-data#basic-data), [custom data](/user-management/user-data#custom-data), [social identities](/user-management/user-data#social-identities), and password hashes. For details, see the [Migrate to Logto](../user-management/user-migration.mdx) guide.
39+
40+
## Use Logto MCP Server with AI tools \{#use-logto-mcp-server-with-ai-tools}
41+
42+
If you're using AI-powered development tools like VS Code with Copilot, Cursor, or Claude Desktop, you can connect to [Logto MCP Server](/logto-cloud/logto-mcp-server) to interact with Logto directly from your AI assistant. The AI can detect your framework, create applications, and generate working integration code for you.

docs/logto-cloud/README.mdx

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import TenantSettings from '@site/src/assets/database.svg';
22
import Developer from '@site/src/assets/developer.svg';
33
import TenantMemberManagement from '@site/src/assets/gear.svg';
44
import PricingAndBilling from '@site/src/assets/key.svg';
5+
import McpIcon from '@site/src/assets/mcp.svg';
56
import CustomDomains from '@site/src/assets/search.svg';
67
import SystemLimit from '@site/src/assets/security.svg';
78

@@ -73,5 +74,15 @@ If you have any questions about cloud services and need additional support, plea
7374
icon: <SystemLimit />,
7475
},
7576
},
77+
{
78+
type: 'link',
79+
label: 'Logto MCP Server',
80+
href: '/logto-cloud/logto-mcp-server',
81+
description:
82+
'Connect AI tools and IDEs to Logto Cloud via MCP to manage resources and integrate authentication.',
83+
customProps: {
84+
icon: <McpIcon />,
85+
},
86+
},
7687
]}
7788
/>
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
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+
## What you can do
12+
13+
- **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.
14+
- **Ask questions about Logto**: The AI searches Logto documentation and gives you answers with sources.
15+
16+
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.
17+
18+
## Set up in your AI application
19+
20+
### VS Code
21+
22+
1. Open the command palette (`Command + Shift + P`), and select **MCP: Add Server...**.
23+
2. Choose **HTTP** as the server type.
24+
3. Enter the URL: `https://mcp.logto.io`. You can choose to install it to your workspace for better isolation and management.
25+
4. When the OAuth flow starts, enter the App ID: `mcp-client`. Leave the App Secret empty and press Enter to skip.
26+
5. You will be redirected to the Logto Cloud sign-in page. Sign in with your Logto Cloud account to connect.
27+
28+
### Cursor
29+
30+
1. Open the command palette (`Command + Shift + P`), and select **View: Open MCP Settings**.
31+
2. In the **Installed MCP Servers** section, click the **Add Custom MCP** button.
32+
3. In the `mcp.json` file that opens, add the following configuration:
33+
34+
```json
35+
{
36+
"mcpServers": {
37+
"logto": {
38+
"command": "npx",
39+
"args": [
40+
"mcp-remote",
41+
"https://mcp.logto.io",
42+
"--allow-http",
43+
"--static-oauth-client-info",
44+
"{ \"client_id\": \"mcp-client\", \"scope\": \"mcp:all\" }",
45+
"--resource",
46+
"https://mcp.logto.io/"
47+
]
48+
}
49+
}
50+
}
51+
```
52+
53+
A Logto Cloud sign-in page will appear automatically. Sign in with your Logto Cloud account to connect.
54+
55+
### Claude Desktop
56+
57+
1. Open **Settings** from the main menu, navigate to **Connectors**, and click **Add custom connector**.
58+
2. Enter the name `Logto MCP Server` and the remote MCP server URL: `https://mcp.logto.io`.
59+
3. Expand **Advanced settings** and enter the OAuth Client ID: `mcp-client`. Click **Add**.
60+
4. In the **Connectors** list, find **Logto MCP Server** and click **Connect**.
61+
5. You will be redirected to the Logto Cloud sign-in page. Sign in and authorize to connect.
62+
63+
### Other MCP clients
64+
65+
Logto MCP Server works with any MCP client that supports OAuth authorization. Use the following configuration:
66+
67+
- **MCP server URL:** `https://mcp.logto.io`
68+
- **OAuth client ID:** `mcp-client`
69+
- **Resource:** `https://mcp.logto.io/` (if your client requires it)
70+
- **Scope:** `mcp:all` (if your client requires it)
71+
72+
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.

docs/logto-cloud/system-limit.mdx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
---
2+
sidebar_position: 6
3+
---
4+
15
# System limits
26

37
System limits keep Logto stable and fair for everyone. They are separate from billing.

docs/quick-starts/README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@ sidebar_label: Logto quick starts
66

77
Welcome to Logto quick starts. This documentation contains useful guides for integrating Logto into your application.
88

9-
Most of guides uses Logto official SDKs. Please don't hesitate to contact us if you have any questions.
9+
Most of guides uses Logto official SDKs. If you're using AI-powered development tools, try our [Logto MCP Server](/logto-cloud/logto-mcp-server) for AI-assisted integration.
10+
11+
Please don't hesitate to contact us if you have any questions.
1012

1113
:::info
1214
This page focuses on Logto client integration, including backend-for-frontend patterns. For server-side API protection, see [API protection](/api-protection).

docs/use-cases/ai/fragments/_configure-third-party-ai-agent.mdx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@ import QuickStartsReference from '../../../quick-starts/third-party/oidc/_quick-
44

55
To enable the third-party AI agent to access your {props.serviceName ?? 'your service'}, you need to set up a **third-party app** in Logto. This app will be used to represent the AI agent and obtain the necessary credentials for authentication and authorization.
66

7+
:::info[What is a third-party app?]
8+
A **third-party app** is an application created by external developers (not the resource owner) that needs user consent to access protected resources. Unlike first-party apps (your own applications), third-party apps will show a consent screen asking users to approve specific permissions before accessing their data. This ensures users have control over what data they share with external services.
9+
10+
To learn more, see [Third-party applications](/integrate-logto/third-party-applications).
11+
:::
12+
713
### Allow developers to create third-party apps in Logto \{#allow-developers-to-create-third-party-apps-in-logto}
814

915
If you are building a marketplace or want to allow developers to create third-party apps in Logto, you can leverage [Logto Management API](/integrate-logto/interact-with-management-api) to create third-party apps programmatically. This allows developers to register their applications and obtain the necessary credentials for authentication.

src/assets/mcp.svg

Lines changed: 5 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)