# MCP

> Every tool a coding agent can call on Sypnia Cases.

Applies to: the Sypnia engine (open source, self-hosted) and Sypnia Cloud (paid service).  
Source: https://cases.docs.sypnia.com/tools/mcp/

For agents: MCP server https://mcp.cases.sypnia.com (a self-hosted server serves the same at /mcp) — Cases' own endpoint, the same pattern as mcp.data.sypnia.com: one endpoint per product, the token decides (a Sypnia account token works on every Cases project of the person's organizations, with `project` as an argument; a Cases project token syp_cpt_ works on that project only). Streamable HTTP, stateless (no session id), answers JSON; POST / works too. OAuth 2.1 with the Sypnia account at auth.sypnia.com, PKCE, dynamic registration (the protected resource metadata at /.well-known/oauth-protected-resource/mcp names the issuer); PATs and agent sessions (DPoP) too. Project tools: create_project (organization, name, slug, data_project, files), link_data_project, upload_map, read_map. Map tools: list_maps, get_map, get_case (level, version), search_cases, check_scope, propose_change, comment (proposal, case, field, body), list_proposals (status, pending by default), get_links. Navigation and events: get_navigation, find_place (where is X: place, path, route, files), get_event_graph, list_dead_letters (without listener: how many per listener; read only; replaying is for people, in the CLI or the editor).

```bash
claude mcp add --transport http sypnia-cases https://mcp.cases.sypnia.com
```

## One endpoint for Cases, the token decides

Cases has its own MCP endpoint, `mcp.cases.sypnia.com`, following the same rule as Sypnia Data (`mcp.data.sypnia.com`): **one endpoint per product, and the token says who is calling.**

- **A Sypnia account token** (a session, the agent session from the device flow, or a Sypnia PAT) works on every Cases project of your organizations. Tools take a `project` argument.
- **A Cases project token** (`syp_cpt_…`) works on that project only, and the `project` argument can be left out. An owner creates it with the API (`POST /v1/maps/{map}/tokens`); it is shown once, acts as an editor and never approves ([Project tokens](https://cases.docs.sypnia.com/api#project-tokens)). It is the token for CI and for agents that should touch one map.

The endpoint speaks MCP over streamable HTTP and keeps no session: every request carries its token, and the answer is JSON. `https://mcp.cases.sypnia.com` works with or without the `/mcp` path. A client that arrives without a token gets `401` with the address of the protected resource metadata, which names the Sypnia sign-in, so it can start OAuth on its own. A self-hosted server serves the same tools at `https://<your host>/mcp`.

An agent that sets up an app adds both servers once (`sypnia-data` and `sypnia-cases`) and uses the same Sypnia account in both. `link_data_project` is the tool that crosses products: it calls Sypnia Data on _your_ behalf, as the person your token proves, so it only links projects you can open in both. Any Sypnia session works for it, including the agent's session bound to a key ([Authentication](https://cases.docs.sypnia.com/api#authentication)).

> **Note: Why not inside mcp.data.sypnia.com**
>
> Putting the Cases tools inside Data's endpoint would make Cases depend on Data, and Cases must work alone, for teams that only plan. Keeping one endpoint per product also keeps each product's permissions, limits and outages separate.

## Project tools

### `create_project`\[Engine, Cloud]Creates a Cases project in one of your organizations (the same Sypnia organization as your Data project, by default). Input: `organization`, `name`, optional `slug`, `data_project` to link at once, and `files` (the files of the format) to start from. Returns the project and its map's address.

### `link_data_project`\[Cloud]Links a Cases project with a Data project, both ways: the map points to the Data project, and Data's control plane records the map. Checks, as you, that you can open both. Input: `project`, `data_project`.

### `upload_map`\[Engine, Cloud]Sends a map to a Cases project as a **draft proposal**: the output of `npx @sypnia/cases map --json`, the document `map --upload` sends, or the files of the format. Never changes an approved version. Input: `project`, `map`, `title`.

### `read_map`\[Engine, Cloud]The approved map of a project (or a version), at the technical level, ready to work from. Input: `project`, optional `version`.

## Map tools

The agent signs in with a Sypnia account (OAuth in the browser, or an agent session from the device flow) and sees the maps of that account's workspaces.

### `list_maps`\[Engine, Cloud]The maps the caller can read, with their latest version. Input: optional `organization`.

### `get_map`\[Engine, Cloud]Areas, actors, journeys and the list of cases of a map version (latest approved by default).

### `get_case`\[Engine, Cloud]One case at the technical level, or the `level` you ask for, with its links (tables, health, commits, tasks). Input: `project`, `case`, optional `level`, `version`.

### `search_cases`\[Engine, Cloud]Cases matching words, an actor, a table or a status. Input: `project`, optional `query`, `actor`, `table`, `status`, `version`.

### `check_scope`\[Engine, Cloud]Runs the check against code the agent sends (the output of `npx @sypnia/cases map --json`, or a list of case ids found in commits) and returns the findings, as `cases check --json`. Input: `project`, `code` or `caseIds`, optional `contract`.

### `propose_change`\[Engine, Cloud]Opens a proposal: cases to add, change or retire, with a title and the reason in plain words. Never changes an approved version. Input: `project`, `title`, `reason`, `changes`.

### `comment`\[Engine, Cloud]Comments on a proposal, or on a case (one field of it, optionally). Input: `project`, `body`, and `proposal`, `case` or both, optional `field`.

### `list_proposals`\[Engine, Cloud]Proposals and their review state: drafts and open ones by default, or by `status` (`pending`, `draft`, `open`, `merged`, `closed`). Input: `project`, optional `status`.

### `get_links`\[Engine, Cloud]For one case: tables, production health, commits and pull requests, agent tasks.

## Navigation and events

### `get_navigation`\[Engine, Cloud]The navigation tree of a map version: roots, places with their paths, the cases on each place, and Telemetry's findings. Input: `project`, optional `root`, `version`.

### `find_place`\[Engine, Cloud]Answers «where is it?»: from words («the price of a product»), a case id or a route, returns the place, its path, its route, the cases there and the files behind it. Input: `project`, `query`.

### `get_event_graph`\[Engine, Cloud]The event graph: which case starts on which outcome, public and internal outcomes per area, bounded loops, and each listener's queue and dead letters. Input: `project`, optional `from` (an event name).

### `list_dead_letters`\[Engine, Cloud]The dead letters of a listener, with each event's error and trace; without `listener`, how many each listener has. Read only: sending them again is for a person, from the CLI or the editor. Input: `project`, optional `listener`.
