Skip to main content

MCP For AI Agents

MCP (Model Context Protocol) lets AI tools search Synth Project knowledge and read exact pages before they answer or edit. Synth exposes a Streamable HTTP MCP server on your licensed deployment:

https://synth.example.com/api/mcp/

Best Workflow​

For a question:

Use Synth project docs to answer with citations: what should I read before changing authentication?

The AI tool should call:

  1. synth_list_projects if the project is unclear
  2. synth_search with a focused query
  3. Inspect several ranked excerpts and refine the query when needed
  4. synth_get_page with the returned page ID, snapshot, and revision for exact details
  5. Call synth_status when a read is unavailable or readiness needs inspection
  6. Reason over the evidence and cite its page paths

A snapshot and page revision identify exactly which sealed evidence the agent read. Watcher synchronization health is operational state and is not part of the public knowledge-read response contract.

For coding or writing work:

Use Synth to brief this task before editing: fix users getting logged out after token refresh.

The AI tool should call synth_search, inspect multiple relevant results, and use synth_get_page when an excerpt is insufficient. Synth retrieves pages; the connected agent performs the reasoning.

Create A Key​

Use onboarding, Settings -> Connect, or curl after setup or login has saved a session cookie.

  1. Open Settings and stay in the current project context.
The Synth Settings navigation showing Overview, API Keys, and Connect tabs.
Use the Settings navigation to move between API Keys and Connect without changing projects.
  1. Choose Connect and confirm the MCP server URL.
The Synth Connect tab showing the MCP server URL and supported AI tool cards.
The Connect tab shows the local MCP endpoint and client-specific setup cards before any key is created.
  1. Pick your client or click Set Me Up. Stop on the API key step until you are ready to create or reuse a key.
The MCP setup wizard stopped on the API key choice step before a new key is created.
Create a new MCP key only when you are ready to copy it; generated tokens are shown once.
  1. Create the key, copy it immediately, then continue to the configuration step. Synth will not show that token again after you leave this panel.
The MCP setup wizard after creating a new key, with the generated token visually masked.
The generated key is a one-time secret. Copy it before continuing, store it securely, and never include it in a screenshot or message.

With curl:

MCP_KEY=$(curl -s -b /tmp/synth.cookie \
-H "Content-Type: application/json" \
-d '{"name":"MCP docs","scopes":["knowledge:read"]}' \
https://synth.example.com/api/settings/mcp/create-key | jq -r .key)

MCP is read-oriented today. If memory is missing, add the source through the app, REST API, SDK, or a watcher.

Tool List​

ToolUse
synth_list_projectschoose the right project
synth_statuspage count, snapshot, and index state
synth_searchsearch ranked current Project evidence
synth_get_pageread the current exact page, with optional consistency guards

Start agent keys with the read-only knowledge:read scope.

OpenAI Responses Config​

OpenAI remote MCP calls require a Synth MCP endpoint reachable from OpenAI. Use a public HTTPS endpoint or approved secure tunnel, not localhost.

{
"tools": [
{
"type": "mcp",
"server_label": "synth",
"server_description": "Read-only deterministic Synth project evidence.",
"server_url": "https://synth.example.com/api/mcp/",
"authorization": "synth_sk_REPLACE_ME",
"allowed_tools": [
"synth_list_projects",
"synth_status",
"synth_search",
"synth_get_page"
]
}
]
}

One-Time Client Setup​

The Connect page and Settings → Connect use the same client setup guides. Save the connection once; the client reads the saved URL and token in future sessions. Merge configuration entries into existing files rather than replacing the whole file.

ClientPersistent setup
Synth CLIInstall synthkb-cli with pipx, then run synth login SERVER and paste the token when prompted.
Claude DesktopSave the local bridge configuration below through Settings → Developer → Edit Config.
Claude CodeRun claude mcp add --transport http --scope user synth URL --header 'Authorization: Bearer TOKEN' once.
CodexSave the TOML below, or run the generated setup command from Connect.
Codex CLIUses the same saved configuration as Codex; configure either once.
CursorSave the entry in ~/.cursor/mcp.json for all projects, or use the generated macOS install command and confirm installation.
OpenCode 1.xRun opencode mcp add synth-kb --url URL --header 'Authorization=Bearer TOKEN' once; the released CLI saves this globally.

The generated Codex setup command runs in a macOS or Linux shell and requires Python 3.11+. You can save the TOML manually on other platforms. It preserves existing settings, accepts repeat runs with the same connection, and stops if an existing synth entry differs. It saves the bearer header directly, so no recurring shell export is required. If CODEX_HOME is set, it uses that directory instead of ~/.codex.

Restart your client after saving its configuration. The wizard's connection test checks the token's access to Synth; also check the saved connection inside your client, such as /mcp in Claude Code or Codex CLI.

Codex And Codex CLI​

Merge this into ~/.codex/config.toml, or CODEX_HOME/config.toml when configured:

[mcp_servers.synth]
url = "https://synth.example.com/api/mcp/"
http_headers = { Authorization = "Bearer synth_sk_REPLACE_ME" }

The app and CLI share this file. See the official Codex MCP configuration documentation.

Claude Desktop​

Claude Desktop's local server configuration starts a stdio process. Use mcp-remote to bridge to Synth's HTTP endpoint. Node.js and npx must be available to Claude Desktop.

{
"mcpServers": {
"synth": {
"command": "npx",
"args": [
"-y",
"mcp-remote",
"https://synth.example.com/api/mcp/",
"--transport",
"http-only",
"--header",
"Authorization:${SYNTH_MCP_AUTHORIZATION}"
],
"env": {
"SYNTH_MCP_AUTHORIZATION": "Bearer synth_sk_REPLACE_ME"
}
}
}
}

For a trusted private HTTP endpoint, the wizard also includes --allow-http. Fully quit and reopen Claude Desktop after saving. This local bridge reaches Synth from your computer; Claude's account-level remote connectors connect from Anthropic's infrastructure and have separate authentication requirements.

See Claude Desktop's local configuration guide and Claude's remote connector requirements.

Claude Code​

Use the user-scoped command above, or merge this into ~/.claude.json:

{
"mcpServers": {
"synth": {
"type": "http",
"url": "https://synth.example.com/api/mcp/",
"headers": {
"Authorization": "Bearer synth_sk_REPLACE_ME"
}
}
}
}

See Claude Code's MCP setup and scopes.

Cursor​

Merge a synth entry containing url and headers.Authorization into mcpServers in ~/.cursor/mcp.json. The generated macOS command opens Cursor's documented installation link and requires confirmation in Cursor. See Cursor's configuration locations and MCP install links.

OpenCode 1.x​

The following matches released OpenCode 1.19.5 and the one-time command above. Save it in the global ~/.config/opencode/opencode.json or opencode.jsonc:

{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"synth-kb": {
"type": "remote",
"url": "https://synth.example.com/api/mcp/",
"oauth": false,
"headers": {
"Authorization": "Bearer synth_sk_REPLACE_ME"
}
}
}
}

OpenCode's V2 documentation uses mcp.servers instead of mcp. Check your installed version before copying V2 instructions: the released 1.x non-interactive add command already saves globally and does not accept a --global flag. The setup here was checked against the released CLI implementation; see also the V2 MCP documentation.

Shell-Based Tools​

Prefer direct MCP tools when your AI tool supports remote MCP. For tools that can only run shell commands, use the first-class synth search and synth page commands. The CLI Automation and CI/CD guide shows a fully non-interactive login with file- or stdin-based secrets. Use curl only when diagnosing the MCP protocol itself.

Quick Server Test​

curl -s https://synth.example.com/api/mcp/ \
-H "Authorization: Bearer $MCP_KEY" \
-H "Accept: application/json, text/event-stream" \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/list","params":{}}'

Troubleshooting​

ProblemFix
401 UnauthorizedCheck the synth_sk_... key.
406 Not AcceptableAdd Accept: application/json, text/event-stream.
No tools foundUse /api/mcp/, not /api/mcp or /.
Wrong projectCall synth_list_projects and pass the returned stable Project ID.
Weak answerAdd the missing source through the app, API, SDK, or a watcher.

Next: API & SDK.