@event4u/agent-config 1.40.0 → 1.41.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/.claude-plugin/marketplace.json +1 -1
- package/CHANGELOG.md +33 -0
- package/README.md +47 -21
- package/docs/catalog.md +4 -3
- package/docs/contracts/file-ownership-matrix.json +27 -0
- package/docs/contracts/mcp-discovery-phase-notice.md +56 -0
- package/docs/contracts/mcp-tool-stub-envelope.md +78 -0
- package/docs/getting-started.md +1 -1
- package/docs/setup/mcp-client-config.md +94 -13
- package/docs/setup/mcp-cloud-setup.md +32 -1
- package/docs/setup/per-ide/claude-desktop.md +32 -7
- package/package.json +1 -1
- package/scripts/_lib/script_output.py +15 -11
- package/scripts/ai_council/session.py +14 -8
- package/scripts/chat_history.py +29 -53
- package/scripts/command_suggester/settings.py +15 -13
- package/scripts/compile_router.py +13 -9
- package/scripts/compress.py +22 -19
- package/scripts/council_cli.py +9 -3
- package/scripts/mcp_parity_smoke.py +20 -2
- package/scripts/mcp_server/catalog.py +125 -0
- package/scripts/mcp_server/consumer_tool_catalog.json +275 -0
- package/scripts/mcp_server/telemetry.py +128 -0
- package/scripts/mcp_server/tools.py +474 -15
- package/scripts/mcp_telemetry_health.py +214 -0
- package/scripts/mcp_telemetry_query.py +203 -0
- package/scripts/mcp_telemetry_store.py +211 -0
- package/scripts/memory_signal.py +12 -10
- package/scripts/pack_mcp_content.py +18 -4
- package/templates/claude_desktop_config.json.template +4 -3
package/CHANGELOG.md
CHANGED
|
@@ -318,6 +318,39 @@ our recommendation order, not its support status.
|
|
|
318
318
|
users" tension without removing any path that an existing user
|
|
319
319
|
might rely on.
|
|
320
320
|
|
|
321
|
+
## [1.41.0](https://github.com/event4u-app/agent-config/compare/1.40.0...1.41.0) (2026-05-12)
|
|
322
|
+
|
|
323
|
+
### Features
|
|
324
|
+
|
|
325
|
+
* **mcp/worker:** add optional MCP-Token Bearer auth ([134c6ee](https://github.com/event4u-app/agent-config/commit/134c6ee34ee5fc1f1809f5be72df1ac82ad0cca6))
|
|
326
|
+
* **mcp:** L2+L4 — implement 7 read-only tools + catalog sync ([44a0082](https://github.com/event4u-app/agent-config/commit/44a00827a7e19051e58e2a5866a37e8c6e4fb1a6))
|
|
327
|
+
* **mcp:** K1+K2 — telemetry SQLite store + CLI dashboard ([e53f321](https://github.com/event4u-app/agent-config/commit/e53f321d3d6a7fb5c95a97232898fbda15cd129b))
|
|
328
|
+
* **mcp:** J6 — telemetry healthcheck + consumer discovery notice ([41f02f7](https://github.com/event4u-app/agent-config/commit/41f02f773feb6248ea315e0820d2a81d960b98c9))
|
|
329
|
+
* **mcp:** J1-J4 — discovery catalog + stub envelope + telemetry ([38aff65](https://github.com/event4u-app/agent-config/commit/38aff651138d8c20929cab88ac437f3106ba44c3))
|
|
330
|
+
|
|
331
|
+
### Documentation
|
|
332
|
+
|
|
333
|
+
* **mcp:** remove public endpoint, document self-hosting + Bearer auth ([6c5d7b0](https://github.com/event4u-app/agent-config/commit/6c5d7b04231e9e274265e7f0481502455085f748))
|
|
334
|
+
|
|
335
|
+
### Refactoring
|
|
336
|
+
|
|
337
|
+
* **scripts:** migrate readers to centralized agent_settings loader ([7849c03](https://github.com/event4u-app/agent-config/commit/7849c03f282cdaf344ac56056d55cb1c63e17eba))
|
|
338
|
+
|
|
339
|
+
### Tests
|
|
340
|
+
|
|
341
|
+
* **mcp:** L3 — hermetic shape contracts for 7 RO tools ([0d3edc9](https://github.com/event4u-app/agent-config/commit/0d3edc9fb1f98df80a4eb503a0dd4c868d2f85f2))
|
|
342
|
+
* **mcp:** J5 — acceptance tests for catalog, envelope, telemetry ([806e4bb](https://github.com/event4u-app/agent-config/commit/806e4bb2bdd2292dfb75eddd9b4eff6073f16a00))
|
|
343
|
+
|
|
344
|
+
### Chores
|
|
345
|
+
|
|
346
|
+
* **mcp/taskfile:** add mcp:cloud:secret-put task ([dcffef5](https://github.com/event4u-app/agent-config/commit/dcffef5c384bf75261189b035417593418c8c36c))
|
|
347
|
+
* **roadmap:** flip Phase 2 + Phase 3 of road-to-mcp-full-coverage ([2ce23bc](https://github.com/event4u-app/agent-config/commit/2ce23bcaf7482aeb095cc85d106a78ac5c0d2682))
|
|
348
|
+
* **roadmap:** flip Phase 1 of road-to-mcp-full-coverage (J1–J6) ([707f5c0](https://github.com/event4u-app/agent-config/commit/707f5c002f827b2600cfcf6019d3d22166b46fc2))
|
|
349
|
+
* **ci:** regenerate derived artifacts and fix command-count drift ([dd4eeac](https://github.com/event4u-app/agent-config/commit/dd4eeac96094d99bae318b2160a914be46caead9))
|
|
350
|
+
* **roadmaps:** archive road-to-portable-dev-preferences ([77f4cf1](https://github.com/event4u-app/agent-config/commit/77f4cf1825962503891973800450c3ca769e2adc))
|
|
351
|
+
|
|
352
|
+
Tests: 3173 (+32 since 1.40.0)
|
|
353
|
+
|
|
321
354
|
## [1.40.0](https://github.com/event4u-app/agent-config/compare/1.39.0...1.40.0) (2026-05-11)
|
|
322
355
|
|
|
323
356
|
### Features
|
package/README.md
CHANGED
|
@@ -90,38 +90,64 @@ Install directly in your agent for global, cross-project use:
|
|
|
90
90
|
→ [Full getting started guide](docs/getting-started.md) ·
|
|
91
91
|
[More examples & expected behavior](docs/showcase.md)
|
|
92
92
|
|
|
93
|
-
###
|
|
93
|
+
### Self-hosted MCP on Cloudflare — zero local install
|
|
94
94
|
|
|
95
|
-
Skills, commands, rules, and guidelines
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
95
|
+
Skills, commands, rules, and guidelines can be served as an MCP endpoint
|
|
96
|
+
from your own Cloudflare Worker — no clone, no `task mcp:setup`, no
|
|
97
|
+
Python venv on the consumer machine, just an HTTP URL any MCP client
|
|
98
|
+
(Claude Desktop, Claude Code, Cursor, Zed, Continue, hosted agents)
|
|
99
|
+
talks to.
|
|
99
100
|
|
|
100
|
-
|
|
101
|
-
|
|
101
|
+
The Worker source lives in `workers/mcp/`; deploying it to your own
|
|
102
|
+
Cloudflare account takes ~5 minutes:
|
|
103
|
+
|
|
104
|
+
```bash
|
|
105
|
+
task mcp:cloud:login # one-time, opens browser
|
|
106
|
+
task mcp:cloud:setup # check → r2-create → r2-verify → whoami
|
|
107
|
+
task mcp:cloud:secret-put # set MCP-Token (Bearer auth, recommended)
|
|
108
|
+
# Then deploy via CI — see operator guide below.
|
|
102
109
|
```
|
|
103
110
|
|
|
104
|
-
|
|
111
|
+
After deploy your Worker lives at
|
|
112
|
+
`https://agent-config-mcp.<your-account>.workers.dev` (or a custom
|
|
113
|
+
domain you wire in Step 7 of the operator guide). Verify:
|
|
105
114
|
|
|
106
115
|
```bash
|
|
107
|
-
curl https://agent-config-mcp
|
|
116
|
+
curl https://agent-config-mcp.<your-account>.workers.dev
|
|
108
117
|
# → { "ok": true, "name": "agent-config-mcp", "release_key": "v…", … }
|
|
109
118
|
```
|
|
110
119
|
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
[`docs/setup/mcp-
|
|
114
|
-
|
|
115
|
-
[`docs/setup/mcp-cloud-
|
|
116
|
-
Operator setup (account, R2, secrets) — [`docs/setup/mcp-cloud-setup.md`](docs/setup/mcp-cloud-setup.md).
|
|
120
|
+
Per-client setup snippets (Claude Desktop, Claude Code, Cursor, Zed,
|
|
121
|
+
Continue) — [`docs/setup/mcp-client-config.md`](docs/setup/mcp-client-config.md).
|
|
122
|
+
URL shapes (latest vs. pinned `/v<X.Y.Z>`) — [`docs/setup/mcp-cloud-endpoints.md`](docs/setup/mcp-cloud-endpoints.md).
|
|
123
|
+
Full operator walkthrough (account, R2, GitHub secrets, deploy) —
|
|
124
|
+
[`docs/setup/mcp-cloud-setup.md`](docs/setup/mcp-cloud-setup.md).
|
|
117
125
|
Experimental — A0-cloud contract lives at `docs/contracts/mcp-cloud-scope.md` (internal reference only per `STABILITY.md`).
|
|
118
126
|
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
127
|
+
#### Lock your Worker behind a Bearer token
|
|
128
|
+
|
|
129
|
+
Without auth, any MCP client that knows your `*.workers.dev` URL can
|
|
130
|
+
read the catalog. For private deploys, set the `MCP-Token` secret and
|
|
131
|
+
the Worker will require `Authorization: Bearer <token>` on every POST:
|
|
132
|
+
|
|
133
|
+
```bash
|
|
134
|
+
task mcp:cloud:secret-put # wraps `npx wrangler secret put MCP-Token --name agent-config-mcp`
|
|
135
|
+
# wrangler prompts for the value interactively — never passed via argv.
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
Once the secret is set, every client config block needs the token in
|
|
139
|
+
its headers — see [`docs/setup/mcp-client-config.md`](docs/setup/mcp-client-config.md) § Bearer auth for the
|
|
140
|
+
per-client snippets (Claude Desktop, Claude Code, Cursor, Zed,
|
|
141
|
+
Continue). The `GET /` liveness probe stays open so health checks keep
|
|
142
|
+
working without the token.
|
|
143
|
+
|
|
144
|
+
> **Scope — Lite, not Full.** The Worker serves the read-only governance
|
|
145
|
+
> surface (skills · commands · rules · guidelines · contexts) as MCP
|
|
146
|
+
> prompts and resources, plus a small set of read-only tools (`memory_lookup`,
|
|
147
|
+
> `chat_history_read`, `list_*`, `read_resource_body`). It does **not**
|
|
148
|
+
> execute any of the ~112 Python scripts that ship with the package
|
|
149
|
+
> (linters, audits, `task ci`, work-engine hooks, …). Those require the
|
|
150
|
+
> full local install per [Quickstart](#quickstart). See
|
|
125
151
|
> `docs/contracts/mcp-cloud-scope.md` (internal reference only per
|
|
126
152
|
> `STABILITY.md`) for the execution-safety boundary.
|
|
127
153
|
|
package/docs/catalog.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# agent-config — Public Catalog
|
|
2
2
|
|
|
3
|
-
Consumer-facing catalog of all **
|
|
3
|
+
Consumer-facing catalog of all **406 public artefacts** shipped by
|
|
4
4
|
this package. Internal package-maintenance rules and deprecation shims
|
|
5
5
|
are excluded.
|
|
6
6
|
|
|
@@ -248,7 +248,7 @@ are excluded.
|
|
|
248
248
|
| rule | [`user-interaction`](../.agent-src/rules/user-interaction.md) | auto | Asking the user a question, presenting options, or summarizing progress — numbered-options Iron Law, single-recommendation rule, progress indicators |
|
|
249
249
|
| rule | [`verify-before-complete`](../.agent-src/rules/verify-before-complete.md) | always | Verify before completion — run tests and quality tools before claiming done |
|
|
250
250
|
|
|
251
|
-
## Commands (
|
|
251
|
+
## Commands (106)
|
|
252
252
|
|
|
253
253
|
| kind | name | cluster | description |
|
|
254
254
|
|---|---|---|---|
|
|
@@ -349,7 +349,8 @@ are excluded.
|
|
|
349
349
|
| command | [`rule-compliance-audit`](../.agent-src/commands/rule-compliance-audit.md) | | Audit rule trigger quality, simulate activation, detect overlaps, and find never-activating rules |
|
|
350
350
|
| command | [`set-cost-profile`](../.agent-src/commands/set-cost-profile.md) | | Change the cost_profile in .agent-settings.yml — shows each profile's meaning and applies the selection |
|
|
351
351
|
| command | [`sync-agent-settings`](../.agent-src/commands/sync-agent-settings.md) | | Sync `.agent-settings.yml` against the current template + profile — adds new sections/keys, preserves user values, shows a diff before writing |
|
|
352
|
-
| command | [`sync-gitignore`](../.agent-src/commands/sync-gitignore.md) |
|
|
352
|
+
| command | [`sync-gitignore:fix`](../.agent-src/commands/sync-gitignore/fix.md) | cluster: sync-gitignore | Scrub legacy pre-`/agents/` patterns from the consumer's .gitignore (inside or outside the managed block) and re-sync the canonical entries |
|
|
353
|
+
| command | [`sync-gitignore`](../.agent-src/commands/sync-gitignore.md) | cluster: sync-gitignore | Sync the `event4u/agent-config` block in the consumer project's .gitignore — adds missing entries, preserves user-added lines, shows a diff before writing |
|
|
353
354
|
| command | [`tests:create`](../.agent-src/commands/tests/create.md) | cluster: tests | Write meaningful tests for the changes in the current branch |
|
|
354
355
|
| command | [`tests:execute`](../.agent-src/commands/tests/execute.md) | cluster: tests | Run PHP tests inside the Docker container |
|
|
355
356
|
| command | [`tests`](../.agent-src/commands/tests.md) | cluster: tests | Tests orchestrator — routes to create, execute |
|
|
@@ -591,6 +591,12 @@
|
|
|
591
591
|
"load_context": [],
|
|
592
592
|
"load_context_eager": []
|
|
593
593
|
},
|
|
594
|
+
".agent-src.uncompressed/commands/sync-gitignore/fix.md": {
|
|
595
|
+
"kind": "command",
|
|
596
|
+
"rule_type": null,
|
|
597
|
+
"load_context": [],
|
|
598
|
+
"load_context_eager": []
|
|
599
|
+
},
|
|
594
600
|
".agent-src.uncompressed/commands/tests.md": {
|
|
595
601
|
"kind": "command",
|
|
596
602
|
"rule_type": null,
|
|
@@ -4075,6 +4081,27 @@
|
|
|
4075
4081
|
"via": "self",
|
|
4076
4082
|
"depth": 0
|
|
4077
4083
|
},
|
|
4084
|
+
{
|
|
4085
|
+
"source": ".agent-src.uncompressed/commands/sync-gitignore.md",
|
|
4086
|
+
"target": ".agent-src.uncompressed/commands/sync-gitignore/fix.md",
|
|
4087
|
+
"type": "READ_ONLY",
|
|
4088
|
+
"via": "body_link",
|
|
4089
|
+
"depth": 1
|
|
4090
|
+
},
|
|
4091
|
+
{
|
|
4092
|
+
"source": ".agent-src.uncompressed/commands/sync-gitignore/fix.md",
|
|
4093
|
+
"target": ".agent-src.uncompressed/commands/sync-gitignore.md",
|
|
4094
|
+
"type": "READ_ONLY",
|
|
4095
|
+
"via": "body_link",
|
|
4096
|
+
"depth": 1
|
|
4097
|
+
},
|
|
4098
|
+
{
|
|
4099
|
+
"source": ".agent-src.uncompressed/commands/sync-gitignore/fix.md",
|
|
4100
|
+
"target": ".agent-src.uncompressed/commands/sync-gitignore/fix.md",
|
|
4101
|
+
"type": "WRITE",
|
|
4102
|
+
"via": "self",
|
|
4103
|
+
"depth": 0
|
|
4104
|
+
},
|
|
4078
4105
|
{
|
|
4079
4106
|
"source": ".agent-src.uncompressed/commands/tests.md",
|
|
4080
4107
|
"target": ".agent-src.uncompressed/commands/tests.md",
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# MCP Discovery-Phase Notice
|
|
2
|
+
|
|
3
|
+
**Audience:** MCP consumers integrating with `event4u/agent-config` — host
|
|
4
|
+
applications, CLIs, agents calling our stdio server or the Cloudflare Worker.
|
|
5
|
+
**Status:** active during Phase 1 of
|
|
6
|
+
[`road-to-mcp-full-coverage`](../../agents/roadmaps/road-to-mcp-full-coverage.md).
|
|
7
|
+
|
|
8
|
+
## What you will see
|
|
9
|
+
|
|
10
|
+
`tools/list` advertises ~20 tools. Most return a `not_implemented` envelope when
|
|
11
|
+
called — wire shape in [`mcp-tool-stub-envelope`](mcp-tool-stub-envelope.md).
|
|
12
|
+
This is intentional. Phase 1 is *discovery*: every call — implemented, stub, or
|
|
13
|
+
unknown — is logged so Phase 2's implementation cut is derived from real
|
|
14
|
+
consumer behaviour, not guesses.
|
|
15
|
+
|
|
16
|
+
## What we need from you
|
|
17
|
+
|
|
18
|
+
**Keep calling the tools you would naturally call.** A call against a stub is
|
|
19
|
+
not a failed integration; it is a vote. Telemetry records carry
|
|
20
|
+
`{tool_name, client_id_hash, ts, transport, outcome}` — no payload bodies, no
|
|
21
|
+
raw identifiers (J4 in the roadmap). Three outcomes are logged:
|
|
22
|
+
|
|
23
|
+
- `implemented` — a real handler ran.
|
|
24
|
+
- `stub` — catalog entry, no transport handler; you received the envelope.
|
|
25
|
+
- `latent_demand` — name not in the catalog at all. **The most valuable
|
|
26
|
+
signal.** If you want a tool that does not exist, call it — do not work
|
|
27
|
+
around the absence silently.
|
|
28
|
+
|
|
29
|
+
## How to verify telemetry is flowing
|
|
30
|
+
|
|
31
|
+
On any host running the stdio server:
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
python3 scripts/mcp_telemetry_health.py
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
Healthy → exit 0 with the 24 h count. Silent → exit 1; treat as an alert.
|
|
38
|
+
Wire it into Sentry, a GitHub Actions cron, a mailer, or `launchd` — whatever
|
|
39
|
+
you already trust. Worker telemetry lands in Cloudflare Workers Logs
|
|
40
|
+
(structured `mcp.telemetry` lines); query via the dashboard or `wrangler tail`.
|
|
41
|
+
|
|
42
|
+
## Phase 1 → Phase 2 gate
|
|
43
|
+
|
|
44
|
+
When the gate fires (≥ 4 weeks of healthy telemetry, ≥ 500 logged attempts,
|
|
45
|
+
≥ 50 distinct `client_id_hash` values), the council ranks tools by demand and
|
|
46
|
+
picks the implementation cut. Tools above the line move from stub → real;
|
|
47
|
+
tools below stay stubbed and may be removed. Silent windows ≥ 24 h refuse the
|
|
48
|
+
K3 gate and restart the observation period — that is why the healthcheck
|
|
49
|
+
output matters.
|
|
50
|
+
|
|
51
|
+
## Contact
|
|
52
|
+
|
|
53
|
+
Open an issue against
|
|
54
|
+
[`event4u-app/agent-config`](https://github.com/event4u-app/agent-config) with
|
|
55
|
+
the `mcp-discovery` label if a call returns something other than the documented
|
|
56
|
+
envelope or if `latent_demand` is not landing for a tool you call.
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
---
|
|
2
|
+
stability: experimental
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# MCP Tool Stub Envelope — Phase 1 Discovery Contract
|
|
6
|
+
|
|
7
|
+
> **Status:** Active · governs Phase 1 (J1–J6) of
|
|
8
|
+
> [`road-to-mcp-full-coverage.md`](../../agents/roadmaps/road-to-mcp-full-coverage.md).
|
|
9
|
+
> **Stability:** experimental — internal index reference only per
|
|
10
|
+
> `STABILITY.md`.
|
|
11
|
+
|
|
12
|
+
## Purpose
|
|
13
|
+
|
|
14
|
+
Locks the wire shape of the `not_implemented` envelope returned by
|
|
15
|
+
`tools/call` when a consumer agent invokes a catalog entry that has no
|
|
16
|
+
implementation on the active transport. Every denied call returns a
|
|
17
|
+
structured payload with a recovery hint, never a silent 404 and never
|
|
18
|
+
a 500.
|
|
19
|
+
|
|
20
|
+
## Source of truth
|
|
21
|
+
|
|
22
|
+
`scripts/mcp_server/consumer_tool_catalog.json` (schema_version 1).
|
|
23
|
+
Both the stdio server and the Cloud Worker bundle (`workers/mcp/`,
|
|
24
|
+
packed by `scripts/pack_mcp_content.py`) read from this file. The
|
|
25
|
+
manifest returned by `tools/list` is byte-identical apart from
|
|
26
|
+
per-tool `implemented_on` metadata.
|
|
27
|
+
|
|
28
|
+
## Catalog entry
|
|
29
|
+
|
|
30
|
+
```json
|
|
31
|
+
{
|
|
32
|
+
"name": "<snake_case>",
|
|
33
|
+
"description": "<≤500 chars; agent-facing>",
|
|
34
|
+
"side_effect": "ro | fs-write | shell",
|
|
35
|
+
"implemented_on": ["stdio"],
|
|
36
|
+
"input_schema": { "type": "object", "...": "JSON Schema draft-7" }
|
|
37
|
+
}
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
`implemented_on` lists transports where a real handler is wired;
|
|
41
|
+
missing transports return the envelope.
|
|
42
|
+
|
|
43
|
+
## Envelope wire shape
|
|
44
|
+
|
|
45
|
+
```json
|
|
46
|
+
{
|
|
47
|
+
"code": "not_implemented",
|
|
48
|
+
"tool": "<catalog name>",
|
|
49
|
+
"transport": "stdio | worker",
|
|
50
|
+
"install_hint": "<copyable shell command>",
|
|
51
|
+
"alternative": "stdio",
|
|
52
|
+
"message": "<one-sentence explainer>"
|
|
53
|
+
}
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
Stdio returns this as the JSON-RPC `result` (SDK wraps in
|
|
57
|
+
`TextContent`); the Worker returns it as `error.data` alongside
|
|
58
|
+
`code: -32601`. Field invariants: `code` is the frozen literal
|
|
59
|
+
`not_implemented`; `tool` echoes the caller; `transport` is set per
|
|
60
|
+
surface; `install_hint` comes from the catalog's `install_hint_stdio`
|
|
61
|
+
field; `alternative` is the frozen literal `stdio` until Phase 3.
|
|
62
|
+
Consumer agents must drive logic from `code`, not `message`.
|
|
63
|
+
|
|
64
|
+
## Unknown-tool / latent-demand path
|
|
65
|
+
|
|
66
|
+
A call to a name not in the catalog returns JSON-RPC error `-32601`
|
|
67
|
+
with the same envelope shape, `code: "unknown_tool"`. Both transports
|
|
68
|
+
log the attempt with `outcome: "latent_demand"` so Phase 2 can
|
|
69
|
+
promote unforeseen names.
|
|
70
|
+
|
|
71
|
+
## Acceptance
|
|
72
|
+
|
|
73
|
+
- Both transports return `code == "not_implemented"` for every
|
|
74
|
+
catalog entry whose `implemented_on` excludes the transport.
|
|
75
|
+
- Both transports return `code == "unknown_tool"` for any name not in
|
|
76
|
+
the catalog.
|
|
77
|
+
- Schema version bumps on any incompatible field rename; new optional
|
|
78
|
+
fields are compatible.
|
package/docs/getting-started.md
CHANGED
|
@@ -153,7 +153,7 @@ Your agent now understands slash commands:
|
|
|
153
153
|
| `/quality-fix` | Run and fix all quality checks |
|
|
154
154
|
| `/chat-history` | Inspect the persistent chat-history log (read-only `show`) |
|
|
155
155
|
|
|
156
|
-
→ [Browse all
|
|
156
|
+
→ [Browse all 106 active commands](../.agent-src/commands/)
|
|
157
157
|
|
|
158
158
|
---
|
|
159
159
|
|
|
@@ -1,8 +1,17 @@
|
|
|
1
|
-
# MCP Client Config —
|
|
1
|
+
# MCP Client Config — Self-hosted agent-config Worker
|
|
2
2
|
|
|
3
|
-
Connect any MCP-capable client to
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
Connect any MCP-capable client to your own `agent-config-mcp` Cloudflare
|
|
4
|
+
Worker. Read-only, identity-stable per release. Optional Bearer-token
|
|
5
|
+
auth — see [§ Bearer auth](#bearer-auth) below.
|
|
6
|
+
|
|
7
|
+
> **No public endpoint.** This package ships the Worker source under
|
|
8
|
+
> `workers/mcp/`, but does **not** operate a shared hosted MCP server.
|
|
9
|
+
> Deploy your own per [`mcp-cloud-setup.md`](mcp-cloud-setup.md) — your
|
|
10
|
+
> URL will be `https://agent-config-mcp.<your-account>.workers.dev`
|
|
11
|
+
> (or a custom domain you wire up in Step 7).
|
|
12
|
+
>
|
|
13
|
+
> In every snippet below, **replace `https://your-worker.workers.dev`
|
|
14
|
+
> with your actual deployment URL**.
|
|
6
15
|
|
|
7
16
|
For URL shapes (latest vs. pinned `/v<X.Y.Z>`) see
|
|
8
17
|
[`mcp-cloud-endpoints.md`](mcp-cloud-endpoints.md). For operator
|
|
@@ -26,14 +35,29 @@ look for MCP server config inside `.agent-settings.yml`.
|
|
|
26
35
|
| MCP client config (this page) | client-specific path per section above | the MCP client at startup | which MCP servers to talk to (name + URL / command) |
|
|
27
36
|
| `.agent-settings.yml` | consumer project root (`<repo>/.agent-settings.yml`) | the agent at runtime (Claude / Cursor / …) | per-developer preferences: `name`, `ide`, `cost_profile`, `personal.autonomy`, `pipelines.skill_improvement`, `caveman.speak_scope`, … |
|
|
28
37
|
|
|
29
|
-
The
|
|
30
|
-
|
|
38
|
+
The Worker is **stateless** and **project-agnostic** — it serves the
|
|
39
|
+
same skill / rule / command catalog to every client. Personalization
|
|
31
40
|
happens agent-side after the MCP delivers its content blob; the Worker
|
|
32
41
|
itself does not read `.agent-settings.yml`.
|
|
33
42
|
|
|
34
43
|
First-time setup of `.agent-settings.yml` runs through `/onboard`;
|
|
35
44
|
template drift is handled by `/sync-agent-settings`.
|
|
36
45
|
|
|
46
|
+
## Bearer auth
|
|
47
|
+
|
|
48
|
+
If you set the `MCP-Token` secret on your Worker (via
|
|
49
|
+
`task mcp:cloud:secret-put`), every POST request must carry the header
|
|
50
|
+
`Authorization: Bearer <token>`. The `GET /` liveness probe stays
|
|
51
|
+
unauthenticated.
|
|
52
|
+
|
|
53
|
+
Add the header to each client below by appending the per-client header
|
|
54
|
+
snippet shown in its section. Treat the token like any other secret —
|
|
55
|
+
keep it out of repo files and shared dotfiles; prefer an env var
|
|
56
|
+
(`MCP_TOKEN`) sourced from a password manager or shell init.
|
|
57
|
+
|
|
58
|
+
If your Worker has **no** `MCP-Token` secret set, skip the header
|
|
59
|
+
snippets — every POST is accepted as-is.
|
|
60
|
+
|
|
37
61
|
## Claude Desktop
|
|
38
62
|
|
|
39
63
|
Edit `~/Library/Application Support/Claude/claude_desktop_config.json`
|
|
@@ -44,7 +68,24 @@ Edit `~/Library/Application Support/Claude/claude_desktop_config.json`
|
|
|
44
68
|
"mcpServers": {
|
|
45
69
|
"agent-config": {
|
|
46
70
|
"command": "npx",
|
|
47
|
-
"args": ["-y", "mcp-remote", "https://
|
|
71
|
+
"args": ["-y", "mcp-remote", "https://your-worker.workers.dev"]
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
With Bearer auth, add `--header`:
|
|
78
|
+
|
|
79
|
+
```json
|
|
80
|
+
{
|
|
81
|
+
"mcpServers": {
|
|
82
|
+
"agent-config": {
|
|
83
|
+
"command": "npx",
|
|
84
|
+
"args": [
|
|
85
|
+
"-y", "mcp-remote", "https://your-worker.workers.dev",
|
|
86
|
+
"--header", "Authorization: Bearer ${MCP_TOKEN}"
|
|
87
|
+
],
|
|
88
|
+
"env": { "MCP_TOKEN": "paste-token-here" }
|
|
48
89
|
}
|
|
49
90
|
}
|
|
50
91
|
}
|
|
@@ -60,7 +101,14 @@ Connector** with the URL directly — no `mcp-remote` wrapper needed.
|
|
|
60
101
|
Native HTTP transport — one command:
|
|
61
102
|
|
|
62
103
|
```bash
|
|
63
|
-
claude mcp add --transport http agent-config https://
|
|
104
|
+
claude mcp add --transport http agent-config https://your-worker.workers.dev
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
With Bearer auth:
|
|
108
|
+
|
|
109
|
+
```bash
|
|
110
|
+
|
|
111
|
+
|
|
64
112
|
```
|
|
65
113
|
|
|
66
114
|
Verify:
|
|
@@ -78,12 +126,14 @@ claude mcp list
|
|
|
78
126
|
{
|
|
79
127
|
"mcpServers": {
|
|
80
128
|
"agent-config": {
|
|
81
|
-
"url": "https://
|
|
129
|
+
"url": "https://your-worker.workers.dev",
|
|
130
|
+
"headers": { "Authorization": "Bearer paste-token-here" }
|
|
82
131
|
}
|
|
83
132
|
}
|
|
84
133
|
}
|
|
85
134
|
```
|
|
86
135
|
|
|
136
|
+
(Omit the `headers` block if your Worker has no `MCP-Token` secret.)
|
|
87
137
|
Reload Cursor (`Cmd+Shift+P → Reload Window`).
|
|
88
138
|
|
|
89
139
|
## Zed
|
|
@@ -96,12 +146,17 @@ Reload Cursor (`Cmd+Shift+P → Reload Window`).
|
|
|
96
146
|
"agent-config": {
|
|
97
147
|
"source": "custom",
|
|
98
148
|
"command": "npx",
|
|
99
|
-
"args": [
|
|
149
|
+
"args": [
|
|
150
|
+
"-y", "mcp-remote", "https://your-worker.workers.dev",
|
|
151
|
+
"--header", "Authorization: Bearer ${MCP_TOKEN}"
|
|
152
|
+
],
|
|
153
|
+
"env": { "MCP_TOKEN": "paste-token-here" }
|
|
100
154
|
}
|
|
101
155
|
}
|
|
102
156
|
}
|
|
103
157
|
```
|
|
104
158
|
|
|
159
|
+
Drop the `--header` / `env` pair when the Worker has no token set.
|
|
105
160
|
Zed has no native remote-MCP transport yet, so the `mcp-remote`
|
|
106
161
|
bridge is required.
|
|
107
162
|
|
|
@@ -113,19 +168,28 @@ bridge is required.
|
|
|
113
168
|
mcpServers:
|
|
114
169
|
- name: agent-config
|
|
115
170
|
command: npx
|
|
116
|
-
args:
|
|
171
|
+
args:
|
|
172
|
+
- "-y"
|
|
173
|
+
- mcp-remote
|
|
174
|
+
- https://your-worker.workers.dev
|
|
175
|
+
- --header
|
|
176
|
+
- "Authorization: Bearer ${MCP_TOKEN}"
|
|
177
|
+
env:
|
|
178
|
+
MCP_TOKEN: paste-token-here
|
|
117
179
|
```
|
|
118
180
|
|
|
181
|
+
Drop the `--header` / `env` keys when the Worker has no token set.
|
|
182
|
+
|
|
119
183
|
## Verify
|
|
120
184
|
|
|
121
185
|
After reload, every client should:
|
|
122
186
|
|
|
123
187
|
1. List `agent-config` under connectors / tools with a release-key
|
|
124
188
|
matching the live deploy. Probe the endpoint to see the current
|
|
125
|
-
release:
|
|
189
|
+
release (the `GET /` liveness probe is always unauthenticated):
|
|
126
190
|
|
|
127
191
|
```bash
|
|
128
|
-
curl https://
|
|
192
|
+
curl https://your-worker.workers.dev
|
|
129
193
|
# → { "ok": true, "release_key": "v…", "signature": "…", … }
|
|
130
194
|
```
|
|
131
195
|
|
|
@@ -134,6 +198,23 @@ After reload, every client should:
|
|
|
134
198
|
3. Expose rule + guideline + context resources under `rule://…`,
|
|
135
199
|
`guideline://…`, `context://…`.
|
|
136
200
|
|
|
201
|
+
With Bearer auth, a wrong/missing token returns HTTP 401 with body
|
|
202
|
+
`{"jsonrpc":"2.0","id":null,"error":{"code":-32001,"message":"Unauthorized"}}` —
|
|
203
|
+
quick way to confirm enforcement:
|
|
204
|
+
|
|
205
|
+
```bash
|
|
206
|
+
curl -X POST -H "content-type: application/json" \
|
|
207
|
+
-d '{"jsonrpc":"2.0","id":1,"method":"ping"}' \
|
|
208
|
+
https://your-worker.workers.dev
|
|
209
|
+
# → 401 Unauthorized
|
|
210
|
+
|
|
211
|
+
curl -X POST -H "content-type: application/json" \
|
|
212
|
+
-H "Authorization: Bearer $MCP_TOKEN" \
|
|
213
|
+
-d '{"jsonrpc":"2.0","id":1,"method":"ping"}' \
|
|
214
|
+
https://your-worker.workers.dev
|
|
215
|
+
# → 200 { "jsonrpc":"2.0","id":1,"result":{} }
|
|
216
|
+
```
|
|
217
|
+
|
|
137
218
|
If the client shows the connector but no prompts / resources,
|
|
138
219
|
re-probe the URL — a 5xx from the Worker indicates the deploy is
|
|
139
220
|
mid-roll, retry after a minute.
|
|
@@ -15,6 +15,7 @@ machine.
|
|
|
15
15
|
```sh
|
|
16
16
|
task mcp:cloud:login # one-time, opens browser
|
|
17
17
|
task mcp:cloud:setup # check → r2-create → r2-verify → whoami
|
|
18
|
+
task mcp:cloud:secret-put # optional but recommended — sets MCP-Token (Bearer auth)
|
|
18
19
|
# Copy account id from output → GitHub Secrets (see § GitHub Secrets)
|
|
19
20
|
# Create scoped API token (see § API Token) → GitHub Secrets
|
|
20
21
|
# Done. First `release: published` triggers the deploy.
|
|
@@ -114,7 +115,36 @@ Green smoke step → `latest.txt` repoints → release is live on
|
|
|
114
115
|
`*.workers.dev`. A red smoke step leaves `latest.txt` on the previous
|
|
115
116
|
release.
|
|
116
117
|
|
|
117
|
-
## Step 7 —
|
|
118
|
+
## Step 7 — Bearer auth (recommended)
|
|
119
|
+
|
|
120
|
+
Without auth, anyone who knows your `*.workers.dev` URL can read the
|
|
121
|
+
catalog. The Worker checks for an `MCP-Token` secret and, when set,
|
|
122
|
+
gates every POST behind `Authorization: Bearer <token>`. The `GET /`
|
|
123
|
+
liveness probe stays open so health checks keep working.
|
|
124
|
+
|
|
125
|
+
Generate a token (any high-entropy random string — `openssl rand -hex 32`
|
|
126
|
+
or your password manager) and set it on the Worker:
|
|
127
|
+
|
|
128
|
+
```sh
|
|
129
|
+
task mcp:cloud:secret-put
|
|
130
|
+
# wrangler prompts for the value interactively (stdin) — never passed
|
|
131
|
+
# via argv, never written to shell history.
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
This wraps `npx wrangler secret put MCP-Token --name agent-config-mcp`.
|
|
135
|
+
The secret is encrypted in Cloudflare and injected as `env["MCP-Token"]`
|
|
136
|
+
at request time; the source repo never sees the value.
|
|
137
|
+
|
|
138
|
+
Once set, every MCP client config needs the header — per-client
|
|
139
|
+
snippets (Claude Desktop, Claude Code, Cursor, Zed, Continue) live in
|
|
140
|
+
[`mcp-client-config.md`](mcp-client-config.md) § Bearer auth.
|
|
141
|
+
|
|
142
|
+
Rotate by re-running `task mcp:cloud:secret-put` with a fresh value;
|
|
143
|
+
the new secret takes effect on the next request (no redeploy needed).
|
|
144
|
+
To remove auth entirely, run
|
|
145
|
+
`npx wrangler secret delete MCP-Token --name agent-config-mcp`.
|
|
146
|
+
|
|
147
|
+
## Step 8 — DNS (optional, Phase 5.2)
|
|
118
148
|
|
|
119
149
|
Custom domain `mcp.<your-domain>` setup lives in
|
|
120
150
|
[`docs/setup/mcp-cloud-endpoints.md`](mcp-cloud-endpoints.md) § DNS
|
|
@@ -141,6 +171,7 @@ setup. Until cutover, the Worker serves on the free
|
|
|
141
171
|
| `task mcp:cloud:r2-create` | Create R2 bucket (idempotent) |
|
|
142
172
|
| `task mcp:cloud:r2-verify` | Verify R2 bucket exists |
|
|
143
173
|
| `task mcp:cloud:setup` | Full chain — check → r2 → whoami |
|
|
174
|
+
| `task mcp:cloud:secret-put` | Set the `MCP-Token` Bearer-auth secret (interactive) |
|
|
144
175
|
| `task mcp:cloud:dev` | Local `wrangler dev` on :8787 |
|
|
145
176
|
| `task mcp:cloud:deploy-dispatch TAG=v…` | Manual workflow trigger |
|
|
146
177
|
|
|
@@ -68,9 +68,15 @@ If the menu is empty:
|
|
|
68
68
|
|
|
69
69
|
## Step 3 — optional MCP server
|
|
70
70
|
|
|
71
|
-
Claude Desktop also speaks MCP. Wiring up
|
|
72
|
-
Worker exposes the **full** skill / rule /
|
|
73
|
-
on demand, on top of the 15 you installed
|
|
71
|
+
Claude Desktop also speaks MCP. Wiring up your own self-hosted
|
|
72
|
+
`agent-config-mcp` Cloudflare Worker exposes the **full** skill / rule /
|
|
73
|
+
command catalog (~480 items) on demand, on top of the 15 you installed
|
|
74
|
+
in Step 1.
|
|
75
|
+
|
|
76
|
+
Deploy the Worker first per [`../mcp-cloud-setup.md`](../mcp-cloud-setup.md) — your
|
|
77
|
+
URL will be `https://agent-config-mcp.<your-account>.workers.dev`
|
|
78
|
+
(or a custom domain you wire up in Step 7). Replace
|
|
79
|
+
`https://your-worker.workers.dev` below with that URL.
|
|
74
80
|
|
|
75
81
|
Edit `~/Library/Application Support/Claude/claude_desktop_config.json`
|
|
76
82
|
(macOS) or `%APPDATA%\Claude\claude_desktop_config.json` (Windows /
|
|
@@ -81,7 +87,25 @@ Linux is `~/.config/Claude/claude_desktop_config.json`):
|
|
|
81
87
|
"mcpServers": {
|
|
82
88
|
"agent-config": {
|
|
83
89
|
"command": "npx",
|
|
84
|
-
"args": ["-y", "mcp-remote", "https://
|
|
90
|
+
"args": ["-y", "mcp-remote", "https://your-worker.workers.dev"]
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
If you set the `MCP-Token` secret on the Worker (recommended — see
|
|
97
|
+
[`../mcp-cloud-setup.md`](../mcp-cloud-setup.md) § Bearer auth), add the header:
|
|
98
|
+
|
|
99
|
+
```json
|
|
100
|
+
{
|
|
101
|
+
"mcpServers": {
|
|
102
|
+
"agent-config": {
|
|
103
|
+
"command": "npx",
|
|
104
|
+
"args": [
|
|
105
|
+
"-y", "mcp-remote", "https://your-worker.workers.dev",
|
|
106
|
+
"--header", "Authorization: Bearer ${MCP_TOKEN}"
|
|
107
|
+
],
|
|
108
|
+
"env": { "MCP_TOKEN": "paste-token-here" }
|
|
85
109
|
}
|
|
86
110
|
}
|
|
87
111
|
}
|
|
@@ -89,11 +113,12 @@ Linux is `~/.config/Claude/claude_desktop_config.json`):
|
|
|
89
113
|
|
|
90
114
|
A pre-wired template ships at
|
|
91
115
|
[`templates/claude_desktop_config.json.template`](../../../templates/claude_desktop_config.json.template) —
|
|
92
|
-
copy
|
|
116
|
+
copy, swap the placeholder URL for your deploy, and uncomment the MCP
|
|
117
|
+
block.
|
|
93
118
|
|
|
94
119
|
Restart Claude Desktop. The 🔌 icon shows the connector under
|
|
95
120
|
**Settings → Connectors**. Full transport details (mcp-remote vs.
|
|
96
|
-
native HTTP) live in
|
|
121
|
+
native HTTP) and per-client Bearer-auth snippets live in
|
|
97
122
|
[`../mcp-client-config.md`](../mcp-client-config.md).
|
|
98
123
|
|
|
99
124
|
## Claude Desktop ↔ Claude Code config sharing
|
|
@@ -125,7 +150,7 @@ Desktop config**. Once Step 1 + Step 3 are done in Desktop:
|
|
|
125
150
|
inside Cowork sessions without a separate install.
|
|
126
151
|
- Cowork-specific limit (per Anthropic docs): MCP tools that write to
|
|
127
152
|
the local filesystem are sandboxed — read-only tools (the entire
|
|
128
|
-
|
|
153
|
+
`agent-config-mcp` Worker surface) work fine.
|
|
129
154
|
|
|
130
155
|
If a feature works in Desktop but not in Cowork, check that you're on
|
|
131
156
|
a paid plan — Cowork is gated, Desktop's free tier has the full
|