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:
synth_list_projectsif the project is unclearsynth_searchwith a focused query- Inspect several ranked excerpts and refine the query when needed
synth_get_pagewith the returned page ID, snapshot, and revision for exact details- Call
synth_statuswhen a read is unavailable or readiness needs inspection - 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.
- Open Settings and stay in the current project context.

- Choose Connect and confirm the MCP server URL.

- Pick your client or click Set Me Up. Stop on the API key step until you are ready to create or reuse a key.

- Create the key, copy it immediately, then continue to the configuration step. Synth will not show that token again after you leave this panel.

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
| Tool | Use |
|---|---|
synth_list_projects | choose the right project |
synth_status | page count, snapshot, and index state |
synth_search | search ranked current Project evidence |
synth_get_page | read 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.
| Client | Persistent setup |
|---|---|
| Synth CLI | Install synthkb-cli with pipx, then run synth login SERVER and paste the token when prompted. |
| Claude Desktop | Save the local bridge configuration below through Settings → Developer → Edit Config. |
| Claude Code | Run claude mcp add --transport http --scope user synth URL --header 'Authorization: Bearer TOKEN' once. |
| Codex | Save the TOML below, or run the generated setup command from Connect. |
| Codex CLI | Uses the same saved configuration as Codex; configure either once. |
| Cursor | Save the entry in ~/.cursor/mcp.json for all projects, or use the generated macOS install command and confirm installation. |
| OpenCode 1.x | Run 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
| Problem | Fix |
|---|---|
401 Unauthorized | Check the synth_sk_... key. |
406 Not Acceptable | Add Accept: application/json, text/event-stream. |
| No tools found | Use /api/mcp/, not /api/mcp or /. |
| Wrong project | Call synth_list_projects and pass the returned stable Project ID. |
| Weak answer | Add the missing source through the app, API, SDK, or a watcher. |
Next: API & SDK.