Connect AI Tools to Your Knowledge Base
Legate Studio exposes your personal knowledge library as an MCP server. Connect Claude Code, Claude Desktop, or any MCP-compatible client — no API key required. Authentication is handled automatically via OAuth 2.1 with your GitHub account.
Agent Setup
For AI agents and automated systems — this is everything you need to connect. No API key. No registration flow. Just point and authenticate.
Machine-readable instructions are available at /docs/mcp/agent-setup (markdown) and /docs/mcp/agent-setup.json (JSON). Agents can curl either endpoint to self-configure.
https://legate.studio/mcp
streamable-http
OAuth 2.1 + PKCE (GitHub SSO)
Configuration
Add this to your .mcp.json (Claude Code) or claude_desktop_config.json (Claude Desktop):
{
"mcpServers": {
"legate": {
"type": "streamable-http",
"url": "https://legate.studio/mcp"
}
}
}
That's it. No API key. No token. No environment variables.
You must restart your client after saving. MCP servers are loaded at startup. Close your current session and start a new one — the OAuth flow will trigger automatically on first connection.
What Happens Next
-
1Your MCP client discovers the OAuth server
It reads
https://legate.studio/.well-known/oauth-authorization-serverautomatically. -
2A browser opens for GitHub authorization
Log in with the GitHub account linked to your Legate Studio account.
-
3You're connected — verify with
check_connectionThe token is managed automatically. No manual credential handling required.
Verification
Tool: check_connection
Expected response:
{
"status": "ok",
"user": "<your-github-login>",
"library": "<your-github-login>",
"message": "Connected to Legate Studio"
}
Common First Steps
check_connection— verify your identity and library accesslist_categories— see your library structuresearch_library— find notes by keywordcreate_note— add a new note to your libraryget_library_stats— see your library summary
Overview
Legate Studio is a personal knowledge management platform built around an MCP-first architecture. Your notes, categories, assets, and task lists are stored in a private per-user database — and the entire library is accessible to AI tools through a standard MCP server at https://legate.studio/mcp.
Unlike services that require API tokens, Legate uses OAuth 2.1 with PKCE. When you connect an MCP client, it redirects you to a GitHub login once. After that, the token is managed automatically — no copying keys, no environment variables, no expiry headaches.
No API key needed. Authentication is handled automatically through OAuth 2.1 with GitHub SSO. Just point your MCP client at the endpoint and log in when prompted.
Prerequisites
- A Legate Studio account — sign up free at legate.studio using your GitHub account
- A GitHub account (used for authentication — Legate uses GitHub OAuth)
- An MCP-compatible client (Claude Code, Claude Desktop, Claude.ai, or other)
You must have a Legate Studio account before connecting an MCP client. The OAuth flow will authenticate you against your existing account. If you haven't signed up yet, create a free account first.
Quick Start
Select your MCP client to see setup instructions:
Claude Code Setup
Add Legate Studio to your .mcp.json file in your project root (or in ~/.claude/mcp.json for global access):
{
"mcpServers": {
"legate": {
"type": "streamable-http",
"url": "https://legate.studio/mcp"
}
}
}
-
1Add the config above to your .mcp.json
Place it in your project root (for project-scoped access) or
~/.claude/mcp.jsonfor all projects. -
2Restart your Claude Code session
MCP servers are loaded at startup. Close your current session and start a new one — Claude Code will detect Legate and prompt you to authenticate.
-
3Authorize with GitHub
A browser window opens to
legate.studio/auth. Log in with GitHub — the same account you used to create your Legate Studio account. -
4Done — your library is connected
Ask Claude to
list_categoriesorsearch_libraryto confirm the connection.
Claude Desktop Setup
Edit your Claude Desktop config file:
{
"mcpServers": {
"legate": {
"type": "streamable-http",
"url": "https://legate.studio/mcp"
}
}
}
{
"mcpServers": {
"legate": {
"type": "streamable-http",
"url": "https://legate.studio/mcp"
}
}
}
-
1Edit the config file at the path above
If the file doesn't exist, create it. If it already has
mcpServers, add thelegateentry to the existing object. -
2Restart Claude Desktop
Fully quit and relaunch — Claude Desktop reads config on startup.
-
3Authorize with GitHub when prompted
Claude Desktop will open a browser for GitHub OAuth. Log in with the account linked to your Legate Studio subscription.
Claude.ai Web Setup
Claude.ai supports MCP servers via Settings → Connectors (available on Pro and Team plans).
-
1Open Settings → Connectors
Go to claude.ai, click your avatar → Settings → Connectors.
-
2Add a new connector
Click Add connector and select Custom MCP server.
-
3Enter the endpoint URL
Set the URL to
https://legate.studio/mcp. Leave authentication settings at defaults — Legate handles OAuth automatically. -
4Authorize with GitHub
Claude.ai will redirect you to GitHub for authorization. After approving, you'll be sent back and the connector will be active.
Other MCP Clients
Any MCP client that supports Streamable HTTP transport and OAuth 2.1 can connect to Legate Studio.
streamable-http
https://legate.studio/mcp
OAuth 2.1 + PKCE
https://legate.studio/.well-known/oauth-authorization-server
Your MCP client needs to support the OAuth 2.1 authorization code flow with PKCE. The discovery endpoint above returns all OAuth metadata your client needs to initiate the flow automatically.
For agent-based automation, see the machine-readable setup instructions at /docs/mcp/agent-setup.
OAuth 2.1 Flow
Legate Studio uses OAuth 2.1 with PKCE for MCP authentication. Here's what happens when you connect:
-
1Your MCP client discovers the auth server
It fetches
https://legate.studio/.well-known/oauth-authorization-serverto get the authorization and token endpoint URLs. -
2Client generates a PKCE code challenge and redirects you to GitHub
Your browser opens the Legate authorization page, which immediately redirects to GitHub's OAuth flow.
-
3You log in with GitHub
Authorize Legate Studio to access your GitHub profile (used only to identify your account).
-
4Legate issues a token and redirects back to your client
The MCP client exchanges the authorization code for an access token. This token is stored by the client and refreshed automatically.
-
5All subsequent requests are authenticated
Your client sends the token with every MCP request. You won't be asked to log in again unless the token expires or is revoked.
Legate does not store your GitHub credentials. We receive your GitHub username and user ID from GitHub's OAuth response — that's all. Your actual GitHub tokens never touch Legate's servers.
Available Tools
Legate Studio exposes 47 MCP tools grouped into 7 categories. All tools are available on any tier. Shared library tools require a managed-tier subscription.
Verification
After connecting, verify the integration is working:
1. Check the connection
Ask your AI assistant to call check_connection. You should see a response like:
{
"status": "ok",
"user": "your-github-login",
"library": "your-github-login",
"message": "Connected to Legate Studio"
}
2. List your categories
Ask your assistant to call list_categories. This will return the top-level organization of your knowledge base. If you've just signed up, you'll see the default categories.
3. Create a test note
Try creating a note to confirm write access is working:
Create a note titled "MCP Test" in the General category with content "MCP connection verified."
Then verify it appeared in your Legate Studio library at legate.studio.
Troubleshooting
Authentication loop / can't complete OAuth
Make sure you're logged into GitHub in your browser before starting the OAuth flow. If the browser doesn't open automatically, look for a URL in your MCP client's output and open it manually.
Tools not appearing in Claude
Check that:
- The
typefield is exactly"streamable-http"(not"http"or"sse") - The URL is exactly
https://legate.studio/mcp(no trailing slash) - Your MCP client was fully restarted after editing the config
Authentication error: "User not found"
This means the GitHub account you authenticated with doesn't have a Legate Studio account. Make sure you sign up at legate.studio with the same GitHub account before connecting via MCP.
Sync errors / library out of date
Call verify_sync_state to check the sync status, then repair_sync_state to pull the latest state from GitHub. This is usually caused by a note being edited directly in GitHub between syncs.
Still having issues?
Contact support via the contact page or check the security docs for information about authentication architecture.
For autonomous agents: See the machine-readable setup instructions at /docs/mcp/agent-setup (plain text) and /docs/mcp/agent-setup.json (JSON).