Skip to Content
Joring Docs
Developers

MCP server

Add Joring to Claude Code, Codex, Cursor, Gemini CLI, VS Code or any other MCP client.

MCP (Model Context Protocol) is an open standard that lets an AI agent use the tools of another service. Joring runs an MCP server at https://api.joring.ai/mcp, over the Streamable HTTP transport. To sign in, send an API key as a bearer token. Hosted agents such as claude.ai and ChatGPT sign in with OAuth instead. The agent sees only the tools that its scopes allow.

Connect a client

claude mcp add --transport http joring https://api.joring.ai/mcp \
  --header "Authorization: Bearer jor_api_..."

For an agent that you build on the Anthropic Messages API, send the header anthropic-beta: mcp-client-2025-11-20. Then add the server, and a toolset that names it:

{
  "mcp_servers": [
    {
      "type": "url",
      "url": "https://api.joring.ai/mcp",
      "name": "joring",
      "authorization_token": "jor_api_..."
    }
  ],
  "tools": [{ "type": "mcp_toolset", "mcp_server_name": "joring" }]
}

For an agent that you build on the OpenAI Responses API, add the server as a tool:

{
  "tools": [
    {
      "type": "mcp",
      "server_label": "joring",
      "server_url": "https://api.joring.ai/mcp",
      "authorization": "jor_api_..."
    }
  ]
}

Tools

ToolScopeWhat it does
get_authoring_guidereadReturns the rules, the field limits, the supported AI tools, the existing trails and the document schema. Call it first.
list_trailsreadLists the team's trails, most recently updated first, with status and text filters.
get_trailreadReturns one trail: its document, its revision and what still blocks publishing.
list_versionsreadLists the published versions of a trail.
create_trailwriteCreates a draft from a title or from a full document.
update_trailwriteSaves the full document, and the visibility if you send it. It sends the revision it read. If someone saved since then, it returns the current document and does not overwrite it.
test_surfacingwriteTests whether the trail would surface for one prompt. If it would not, it shows which live trail wins.
run_surfacing_exampleswriteRuns every trigger example and records the result. All of them must pass before you can publish.
restore_versionwriteReplaces the draft with an earlier version's document.
publish_trailpublishMakes the draft live for employees.
unpublish_trailpublishTakes a live trail back to draft.

The agent does not see the tools that its key cannot call. The server tells the agent to read the guide first, to run the examples until they pass, and to ask you before it publishes or unpublishes.

The MCP server does not cover everything. To manage who can see a restricted trail, to archive or delete a trail, or to upload images, use the REST API.

Errors the agent can act on

Some problems come back as tool results, with isError set and a code: validation, revision_conflict or not_found. The result includes what the agent needs to fix the call: the list of issues, or the current revision and document. Protocol and server faults come back as JSON-RPC errors.

Protocol details

Joring uses MCP version 2026-07-28, which is stateless, and session mode for clients on version 2025-11-25. Each key has a rate limit: 120 requests in a burst, then one more each second.

A 401 response carries a WWW-Authenticate header like this one:

Bearer realm="joring", resource_metadata="https://api.joring.ai/.well-known/oauth-protected-resource/mcp", scope="trails:read trails:write trails:publish", DPoP realm="joring", algs="ES256"

When Joring refused a token that the client sent, the header also carries error and error_description.

NextTrails REST API

The /v1 routes behind these tools, for agents you build and for scripts.

On this page