Skip to content

MCP Setup

Model Context Protocol (MCP) is the standard for connecting AI assistants to external tools. Recto’s MCP server gives your AI assistant the ability to create, search, and reflect on journal entries.

When your AI client connects, Recto automatically sends your custom instructions as part of the MCP handshake. This tells the assistant how to behave (e.g., auto-capture entries, use tools proactively) — no tool call required.

Once connected, your AI assistant can use these tools:

ToolDescription
create_entryCreate a new journal entry
get_entryRetrieve a specific entry
list_entriesList entries with optional filters
search_entriesSearch by keyword, semantic similarity, or hybrid
reflectGenerate a reflection based on past entries
add_tagsAdd tags to an entry
get_summaryGet an AI summary of recent entries
add_mediaAttach a media URL to an entry

MCP clients that support the Prompts API will automatically discover these prompt templates:

PromptDescription
daily-checkinGuided daily journal entry
weekly-reviewReflect on the past week
monthly-retrospectiveMonth-end review and goal assessment
gratitudeGratitude-focused reflection
idea-captureDevelop and refine an idea
goal-settingSet and break down goals

You can also create custom prompts via the REST API or the web dashboard’s Settings page. See Instructions & Prompts for details.

Recto’s MCP server uses Streamable HTTP transport. There are two authentication methods:

  • API key — pass your RECTO_API_KEY as a Bearer token (simplest setup)
  • OAuth 2.1 — the client handles authorization automatically (required by Claude Desktop)

Most MCP clients accept a URL and custom headers. Pass your API key as a Bearer token in the Authorization header.

The general pattern:

{
"mcpServers": {
"recto": {
"url": "https://<your-domain>/mcp",
"headers": {
"Authorization": "Bearer your-api-key"
}
}
}
}

Client-specific notes:

ClientConfig field for URLAuth methodsConfig location
CursorurlAPI key.cursor/mcp.json or global settings
Claude CodeCLI flagAPI key, OAuthclaude mcp add recto --transport http https://<your-domain>/mcp
Claude DesktopurlOAuth~/Library/Application Support/Claude/claude_desktop_config.json
AntigravityserverUrlAPI key, OAuthMCP settings JSON

Example for Cursor (.cursor/mcp.json):

{
"mcpServers": {
"recto": {
"url": "https://your-domain.com/mcp",
"headers": {
"Authorization": "Bearer your-api-key"
}
}
}
}

Example for Antigravity (API key):

{
"mcpServers": {
"recto": {
"serverUrl": "https://your-domain.com/mcp",
"headers": {
"Authorization": "Bearer your-api-key"
}
}
}
}

Several MCP clients support OAuth 2.1 with PKCE, so you don’t need to configure tokens manually — the client handles the OAuth flow automatically. When connecting, the client opens a browser where you enter your RECTO_API_KEY to authorize.

Add Recto to your config (~/Library/Application Support/Claude/claude_desktop_config.json on macOS):

{
"mcpServers": {
"recto": {
"url": "https://your-domain.com/mcp"
}
}
}

Just provide the URL — no headers needed:

Terminal window
claude mcp add recto --transport http https://your-domain.com/mcp

Claude Code will automatically discover the OAuth endpoints and open a browser for authorization.

Only the serverUrl is needed — no headers:

{
"mcpServers": {
"recto": {
"serverUrl": "https://your-domain.com/mcp"
}
}
}

Antigravity will prompt you to open the browser for OAuth authorization.

When a client connects without a Bearer token, Recto’s OAuth flow kicks in:

  1. The client discovers OAuth endpoints at /.well-known/oauth-authorization-server
  2. A consent screen opens in your browser
  3. You enter your RECTO_API_KEY to authorize
  4. The client exchanges the authorization for access and refresh tokens

Confirm the MCP server is running:

Terminal window
curl http://localhost:3001/health

You should see {"status":"ok"}.

After configuring, test by asking your AI assistant:

“Create a journal entry about setting up Recto for the first time.”

If the entry is created successfully, you’re all set. Check the web dashboard at https://localhost to see it.