Connections developer guide
Last updated June 18, 2026
Memlane exposes your library to AI assistants through the
Model Context Protocol (MCP)
and a /v1 REST API. Two authentication paths:
- Remote MCP (OAuth): ChatGPT, Claude Desktop, Claude on the web, and other hosts that connect to a URL.
- Local MCP (API key): Cursor, VS Code, Windsurf, Claude Code, and other apps that run
npx @memlane/mcpon your machine.
Create and revoke keys in the app: Manage → Connections.
Remote MCP (OAuth)
Use when your AI app offers a custom connector or
remote MCP server field, not a local npx command.
Endpoint: https://api.memlane.io/mcp
- Add a new MCP connector and paste the URL above.
-
Sign in to Memlane (magic link). Consent screen:
app.memlane.io/oauth/mcp. -
Approve access. Token scopes:
read,write,capture. - Tools load in the host app.
OAuth discovery (RFC 9728 / 8414) is served by the Worker
(/.well-known/oauth-protected-resource, token/authorize/register endpoints).
Disconnect by removing the connector in the host app.
ChatGPT
- Settings → Connectors (or Apps & Connectors).
- Add a custom connector / MCP server.
- URL:
https://api.memlane.io/mcp - Complete Memlane OAuth when redirected.
Claude (Desktop, web, mobile)
Claude Desktop, Claude on the web, and Claude mobile all support custom connectors with remote MCP + OAuth, same endpoint as ChatGPT.
- Settings → Connectors → Add custom connector.
- URL:
https://api.memlane.io/mcp - Click Add, then Connect and complete Memlane OAuth.
No API key or claude_desktop_config.json needed. If tools fail to reload,
remove and re-add the connector.
Local MCP (API key)
Package: @memlane/mcp.
Requires Node.js 18+ and an API key from Manage → Connections.
{
"mcpServers": {
"memlane": {
"command": "npx",
"args": ["-y", "@memlane/mcp"],
"env": {
"MEMLANE_API_KEY": "ml_live_…"
}
}
}
} | Variable | Required | Default |
|---|---|---|
MEMLANE_API_KEY | Yes | n/a |
MEMLANE_API_URL | No | https://api.memlane.io |
After npm install -g @memlane/mcp, use
"command": "memlane-mcp" instead of npx.
Restart the host after editing config.
Cursor
- Cursor Settings → MCP, or
.cursor/mcp.json in your project. - Paste the
mcpServers block above with your API key. - Restart Cursor or reload MCP servers.
Claude Code
CLI: local stdio MCP with an API key.
claude mcp add memlane -- npx -y @memlane/mcp -e MEMLANE_API_KEY=ml_live_…
VS Code + Copilot
Root key is "servers" (not mcpServers):
{
"servers": {
"memlane": {
"command": "npx",
"args": ["-y", "@memlane/mcp"],
"env": {
"MEMLANE_API_KEY": "ml_live_…"
}
}
}
}
Save as .vscode/mcp.json. Enable "chat.mcp.enabled": true.
Other MCP hosts
Host Config location Windsurf ~/.codeium/windsurf/mcp_config.json Gemini CLI ~/.gemini/settings.json Claude Code claude mcp add (stdio)
Local and remote setups expose the same tools; only auth differs.
Available tools
Tool Description search_savesSemantic search over your library list_savesBrowse saves (project, topic, kind, status filters) get_saveMetadata; optional full markdown body capture_urlSave a URL (background enrich pipeline) create_note / update_noteCreate or edit markdown notes list_projects / list_topicsList projects and topics add_topic_to_save / remove_topic_from_saveTag or untag a save
REST API
Base: https://api.memlane.io/v1/* with
Authorization: Bearer ml_live_….
Scopes: read, write, capture.
Method Path Scope Description GET /v1/itemsread List saves GET /v1/items/:idread Metadata + topics GET /v1/items/:id/contentread Markdown body POST /v1/searchread Semantic search POST /v1/capturecapture Save a URL POST /v1/noteswrite Create note PATCH /v1/notes/:idwrite Update note DELETE /v1/items/:idwrite Delete save GET /v1/projectsread List projects GET /v1/topicsread List topics POST /v1/items/:id/topicswrite Attach topic DELETE /v1/items/:id/topicswrite Remove topic
Supabase JWT (browser session) also works on /v1/* for the web app.
Repo reference: docs/AI_ACCESS.md.
Security & limits
- API keys: secrets; never commit to git. Revoke at
Manage → Connections → API keys.
- OAuth: revoke by removing the connector in the host app.
- Remote MCP limits: 500 searches and 100 captures per user per day (KV).
- Capture cost: each
capture_url runs the full enrich pipeline
(fetch, summarize, embed).
Questions: hello@memlane.io.