Improve a saved MCP server from a reviewed MCPJam eval run, one change a round on a mock of the server, with a rule that keeps a change only when its aim gets better and nothing else gets worse. Use when connected to MCPJam and asked to improve, fix, tune or hill-climb a server, its tool descriptions, its results or its token use, from an eval run.
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Climb An Mcp Server?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/mcpjam-climb-an-mcp-server)
---
name: climb-an-mcp-server
description: Improve a saved MCP server from a reviewed MCPJam eval run, one change a round on a mock of the server, with a rule that keeps a change only when its aim gets better and nothing else gets worse. Use when connected to MCPJam and asked to improve, fix, tune or hill-climb a server, its tool descriptions, its results or its token use, from an eval run.
---
# climb-an-mcp-server
A climb starts from one finished eval run of a saved server. Each round tries one change on a **mock** of that server and reruns the same eval suite against the mock. A stated rule compares the round's run with the best run so far, then keeps or reverts the change. The real server is never changed. At the end you hand the kept changes to whoever edits the server's code.
## What a mock is for
A mock is a real MCP server MCPJam hosts in front of the saved server. Its definition states only what you change; every other call goes to the real server, including calls to a tool whose saved answers match none of its cases. A mock shows what the server would do after a change, and a saved answer stands in for code you have not written yet. It is not a way to make the server look faster.
## Tools and commands
| Step | MCP tool | CLI |
|---|---|---|
| Start a climb | `start_climb` | `mcpjam cloud climbs start --run <run> --server <server name or ID> --target finding:<finding>` |
| Make the climb's mock | `create_mock_server` | `mcpjam cloud mocks create --name <name> --server <server name or ID> --definition '{}'` |
| Read a mock version | `get_mock_server` | `mcpjam cloud mocks get --mock <mock> [--mock-version <n>]` |
| Save a change | `update_mock_server` | `mcpjam cloud mocks update --mock <mock> --expected-version <n> --definition-file <file>` |
| Change or undo one path | `patch_mock_server` | `mcpjam cloud mocks patch --mock <mock> --expected-version <n> --family tools --name <tool> --path <path> --value-text <text>`, or `--value-file <file>`, or `--remove` |
| Run a round | `submit_climb_round` | `mcpjam cloud climbs round --climb <climb> --mock <mock> --summary <text> --baseline`, or `--aim <key>` |
| Read the rounds | `get_climb` | `mcpjam cloud climbs get --climb <climb>` |
| Stop | `stop_climb` | `mcpjam cloud climbs stop --climb <climb>` |
Add `--format json` to read CLI output as JSON, and parse stdout on its own: the line naming the account goes to stderr. When you sign in with an API key in the environment rather than `mcpjam cloud login`, the CLI's help leaves these beta commands out, and `mcpjam cloud climbs --help` lists only `help`. They still run, with the flags in this table.
A target's key is its kind (`pass_rate`, `goal`, `tokens`, `tool_calls`) or `finding:<id>` for a finding. Repeat `--target` for each finding.
## The loop
1. **Start.** Start a climb with the run and the server. Add as targets the run's accepted findings whose fix belongs to the server. `mcpjam cloud review findings --run <run>` lists the run's findings: an accepted one carries `fixIn` (`server`, `client`, `test` or `unknown`); a proposed one has no `fixIn` until a person accepts it. The climb always watches the pass rate, and the goal when the run has goal results. It refuses, with `CLIMB_FINDING_NOT_USABLE` and the finding's title, a finding that is not accepted or whose fix belongs to the client or the test: a server change cannot fix it. When no accepted finding is left to add, start without `--target` and aim rounds at `pass_rate`. Count the iterations of client and test findings' cases: they fail on any mock, so they cap the pass rate.
2. **Make one mock and run the baseline round on it.** Create a mock of the server with an empty definition, then submit a round with `kind: "baseline"` (CLI `--baseline`). The climb refuses change rounds until this one settles. Its run is what every change is compared with, mock against mock, and how far it landed from the real run is the noise the rule allows for. The baseline is round 0: its moves compare the unchanged mock's run with the real run, while a change round's moves compare with the best run. Once it settles, its run is the best run so far, and the climb's `noise` holds how far each target moved between the real run and the unchanged mock: `passIterations` for the pass rate, `byTarget` for each target. A target's own noise is the margin its moves must beat. 9 of 15 iterations passing on the real run and 8 of 15 on the mock is a pass rate noise of 1; a finding that failed 3 of 3 on both runs has a noise of 0, however far the pass rate moved. When a target moved between the real run and round 0, read why before you aim: `mcpjam cloud eval iterations --run <run> --format json` gives each failed check's reason, for the real run and for round 0's run. A failure on one side only that the mock passes through untouched, such as a timeout of the real tool, is the server's variance, not something the mock does.
3. **Pick one change.** Read the failed sessions behind the target you aim at. Choose the smallest server change that would have avoided the failure. Make one change per round, so a result means one thing. Aim only at a target that can still get better: a finding with no failures left cannot move, and the round is reverted. Compare with the best run, not the real run. Its numbers are the `after` of the best round's moves, which is round 0 until a round is kept:
```bash
mcpjam cloud climbs get --climb <climb> --format json 2>/dev/null |
jq -c '(.climb.bestRound // 0) as $b | .rounds[] | select(.number == $b) | .moves[] | {key, after, afterTotal}'
```
4. **Save it as the mock's next version.** Start from the definition the best round ran (empty until a round is kept), add the one change, and save it with the version you read as the expected version. One change is usually one path, and `mocks patch` sets it against the current version in one call; `mocks update` saves a whole definition from a file. The value of `--path answer` is the answer itself, `{ "from": "saved", "cases": [...] }`, not an object wrapping it in `answer`. After a revert, first undo the reverted path with `mocks patch --remove`, or set it back to the best round's value if that round set it too, so the mock matches the best round's definition again. Each save, a remove included, adds a version, so the latest version can hold a reverted change. Keep a copy of each kept definition. `get_climb` gives each round's mock version, and `get_mock_server` reads one field of any version (CLI `--mock-version <n> --path <path>`; with `--format json` the field is under `value`).
5. **Submit the round** with the mock, what you changed in one sentence, and the key of the target it aims at (`pass_rate`, or `finding:<id>`). Leave the version out. A round runs the mock as it is, so a version other than the current one is refused. The call starts the run and returns at once.
6. **Wait for it to settle.** A round takes as long as the suite's run, a few minutes for 15 iterations. Submitting returns the round's number (`round`; the baseline is 0). Read `get_climb` about once a minute, until that round's `status` is `settled` or `failed`. From a shell:
```bash
until mcpjam cloud climbs get --climb <climb> --format json 2>/dev/null |
jq -e --argjson n <round> '.rounds[] | select(.number == $n) | .status != "running"' >/dev/null
do sleep 60; done
```
Do not save a new version while a round runs: the run reads the mock at each tool call, so a mid-run change would mix two versions in one round.
7. **Read the verdict** (next section), then repeat from step 3 or stop. Stop when no target the server can fix is left to improve. Once the aimed findings are cleared and the failures left belong to the test or are the real server's variance, such as its timeouts, stop and hand over rather than aim more rounds at the pass rate.
8. **Hand over** the kept changes: each as its definition change and what a developer should change in the server's code to match it. Name the best round's mock version from `get_climb`, not the latest version. List a reverted round whose aim cleared completely, such as a finding's failures going to 0, with the reason the rule gave: a person can keep it in the app.
## Reading a round
`get_climb` returns the climb (its `targets`, `noise`, `bestRound` and `bestRunId`), `baseline` (the real run's number for each target) and `rounds`. Each round has a `status` (`running`, `settled` or `failed`), a `verdict` (`kept`, `reverted` or `not_decided`; the baseline round has none), its `reasons` (a list: a round can have more than one), and its `moves`: one per target, with `before` out of `beforeTotal`, `after` out of `afterTotal`, and `change`. A finding's number counts the failed iterations of its cases, so for a finding lower is better. A total below the run's iterations, such as 11 of 14, means iterations were lost to errors and left out.
Each target shows its move against the best run so far: `better`, `worse`, `same`, or not compared. Rates (pass rate, goal, a finding) are compared as rates, so iterations lost to errors cannot flatter a run. A rate's move is the change in rate times the smaller run's iterations: 8 of 15 to 10 of 12 is a move of 3.6. It counts only when it is larger than both the target's own noise and 2 iterations, so with a noise of 1, 12 to 10 of 15 is `same` and 12 to 9 is `worse`. Costs (tokens, tool calls) are averaged over passing iterations and count only when they move by more than 10%.
A round that is not decided still shows moves, but they are not a verdict: its run stopped early or lost iterations, so do not build on them.
| Reason | Verdict | Means | Next |
|---|---|---|---|
| `baseline_recorded` | none | The unchanged mock's run is the starting point, with its noise | Make the first change |
| `kept_aim_better` | kept | The aim got better beyond the noise and nothing else got worse | Build the next change on this one |
| `aim_did_not_move` | reverted | The aim stayed within the noise | Try a different change, or aim at a target that can still get better |
| `aim_worse` | reverted | The aim got worse beyond the noise | The change went the wrong way. Read the round's failed sessions |
| `other_target_worse` | reverted | Another watched target got worse than in the best run. When the aim got worse too, the round lists both this and `aim_worse` | Find a change that does not cost the other target |
| `drifted_from_baseline` | reverted | Another target is now worse than at the climb's start | Same |
| `run_not_completed`, `run_did_not_finish` | not decided | The run failed or ran out of time | Read why with `mcpjam cloud eval status --run <runId>` (its `notes`), then submit the same change again. A run out of MCPJam credits needs the person to add credits: tell them |
| `lost_iterations` | not decided | More than 1 iteration in 10 was lost to errors | Fix the cause, then submit again |
| `not_comparable` | not decided | The run did not cover the same cases and iterations | Submit through the climb, not by hand |
A person can overrule a round in the app. You cannot.
An iteration that errors before its checks run (a provider error, a prompt that overflowed the model's context) is recorded as an error, not as a failure, and is left out of the rates. Too many of them leave the round not decided.
## Writing a change
Definitions name tools by their real names. A tool's description:
```json
{ "tools": { "ask_wiki_question": { "description": "Ask a question about a public GitHub repository. ..." } } }
```
Set it with `mcpjam cloud mocks patch --mock <mock> --expected-version <n> --family tools --name ask_wiki_question --path description --value-text "<new description>"`.
A saved answer for one kind of call. Cases are tried in order; `when` matches when every key it lists equals the call's argument. A call that matches no case goes to the real tool.
```json
{
"tools": {
"read_wiki_contents": {
"answer": {
"from": "saved",
"cases": [
{
"when": { "repoName": "owner/repo" },
"result": {
"content": [{ "type": "text", "text": "No documentation exists for owner/repo: the repository is not indexed." }],
"structuredContent": { "result": "No documentation exists for owner/repo: the repository is not indexed." }
}
}
]
}
}
}
}
```
A saved answer matches only the arguments its `when` lists, usually the test's own. It shows what the code change would return for that input, not that the change works for others. When you hand it over, describe the general behavior (for example, answer plainly for any repository DeepWiki has not indexed), not the one case. The suite has no held-back cases, so a climb cannot show that a change holds beyond the cases it ran.
When the tool declares an output schema, a saved result must carry a `structuredContent` that matches it, or the save is refused with the case's path. Read the schema first: `mcpjam cloud mocks get --mock <mock> --family tools --name <tool> --path outputSchema` (with `--format json`, under `value`).
## What can change, and who sees it
| Change | Read by | Note |
|---|---|---|
| A tool's description | Every client | The usual first change |
| A parameter's description, hiding or fixing a parameter (`params`) | Every client | Hide a parameter the model keeps getting wrong |
| A tool's input schema | Every client | Replaces the whole schema |
| Hiding (`hidden: true`) or renaming a tool | Every client | When you add tools that replace one, hide or reword the old one. Left untouched, the model kept calling the slow old tool |
| A saved answer for a call | Every client | Stands in for changed code. Fill it with what the changed code would return, never with a copy of the real answer |
| An added tool | Every client | Give it a description, a schema and a saved answer |
| The server's instructions | Most clients, not all | In KES-1064's check, 19 of 23 client templates showed them to the model |
| Titles, annotations, output schemas, icons | No model in KES-1064's check (0 of 23) | A round that changes only these measures nothing |
| Prompts and resources | Not reached in an eval by MCPJam's own client | Do not climb with these on MCPJam's client |
The client's settings (its timeout, its model, which features it supports) are what the users have. Do not change them, and do not aim a round at a finding whose fix belongs to the client.
## What the climbs so far showed
DeepWiki's public server, 5 cases run 3 times each, December 2026:
- An unchanged mock gave the same result per case as the real server in the first trial, with tokens within 1%. In the second, it landed 2 iterations lower (7 of 14 against 9 of 15), because DeepWiki's answers vary between runs. The baseline round measures exactly that.
- One saved answer, a plain "not indexed" result for a repository DeepWiki has not read, took that case from 0 of 3 to 3 of 3. As a round it was kept: 7 of 14 to 11 of 15.
- A wrong saved answer (that the TypeScript SDK is written in Python) was reverted: 11 of 15 to 7 of 14.
- `read_wiki_contents` returns a whole wiki, over 300,000 tokens, which overflowed the model's context in about 1 iteration in 15. That is a server finding: return less, or return it in pages.
- An agent working from these skills alone ran a baseline and three rounds on a fresh climb. The same saved "not indexed" answer was kept (8 of 15 to 12 of 15; the finding's failures 3 to 0). Rewording `read_wiki_contents` to send specific questions elsewhere was reverted: for the unindexed repository the model then called `read_wiki_structure`, which fails the same way, and the finding's failures went back to 3. When a change fixes one tool, check whether the model can reach the same failure through another.
- Its third round gave `read_wiki_structure` the same saved answer, aimed at the finding that was already at 0 failures. It could not move and was reverted. A change for a route the model does not take in the best run cannot be measured: mention it in the hand-over as not measured.
- A second agent, given the skills with these lessons, made the same change in its first round (kept: 7 of 15 to 11 of 14, the finding's failures 3 to 0) and then stopped, because the failures left belonged to the test.
- A third agent made the same change; its first try ran out of credits and was not decided, and the same change submitted again was kept (8 of 15 to 12 of 15). Its next change, rewording `read_wiki_contents`, was reverted at 12 to 10 of 15.
- A fourth agent's saved "not indexed" answer took the finding from 3 failures to 0, and the round was reverted. Timeouts in the real run only had put the pass rate 3 apart from the unchanged mock's, and every target then used that noise of 3. Each target now has its own noise; this finding failed 3 of 3 on both runs, so its noise is 0, and the same numbers give a kept round.
- A case that names a tool the server does not have fails every time. Its fix belongs to the test, not the server: do not aim a round at it.
## What a mock cannot prove
- **Waiting.** A saved answer is the same on every call, so a mock cannot show a call that takes time or a result that becomes ready later. A change like "start the export, then fetch it" passes on a mock and can fail when built. Mark such a kept change "not proven on a mock" when you hand it over.
- **Speed.** A saved answer that returns the real tool's own result instantly only makes the server look faster. Do not submit it.
## Rules
- One change per round. Never batch.
- Never resubmit a reverted change hoping for a better draw.
- A round that is not decided is not a loss: read its reason and fix that.
- Costs (tokens, tool calls) are averaged over passing iterations only, because a failing session is cheap when it fails fast. Do not aim at a cost while the pass rate is low.