mcp-better 0.5.0 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +62 -25
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -9,15 +9,15 @@ Textbook for **AGENTS.md** on that scale — honest modern MCP at the **BETTER**
|
|
|
9
9
|
the book is the app is the book
|
|
10
10
|
```
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
Modern MCP textbook **that runs**, reviewed and approved as an AAIF Ambassador contribution. Rust · `rmcp` **3.10** · Discover · stamped cache hints · the official MCP conformance suite in CI: [100% for the conformance build](#conformance), and for the textbook binary every scored check except those that need a suite fixture or an undeclared method.
|
|
13
13
|
**Book:** [`textbook/`](./textbook/) — what · why · how · [doctrine](./textbook/DOCTRINE-book-is-app.md).
|
|
14
14
|
**App:** this binary + smokes. Lesson after lesson, version after version — knowledge compounds.
|
|
15
15
|
|
|
16
|
-
> **BEST** (
|
|
16
|
+
> **BEST** (BETTER **plus** `project.faf` that is resident **and used**: persistent project context that authors the agent files) lives at **[faf.one/agents](https://faf.one/agents)**, one hop up from this textbook.
|
|
17
17
|
|
|
18
18
|
## Dual-package (optional)
|
|
19
19
|
|
|
20
|
-
**
|
|
20
|
+
**We are Cargo.** Install is `cargo install`. `npx` is a try path. We do **not** offer `npm install` as an option.
|
|
21
21
|
|
|
22
22
|
→ [Why dual-package](./docs/DUAL-PACKAGE-FOR-RUST-MCP.md) — positioning + FAQ
|
|
23
23
|
→ [Full guide (how)](./docs/DUAL-PACKAGE-RUST-MCP.md) — lockstep, publish order, OIDC, score + wire
|
|
@@ -40,7 +40,7 @@ Humans say **7/28**. Machines negotiate **`2026-07-28`**.
|
|
|
40
40
|
|
|
41
41
|
## What to expect
|
|
42
42
|
|
|
43
|
-
1. **Built for 7/28** — not bolted onto a legacy server (official `rmcp` 3.
|
|
43
|
+
1. **Built for 7/28** — not bolted onto a legacy server (official `rmcp` 3.10).
|
|
44
44
|
2. **Honest surface** — transport and capabilities match docs and CI.
|
|
45
45
|
3. **Roadmap expands the era** — versions add road; they do not “become” 7/28 later.
|
|
46
46
|
|
|
@@ -53,27 +53,35 @@ Humans say **7/28**. Machines negotiate **`2026-07-28`**.
|
|
|
53
53
|
| **v0.4.3** | Same era + **`confirm_echo` MRTR** (SEP-2322) + **Agent Skills** (`mcp-better-lab`) — see [`docs/MRTR-CONFIRM-ECHO.md`](./docs/MRTR-CONFIRM-ECHO.md) · [`docs/SKILLS-OVER-MCP.md`](./docs/SKILLS-OVER-MCP.md) |
|
|
54
54
|
| **v0.4.4** | Same era + **book matches 0.4.3 wire** — no new tool · catalogs named `health` → `echo` → `confirm_echo` |
|
|
55
55
|
| **v0.5** | Same era + **matching client completes MRTR** — `mrtr-client` finishes `confirm_echo` |
|
|
56
|
+
| **v0.6** | Same era + **the spec's own tests** — the official MCP conformance suite in CI ([Conformance](#conformance)) · cache hints on every list and read · declare what you answer · `rmcp` 3.10 |
|
|
57
|
+
| **v0.7** | Same era + **tools say what they do** — every tool carries all four annotation hints (read-only, not destructive, idempotent, closed world) · `confirm_echo` asks only clients that declare elicitation (else `-32021`) · `server/discover` stamped like the lists · a strict command line (`--version`, unknown arguments exit 2) |
|
|
56
58
|
|
|
57
59
|
## What BETTER means
|
|
58
60
|
|
|
59
61
|
1. **Protocol honesty** — claim 7/28 / `2026-07-28` only for surfaces you implement and test.
|
|
60
62
|
2. **Discover-compatible** — clients should use `ClientLifecycleMode::Discover` (or Auto → 7/28), not only legacy initialize.
|
|
61
|
-
3. **
|
|
63
|
+
3. **Cache hints by choice** — `server/discover`, `tools/list`, `resources/list`, `resources/templates/list`, `resources/read`, `skills/list` and `skills/get` return a positive `ttlMs` and `cacheScope` (static catalog → `public`). The SDK default is `ttlMs: 0` + `private`: valid, but it tells every client not to cache.
|
|
62
64
|
4. **Stable tool order** — same process, same order across N list calls.
|
|
63
|
-
5. **
|
|
65
|
+
5. **Annotated tools** — every tool sets `readOnlyHint`, `destructiveHint`, `idempotentHint` and `openWorldHint`. A tool with no hints gets the spec's defaults: it may write, may destroy, and reaches the outside world.
|
|
66
|
+
6. **Transports** — **stdio** (default) and **Streamable HTTP** (`--http`) in the **same 7/28 era**.
|
|
64
67
|
|
|
65
68
|
## Quickstart (≤10 min)
|
|
66
69
|
|
|
67
|
-
|
|
70
|
+
| Path | What it is |
|
|
71
|
+
|------|------------|
|
|
72
|
+
| **`cargo install mcp-better`** | **The install** — we are Cargo. crates.io, native binary on PATH. |
|
|
73
|
+
| **`npx mcp-better`** | **Suggested try** — no Rust, no compile. Not the install. |
|
|
74
|
+
| **npm** | A published **shim** so `npx` / some hosts can start the same binary. We do **not** offer `npm install` / `npm i -g`. |
|
|
75
|
+
|
|
76
|
+
### Try (suggested) — `npx`
|
|
68
77
|
|
|
69
78
|
```bash
|
|
70
|
-
# No Rust toolchain
|
|
79
|
+
# No Rust toolchain. Downloads the native binary from GitHub Releases.
|
|
71
80
|
npx mcp-better --help
|
|
72
81
|
npx mcp-better
|
|
73
|
-
# hosts: point stdio command at `npx` / `mcp-better` from the npm package
|
|
74
82
|
```
|
|
75
83
|
|
|
76
|
-
### From source / crates.io (Rust 1.
|
|
84
|
+
### From source / crates.io (Rust 1.88+)
|
|
77
85
|
|
|
78
86
|
```bash
|
|
79
87
|
git clone https://github.com/Wolfe-Jam/mcp-better.git
|
|
@@ -91,21 +99,20 @@ MCP_BETTER_BIN="$(pwd)/target/debug/mcp-better" cargo run --example http-smoke
|
|
|
91
99
|
MCP_BETTER_BIN="$(pwd)/target/debug/mcp-better" cargo run --example mrtr-client
|
|
92
100
|
```
|
|
93
101
|
|
|
94
|
-
**
|
|
102
|
+
**Install** (crates.io) — stdio default (Cursor / Claude Desktop):
|
|
103
|
+
|
|
104
|
+
**First `cargo install` compiles Rust deps once** (often 100+ units — `rmcp` / `tokio` / …, not 100 tools of ours). One-time; then the binary is instant. To skip that compile, **try** with `npx mcp-better` (above) — that is not the install.
|
|
95
105
|
|
|
96
106
|
```bash
|
|
97
107
|
cargo run --release
|
|
98
|
-
#
|
|
99
|
-
cargo install mcp-better --version 0.
|
|
108
|
+
# install from crates.io — first hit compiles deps once (see above):
|
|
109
|
+
cargo install mcp-better --version 0.7.0 --locked
|
|
110
|
+
mcp-better --version # mcp-better 0.7.0
|
|
100
111
|
mcp-better --help
|
|
101
112
|
# optional lying companion (teaching only — not for hosts):
|
|
102
|
-
# cargo install mcp-better --version 0.
|
|
103
|
-
# this tree is 0.5.0 (matching client). Registries stay 0.4.3 until tagged.
|
|
113
|
+
# cargo install mcp-better --version 0.7.0 --locked --bin mcp-worse
|
|
104
114
|
```
|
|
105
115
|
|
|
106
|
-
> First cargo install compiles the ecosystem once (not 100+ of our tools — just Rust deps). One-time wait; then you’re done.
|
|
107
|
-
> Prefer **no compile**? Use `npx mcp-better` (npm shim).
|
|
108
|
-
|
|
109
116
|
**Streamable HTTP** (local demo only — see [SECURITY.md](./SECURITY.md)):
|
|
110
117
|
|
|
111
118
|
```bash
|
|
@@ -118,9 +125,10 @@ cargo run --release -- --http
|
|
|
118
125
|
|
|
119
126
|
| How | Value |
|
|
120
127
|
|-----|--------|
|
|
121
|
-
| CLI | `mcp-better` (stdio) · `mcp-better --http` · `mcp-better --stdio` |
|
|
128
|
+
| CLI | `mcp-better` (stdio) · `mcp-better --http` · `mcp-better --stdio` · `--version` / `--help` win wherever they appear |
|
|
122
129
|
| Bare args | `http` / `stdio` (same meaning as flags) |
|
|
123
130
|
| Env | `MCP_TRANSPORT` or `MCP_BETTER_TRANSPORT` → `stdio` \| `http` (**`MCP_TRANSPORT` first** if both set) |
|
|
131
|
+
| Anything else | An unknown argument or transport value prints the error and exits **2**; nothing falls back to stdio silently |
|
|
124
132
|
| HTTP bind | `MCP_BETTER_HTTP_ADDR` — default **`127.0.0.1:8787`**. Do **not** use `0.0.0.0` unless you accept an unauthenticated open endpoint. |
|
|
125
133
|
|
|
126
134
|
## Tools
|
|
@@ -131,7 +139,9 @@ cargo run --release -- --http
|
|
|
131
139
|
| `echo` | Pure demo — returns `message` unchanged. |
|
|
132
140
|
| `confirm_echo` | Textbook **MRTR** (SEP-2322) — echo after mid-call confirm · sealed `requestState`. |
|
|
133
141
|
|
|
134
|
-
|
|
142
|
+
All three are annotated `readOnlyHint: true`, `destructiveHint: false`, `idempotentHint: true`, `openWorldHint: false`: they read only, change nothing and stay in the process.
|
|
143
|
+
|
|
144
|
+
## Protocol claims (v0.7.0 — same 7/28 era · the official conformance suite in CI)
|
|
135
145
|
|
|
136
146
|
| Surface | Status |
|
|
137
147
|
|---------|--------|
|
|
@@ -139,13 +149,34 @@ cargo run --release -- --http
|
|
|
139
149
|
| Transport | **stdio** (default) · **Streamable HTTP** (`--http`) |
|
|
140
150
|
| HTTP mode | Stateless for 7/28 · `json_response` · local **Host** guards |
|
|
141
151
|
| Routing headers | Streamable HTTP POSTs use **`Mcp-Method`** and **`Mcp-Name`** when naming a tool (SEP-2243); `http-smoke` asserts this happy path |
|
|
142
|
-
| Capabilities | **tools** · **resources** (skill docs) · **
|
|
143
|
-
|
|
|
144
|
-
|
|
|
152
|
+
| Capabilities | **tools** · **resources** (skill docs) · **skills** extension (SEP-2640, rmcp native) · prompts and completions **not declared** (`prompts/*`, `completion/complete` → method not found) |
|
|
153
|
+
| Cache hints | discover, tools, resources and skills: **`ttlMs=60000`**, **`cacheScope=public`** · tool order **`health`→`echo`→`confirm_echo`** (restart-stable) |
|
|
154
|
+
| Tool annotations | all four hints on every tool: read-only · not destructive · idempotent · closed world (`tests/handlers.rs`) |
|
|
155
|
+
| MRTR (optional) | **`confirm_echo`** — mid-call confirm · sealed `requestState` · asked only of clients that declare elicitation (else `-32021`) · matching client **`mrtr-client`** · [`docs/MRTR-CONFIRM-ECHO.md`](./docs/MRTR-CONFIRM-ECHO.md)
|
|
145
156
|
| Skills (optional) | **`mcp-better-lab`** · `skills/list` · digests · [`docs/SKILLS-OVER-MCP.md`](./docs/SKILLS-OVER-MCP.md) |
|
|
146
|
-
| Lying companion | **`mcp-worse`** —
|
|
157
|
+
| Lying companion | **`mcp-worse`** — reversed tool order (the lie) + the SDK defaults left in place: no cache hints of its own (the wire shows `ttlMs: 0` + `private`, valid but uninformative), no tool annotations, and `prompts/list` / `completion/complete` answered without being declared · stdio only · same `--version` · contrast-smoke only |
|
|
147
158
|
| OAuth / tasks | out of hero |
|
|
148
159
|
|
|
160
|
+
## Conformance
|
|
161
|
+
|
|
162
|
+
CI runs the official MCP conformance suite ([`@modelcontextprotocol/conformance`](https://github.com/modelcontextprotocol/conformance), pinned) against two binaries. Each run covers `--requirements 2026-07-28` (50 scenarios: 37 the suite scores, 13 it runs but does not score) and the two Skills scenarios (`sep-2640-skills-enumeration`, `sep-2640-skills-manifest`, an extension outside that set).
|
|
163
|
+
|
|
164
|
+
| Run | Binary | 2026-07-28 requirements | Skills |
|
|
165
|
+
|-----|--------|-------------------------|--------|
|
|
166
|
+
| Conformance build | [`conformance/`](./conformance/): `mcp-better-conformance` | **100%, no baseline:** 196 checks pass across the 50 scenarios, none fail or warn; the suite itself skips one scenario (`tasks-status-notifications`, 0 checks) | 38 of 38 |
|
|
167
|
+
| Textbook | `mcp-better`, what you install | the 37 scored scenarios: 74 checks pass; 33 fail or warn, each listed in [`conformance-baseline.yml`](./conformance-baseline.yml) as `fixture` or `not declared` | 38 of 38 |
|
|
168
|
+
|
|
169
|
+
**What each run measures.** Most scenarios call tools, prompts and resources that exist only in the suite's reference server (`test_*`, `test://…`), and the 13 unscored ones are the Tasks extension and three pending scenarios. The official SDKs pass those with a separate server that carries the fixtures; `mcp-better-conformance` is that server for mcp-better. Its fixtures, capabilities and Tasks are adapted from the Rust MCP SDK's conformance server (Apache-2.0, [`conformance/NOTICE`](./conformance/NOTICE)); `BetterServer` serves mcp-better's three tools, the skill resource and Skills. So the 100% mostly measures the fixtures and the shared transport (`mcp_better::http_config`). The textbook run and the Skills scenarios measure mcp-better's own code.
|
|
170
|
+
|
|
171
|
+
**Reading the textbook run.** `caching` is 7 of 8: the eighth check calls `prompts/list`, and mcp-better doesn't declare prompts, so it answers method-not-found (`not declared` in the baseline). `prompts-list` and `completion-complete` fail for the same reason. Every other failure is a missing suite fixture. The suite's MRTR scenarios use its own fixture tools, so `confirm_echo` is checked by the matching client (`examples/mrtr-client`), which declares elicitation, and by a handler test that a client without it gets `-32021` (missing required client capability).
|
|
172
|
+
|
|
173
|
+
```bash
|
|
174
|
+
bash scripts/conformance.sh # textbook + baseline
|
|
175
|
+
(cd conformance && cargo build) && \
|
|
176
|
+
MCP_BETTER_BIN="$(pwd)/conformance/target/debug/mcp-better-conformance" \
|
|
177
|
+
MCP_CONFORMANCE_BASELINE='' bash scripts/conformance.sh # conformance build, strict
|
|
178
|
+
```
|
|
179
|
+
|
|
149
180
|
## Textbook
|
|
150
181
|
|
|
151
182
|
The book is the app is the book — [`textbook/`](./textbook/) (Season 1 · [doctrine](./textbook/DOCTRINE-book-is-app.md)).
|
|
@@ -181,6 +212,8 @@ export PATH="$HOME/.cargo/bin:$PATH"
|
|
|
181
212
|
bash scripts/ci.sh
|
|
182
213
|
```
|
|
183
214
|
|
|
215
|
+
The ship bar needs Node 18+ and network: it fetches the official MCP conformance suite with `npx` (pinned version) and, if installed, runs [`rust-mcp-preflight`](https://github.com/Wolfe-Jam/rust-mcp-preflight) on `server.json` (it reads crates.io and the MCP Registry).
|
|
216
|
+
|
|
184
217
|
## BEST
|
|
185
218
|
|
|
186
219
|
For persistent, versionable AI project context beyond a protocol textbook:
|
|
@@ -200,4 +233,8 @@ For persistent, versionable AI project context beyond a protocol textbook:
|
|
|
200
233
|
|
|
201
234
|
## License
|
|
202
235
|
|
|
203
|
-
MIT — see [LICENSE](./LICENSE).
|
|
236
|
+
MIT — see [LICENSE](./LICENSE). Except [`conformance/`](./conformance/) (the unpublished conformance build), which is Apache-2.0: see [`conformance/NOTICE`](./conformance/NOTICE).
|
|
237
|
+
|
|
238
|
+
---
|
|
239
|
+
|
|
240
|
+
[](https://wolfe-jam.github.io/agent-business-card/?repo=Wolfe-Jam/mcp-better)
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mcp-better",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"mcpName": "io.github.Wolfe-Jam/mcp-better",
|
|
5
|
-
"description": "
|
|
5
|
+
"description": "Rust MCP textbook for 2026-07-28: annotated tools, MCP conformance suite in CI. AAIF contribution. npm shim downloads the native binary from GitHub Releases.",
|
|
6
6
|
"license": "MIT",
|
|
7
|
-
"author": "Wolfe-Jam <
|
|
7
|
+
"author": "Wolfe-Jam <team@faf.one>",
|
|
8
8
|
"homepage": "https://github.com/Wolfe-Jam/mcp-better",
|
|
9
9
|
"repository": {
|
|
10
10
|
"type": "git",
|