Skip to content

MCP server

The Ritual MCP server lets coding agents and custom MCP clients pull exploration context, recommendations, build briefs, and the workspace knowledge graph into their session over HTTPS using the Model Context Protocol.

If you’re using a supported coding agent (Claude Code, Cursor, Windsurf, Kiro, Gemini CLI, VS Code Copilot, Codex), use the CLI to set up the MCP connection automatically. The reference below is for building your own MCP client or wiring up an agent the CLI doesn’t auto-configure yet.

Endpoint

FieldValue
URLhttps://mcp.ritualapp.cloud/mcp
TransportMCP Streamable HTTP
AuthAuthorization: Bearer ritual_pat_… on every request
Content negotiationClients MUST send Accept: application/json, text/event-stream on POST requests (per spec)

The endpoint serves a session-init handshake. Send POST /mcp with an MCP initialize JSON-RPC request and the dual Accept header; the server responds 200 with an mcp-session-id you include on subsequent requests.

The tools that matter

A coding-agent integration is five calls end to end:

  1. list_explorations — find the right exploration in the workspace (with implementation-status badges), or score_context_pulse if starting from a raw feature description.
  2. get_exploration + get_recommendations — load the structured context.
  3. generate_build_brief (if not already generated) — pull the implementation-ready delivery context.
  4. Code the change against the brief.
  5. sync_implementation — writeback what shipped as code lands. Future builds in this workspace reuse the decisions.

Everything else in the full tool list supports this loop — discovery generation, recommendation review, audits, knowledge sources.

Quick connection — your own MCP client

# 1. Get a PAT
#    https://app.ritualapp.cloud/settings/tokens → Create token

# 2. Initialize a session
curl -X POST https://mcp.ritualapp.cloud/mcp \
  -H "Authorization: Bearer ritual_pat_YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -d '{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "initialize",
    "params": {
      "protocolVersion": "2024-11-05",
      "capabilities": {},
      "clientInfo": {"name": "my-client", "version": "0.1.0"}
    }
  }'

Response includes an Mcp-Session-Id header (e.g. mcp-session-id: 9975a189-…). Pass that as a header on every subsequent request:

curl -X POST https://mcp.ritualapp.cloud/mcp \
  -H "Authorization: Bearer ritual_pat_YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -H "Mcp-Session-Id: 9975a189-…" \
  -d '{"jsonrpc":"2.0","id":2,"method":"tools/list"}'

Wiring up specific clients manually

Easiest path: run ritual init and the CLI auto-detects every supported agent on your machine and registers Ritual against your freshly-minted PAT. The per-client recipes below are for when the CLI doesn’t auto-configure your client yet, or you want to wire it up by hand.

What every client needs

Three things, regardless of which client you’re configuring:

  1. The URLhttps://mcp.ritualapp.cloud/mcp
  2. The auth headerAuthorization: Bearer ritual_pat_… on every request. Get a PAT at /settings/tokens (“Create token”). Legacy rtl_… keys from earlier Ritual versions don’t authenticate here.
  3. An env-var-backed config if you can — most clients support reading the bearer from an environment variable so the PAT doesn’t live in a file you might commit. The recipes below show the env-var form (RITUAL_API_KEY) wherever the client supports it.

Then each client has its own config syntax, file path, and “is it connected” check — listed in the tabs below.

Easiest: run ritual init — the CLI runs claude mcp add-json automatically against the PAT it just minted for you.

Manual (one-line):

claude mcp add-json --scope project ritual '{
  "type": "http",
  "url": "https://mcp.ritualapp.cloud/mcp",
  "headers": { "Authorization": "Bearer ritual_pat_YOUR_TOKEN" }
}'
AspectDetail
Scope--scope project writes .mcp.json in the current dir (safe to commit if the bearer is env-var-backed); --scope user writes ~/.claude.json (global, your PAT in one place)
Verifyclaude mcp list — Ritual should report ✓ connected. (Note: Claude’s connectivity probe doesn’t always send the dual Accept header so the list view occasionally shows ✗ even when in-session tool calls work — see the FAQ below.)
Restart needed?No — Claude Code picks up new MCP servers on the next /mcp invocation.

Tools

Tools exposed today. Tool names + arg shapes are stable; new tools are added; existing ones don’t break.

Discovery & state

ToolPurpose
list_explorationsAll explorations in a workspace, with implementation-status badges
get_explorationExploration metadata + discovery questions + answers
get_workflow_statusSingle source of truth for where an exploration sits in its workflow
get_workspace_overviewWorkspace summary — explorations, status badges, recent activity
list_workspacesWorkspaces visible to the PAT
query_knowledge_graphReverse lookup decisions + deferrals + commits by file path or topic
pingHealth check

Reasoning Readiness scoring

ToolPurpose
score_context_pulseScore Reasoning Readiness / Context Debt for an existing exploration or a free-form feature description. See Context Pulse.
check_anti_goalsDetect collisions with declared anti-goals in the workspace
check_exploration_overlapDetect overlap with existing explorations before starting a new one

Discovery → recommendations pipeline

ToolPurpose
generate_problem_statement / refine_problem_statementTurn a raw idea into a structured problem statement, then iterate on it
generate_considerations / refine_considerationsSurface the dimensions of a problem worth thinking through
suggest_discovery_questionsGenerate classified discovery questions (🔴 blocking / 🟡 uncertain / 🟢 answerable)
accept_discovery_questions / accept_discovery_questions_batchLock in the user-picked subset
add_discovery_question / create_discovery_matterAdd a custom question, or a new area to host one
get_discovery_statePoll the async discovery-generation state
submit_answer / iterate_answer / get_answer_stateQuestion-answer cycle
start_agentic_run / resume_agentic_run / cancel_agentic_run / get_agentic_run / list_agentic_runsThe pipeline that generates recommendations from answered questions
get_recommendations / get_recommendations_previewFetch recommendations, or a server-rendered preview
accept_recommendationsReview and lock recommendations
suggest_recommendation_edit / apply_recommendation_proposalTwo-step preview-then-apply edit of a single recommendation
get_recommendation_attestationPer-rec audit trail — grounding sources, inference flags, scope status

Build brief + KG writeback

ToolPurpose
generate_build_briefProduce implementation-ready delivery context (BUILD-BRIEF.md) from accepted recommendations
get_build_brief_status / get_requirement_set_statusPoll generation progress
sync_brief_review / save_reconciled_briefPersist brief reviews and a deterministically-enriched brief version after the verify pass
sync_implementationWrite what shipped (commits, files, RBs verified, deferrals) back to the workspace KG. Called as a side effect of the implementation stage, not a separate user-visible step.

Audit

ToolPurpose
audit_recommendations / audit_planStart an audit chain over recommendations or the implementation plan
apply_repairExecute a structured fix surfaced by an audit
get_audit_chainRead an audit chain’s results (grounding, survival reports)

Workspace + collaborator management

ToolPurpose
create_workspace / create_explorationBootstrap state. Templates are resolved server-side (job → workspace default → persona → system default) — there is no template-picking step or tool.
archive_explorationSoft-delete an exploration (clears duplicates from the resume picker)
add_collaboratorAdd a teammate to an exploration
set_anti_goals / check_anti_goalsDeclare what’s explicitly out of scope, and validate a proposal against it
add_knowledge_source / list_knowledge_sources / get_knowledge_source / remove_knowledge_sourceAttach docs, tickets, transcripts as context
suggest_high_leverage_problemsWorkspace-level suggestion engine
suggest_next_job / get_next_jobSuggest and re-read the next best job-to-be-done
fork_sibling_explorationsCreate related explorations sharing context

FAQ

I’m getting 401 Unauthorized.

Check that the Authorization header is exactly Bearer ritual_pat_… (note the space) and that the PAT hasn’t been revoked at /settings/tokens. Note: legacy rtl_… tokens from earlier Ritual versions don’t authenticate against mcp.ritualapp.cloud.

I’m getting 406 Not Acceptable.

Per the MCP Streamable HTTP spec (2025-03-26), clients MUST send Accept: application/json, text/event-stream on every POST. If you only send one of the two, the SDK transport rejects with 406. Add both content types to your Accept header. This is also why claude mcp list sometimes shows ritual as ✗ failed — Claude’s connectivity probe doesn’t always send the dual header even though its actual in-session tool calls do.

I’m getting 404 “Session not found” on follow-up requests.

Each initialize POST gets a fresh Mcp-Session-Id. Subsequent requests MUST include that exact session ID as a header (Mcp-Session-Id: <uuid>). If you re-initialize to get a new session ID, the old one is gone — sessions live in-memory on the server pod.

Does Ritual MCP work over stdio?

No. The hosted server speaks Streamable HTTP only. If your client only supports stdio, run a bridging proxy (e.g. mcp-proxy) or switch to a client that supports remote MCP.

How do I rotate a PAT?

Sign in to app.ritualapp.cloud, open Settings → Tokens, create a new token, update your client config, then revoke the old one. In-flight requests using the old token start failing immediately on the next call.

What about connecting external sources (Confluence, Drive, Jira) to Ritual?

That’s a separate flow — the Ritual app’s Knowledge Sources UI ingests external content into your workspace’s knowledge graph. You don’t paste those external server URLs here. The MCP server documented on this page is Ritual’s OUTBOUND server (clients connect to it); the Knowledge Sources flow is INBOUND (Ritual consumes external content).