MCP setup
The Layer MCP server is available at https://mcp.app.layer.ai/mcp over Streamable HTTP. Most clients connect with OAuth — you log in with your Layer account the first time the client uses Layer. Find your client below.
Authenticate with a token instead
Section titled “Authenticate with a token instead”If a client doesn’t support OAuth (or you prefer a static credential), authenticate with a Personal Access Token. Generate one at User Settings → New Token (it starts with pat_), then add an Authorization header to the client’s config:
- CLI flag:
--header "Authorization: Bearer YOUR_PAT" - JSON config:
"headers": { "Authorization": "Bearer YOUR_PAT" }
Connect your client
Section titled “Connect your client”Claude.ai / Claude Desktop
Section titled “Claude.ai / Claude Desktop”The simplest way is to add Layer as a custom connector through the UI — no config files or Node.js required.
- Pro / Max (single seat): Open Settings > Connectors, click + Add custom connector, enter
https://mcp.app.layer.ai/mcp, and click Add. - Team / Enterprise: Only an Owner can add a connector for the organization, via Organization settings > Connectors > Add > Custom > Web. Members then authenticate individually under Settings > Connectors.
OAuth triggers on first use — log in with your Layer account when prompted.
Older clients: add Layer with a local config file
If your version doesn’t support custom connectors, add Layer as a local server via mcp-remote (requires Node.js). In Settings > Developer > MCP Servers, add this config:
{ "mcpServers": { "Layer": { "command": "npx", "args": ["-y", "mcp-remote", "https://mcp.app.layer.ai/mcp"] } }}mcp-remote is installed automatically via npx.
Claude Code (CLI)
Section titled “Claude Code (CLI)”Add the server, then authenticate from the /mcp panel:
claude mcp add --transport http Layer https://mcp.app.layer.ai/mcpLaunch Claude Code, run /mcp, select Layer, and choose Authenticate — log in with your Layer account in the browser window that opens.
Run this command, or add it to ~/.codex/config.toml manually:
codex mcp add layer -- npx -y mcp-remote@latest https://mcp.app.layer.ai/mcpOAuth triggers on first use.
Cursor
Section titled “Cursor”Or add it manually in Settings > Features > MCP: click + Add New MCP Server, choose Streamable HTTP, name it Layer, and use the URL https://mcp.app.layer.ai/mcp. OAuth triggers automatically — log in when prompted.
Windsurf
Section titled “Windsurf”Open the Command Palette (Cmd + Shift + P), search for MCP: Add Server, and select HTTP — or add this to ~/.codeium/windsurf/mcp_config.json:
{ "mcpServers": { "Layer": { "serverUrl": "https://mcp.app.layer.ai/mcp" } }}The OAuth flow triggers automatically. Verify it works by asking: “What can I do with Layer?”
VS Code
Section titled “VS Code”Or manually add this to .vscode/mcp.json:
{ "servers": { "Layer": { "type": "http", "url": "https://mcp.app.layer.ai/mcp" } }}OAuth triggers on first use — log in with your Layer account when prompted.
Gemini CLI
Section titled “Gemini CLI”Run this command, or add it to ~/.gemini/settings.json manually:
gemini mcp add --transport http Layer https://mcp.app.layer.ai/mcpOAuth triggers on first use.
Run this command — Amp authenticates via Dynamic Client Registration:
amp mcp add layer https://mcp.app.layer.ai/mcpOpenCode
Section titled “OpenCode”Edit ~/.config/opencode/opencode.json:
{ "mcp": { "Layer": { "type": "remote", "url": "https://mcp.app.layer.ai/mcp" } }}OAuth triggers automatically on first use — log in with your Layer account when prompted.
In Settings > AI > Manage MCP servers > + Add > CLI Server, enter this command:
npx -y mcp-remote@latest https://mcp.app.layer.ai/mcpOAuth triggers on first use.
Zed only supports stdio transport — use mcp-remote as a bridge. Add this to ~/.config/zed/settings.json:
{ "context_servers": { "Layer": { "command": "npx", "args": ["-y", "mcp-remote", "https://mcp.app.layer.ai/mcp"] } }}OAuth triggers automatically on first use — log in with your Layer account when prompted.
OpenClaw
Section titled “OpenClaw”Add Layer with the OpenClaw CLI:
openclaw mcp set layer '{ "transport": "streamable-http", "url": "https://mcp.app.layer.ai/mcp"}'OAuth triggers on first use — sign in with your Layer account when prompted.
Hermes
Section titled “Hermes”Paste this into ~/.hermes/config.yaml:
mcp_servers: layer: url: "https://mcp.app.layer.ai/mcp"Sign in with your Layer account when Hermes asks you.
Manus doesn’t have a built-in OAuth flow — connect with a Personal Access Token. In Manus, go to Personalization > Connectors > Add connector > Custom MCP > Import by JSON and paste:
{ "mcpServers": { "Layer": { "type": "streamableHttp", "url": "https://mcp.app.layer.ai/mcp", "headers": { "Authorization": "Bearer YOUR_PAT" } } }}Replace YOUR_PAT with your token and click Save.
Other clients
Section titled “Other clients”Any MCP client that can launch a command can connect through the mcp-remote bridge (requires Node.js):
{ "mcpServers": { "Layer": { "command": "npx", "args": ["-y", "mcp-remote", "https://mcp.app.layer.ai/mcp"] } }}Add "--header", "Authorization: Bearer YOUR_PAT" to args to use a token instead of OAuth.
Troubleshooting
Section titled “Troubleshooting”Layer doesn’t appear in my Connectors list (Claude) On a personal Pro / Max account, add it yourself under Settings > Connectors > + Add custom connector. On Team / Enterprise, an Owner must add it org-wide first (Organization settings > Connectors) — after that, authenticate it individually under Settings > Connectors.
Authorization fails or times out Make sure you have an active Layer account at layer.ai. If you’re behind a VPN or corporate firewall, the OAuth redirect may be blocked — try on a direct connection.
Agent doesn’t seem to use Layer tools Start a new conversation after connecting — existing conversations may not pick up new MCP servers. Check that the connector status shows as connected.
Claude Code: “unknown transport” error
Try --transport sse instead of --transport http — the correct flag depends on your Claude Code version.
Codex: MCP server not loading
Make sure mcp-remote is installed correctly. Try running npx -y mcp-remote@latest to verify. If using a token, ensure your Authorization header is set correctly and restart Codex.
Cursor / VS Code / Windsurf: connection fails
Verify the MCP server URL is exactly https://mcp.app.layer.ai/mcp. If using a token, check that the Authorization header value starts with Bearer (with a space) followed by your token.
Manus: tools not working
Verify that your Personal Access Token is valid and the Authorization header value starts with Bearer (with a space) followed by your token. Make sure the transport type is streamableHttp in the JSON config.
Gemini CLI: authentication error
If using a token, ensure the header flag is formatted correctly: --header "Authorization: Bearer YOUR_PAT". If using OAuth, the flow should trigger automatically on first tool use.