# Claude and MCP

Jers ships as an MCP server and a Claude Code plugin, so Claude can make typed decisions with memory as tool calls.

## Claude Code

```bash
export JERS_API_KEY=jj_live_...
export JERS_BASE_URL=https://api.getjers.com   # the default
export JERS_MODEL=jers-english                 # optional: the model decide uses when a call names none
```

The plugin is not published yet. When it is, adding it takes two commands in Claude Code (`/plugin marketplace add`, then `/plugin install jers@jers`); until then, call the API directly.

The plugin brings the tools and a skill on writing questions and memory lines that work.

## Tools

| Tool | Does |
|---|---|
| `decide` | answers typed questions about a state; `model`, `subject`, `compare` (with a subject), `robust`, `values`, `derive` |
| `remember` | stores facts about a subject, with write-time warnings |
| `memory` | what Jers remembers about a subject, word for word |
| `forget` | removes a concept and checks recall |
| `delete` | removes a subject's whole memory |
| `feedback` | the right answer for an earlier decision |
| `quality` | accuracy and calibration from that feedback |

Each successful result has a short text for the model and the full API response as `structuredContent` (read by clients on MCP 2025-06-18); an error result has the text only. Windows, the cache, `top_k`, `min_share`, `placebo`, rules, golden sets, batches and calibration are not tools: use the API or an SDK for those. `decide` does fire the rules a subject already has.

## Other MCP clients

The server is one file of standard-library Python (`plugins/jers/server/jers_mcp.py`) speaking MCP over stdio, versions 2025-06-18, 2025-03-26 (including batches of messages) and 2024-11-05:

```json
{"mcpServers": {"jers": {"command": "python3", "args": ["/path/to/plugins/jers/server/jers_mcp.py"],
                         "env": {"JERS_API_KEY": "jj_live_...", "JERS_BASE_URL": "https://api.getjers.com", "JERS_MODEL": "jers-english"}}}}
```

Without a key it still starts, and every tool call says how to get one.
