Skip to content

[Request]: tidy the local MCP surface for agents #590

Closed

Description

@jimhoyd

Problem or use case

  • The server always replies protocolVersion: "2025-11-25", even when the client requests 2025-06-18 or 2024-11-05; the spec says to echo a supported requested version (real-client impact not verified).
  • Naming mixes styles: recipes_list/recipes_show vs search_recipes/list_skills/get_example; review_project vs CLI review. target means a URL path in inspect/explain but a deploy target in capabilities/get_context. get_context, the documented first call, is last in tools/list (25 tools, ~9.8 KB).
  • Results are JSON strings inside text content, with no structuredContent; no tool runs fixtures.
  • Three skills ship (skills/urlcode, .claude/skills/urlcode-authoring, urlcode-operations) but list_skills returns only urlcode, with a description that differs from its SKILL.md; llms.txt points at the .claude/skills pair while AGENTS.md points at skills/urlcode.
  • AGENTS.md says "Do not read or grep llms-full.txt"; the authoring skill says to search its headings.

Proposed behavior and alternatives

Negotiate protocol versions; adopt one naming scheme (with aliases for a release) and a distinct name for path vs deploy target; list get_context first; add structuredContent and a read-only run_tests; list all shipped skills with their real descriptions and point every surface at the same ones; pick one rule for llms-full.txt.

Activity

  1. added
    enhancement
    ai-first
    needs-decision
    on Sep 23, 2026
  2. jimhoyd commented on Sep 24, 2026

    @jimhoyd
    CollaboratorAuthor

    Triage decision: accept a compatibility-preserving MCP cleanup. Negotiate a supported client-requested protocol version; establish a canonical verb-first tool vocabulary with unambiguous names for path versus deployment target; retain legacy names as aliases for one release. Put get_context first, return structuredContent, add read-only tool fixtures, and publish one canonical inventory of every shipped skill using its actual description. Align AGENTS/LLMS references with that inventory. This is implementation work rather than a remaining product decision; removing needs-decision.

  3. removed
    needs-decision
    on Sep 24, 2026
  4. jimhoyd commented on Sep 24, 2026

    @jimhoyd
    CollaboratorAuthor

    Landed in #602 (#602): initialize now echoes back the client's requested protocolVersion when it's one of 2025-11-25, 2025-06-18, 2025-03-26 or 2024-11-05, and otherwise answers with 2025-11-25. That's the negotiation half of this issue.

    Per the triage decision above, the rest (canonical verb-first tool names with legacy aliases, get_context first, structuredContent, read-only tool fixtures, one canonical skill inventory) is still open and unimplemented.

  5. jimhoyd commented on Sep 24, 2026

    @jimhoyd
    CollaboratorAuthor

    Opened #633 implementing the rest of the triage decision (protocol negotiation already landed in #602): canonical verb-first tool names with pre-#590 names kept as working, deprecated aliases; deployTarget as the canonical deployment-target argument (old target still accepted, deprecated) distinct from explain's path-valued target; get_context first in tools/list; structuredContent on every tools/call reply whose result is a JSON object; a new read-only run_tests tool; and a real three-skill canonical inventory from each SKILL.md's own frontmatter description, with llms.txt/llms-full.txt guidance reconciled across surfaces. PR: #633.

  6. jimhoyd commented on Sep 25, 2026

    @jimhoyd
    CollaboratorAuthor

    Follow-up on the requested read-only run_tests contract, reproduced at core main a324cd8 (Node 26.8.2, macOS).

    The default local MCP advertises run_tests with readOnlyHint true, destructiveHint false, openWorldHint false and the promise that it never writes project files. It is available without --allow-authoring. A synthetic temporary project with one ordinary trusted function and one fixture successfully wrote a marker file beside its own module during run_tests; the fixture passed. This is normal trusted Node behavior, not a sandbox escape.

    A temporary URLCODE_DATA_DIR is a convention and cleanup facility, not confinement of trusted function or extension effects. SECURITY.md still says read-only MCP does not execute project code in the host, and TOOLING.md says there is no route-execution tool without authoring mode; both conflict with this default tool.

    Please resolve the execution contract explicitly: keep default inspection non-executing and gate test execution under an operator execution opt-in, or accurately advertise test execution and its possible side effects and update the security/docs claims. Do not weaken or redefine sandbox:true to conceal the distinction. Tests should cover an ordinary trusted handler with a synthetic side effect, not only the current redirect fixture and directory-list comparison.

    No secrets, external services or non-review project files were touched. Recording the contract discrepancy on its existing feature issue rather than as an exploit report; no independent security assessment is claimed.

  7. jimhoyd commented on Sep 25, 2026

    @jimhoyd
    CollaboratorAuthor

    Closing as done on main. Every item is in packages/core/src/mcp.ts:

    • negotiateProtocolVersion echoes the version the client requested.
    • get_context is listed first.
    • list_recipes and get_recipe are implemented.
    • review is implemented, and review_project still works as a legacy alias.
    • deployTarget is accepted, and target still works as a deprecated alias.
    • Results include structuredContent.
    • run_tests is implemented.
    • list_skills lists every bundled skill.

    If you find a remaining gap, reopen this with that specific item.


    Generated by Claude Code

  8. jimhoyd commented on Sep 25, 2026

    @jimhoyd
    CollaboratorAuthor

    The decision review confirms the specific remaining item is the execution contract, not the existence of run_tests or the completed MCP vocabulary cleanup. Reopening per the latest closure comment's invitation to identify a remaining gap.

    The synthetic reproduction above at a324cd8 invoked an ordinary trusted Node function through default run_tests and wrote a marker beside its module. Yet tools/list advertises readOnlyHint:true, destructiveHint:false, openWorldHint:false and promises no project writes. Scratch URLCODE_DATA_DIR is not confinement. This is expected trusted execution, not a sandbox escape.

    Acceptance: distinguish static inspection from project execution; make execution authority an explicit operator decision (or document an explicitly chosen default), accurately annotate run_tests and any aliases, reconcile SECURITY.md/TOOLING.md/generated instructions, and add a synthetic trusted-handler side-effect fixture proving the advertised boundary. Preserve sandbox:true isolation. The implementation checklist being complete does not settle these behavioral claims.

  9. jimhoyd commented on Sep 25, 2026

    @jimhoyd
    CollaboratorAuthor

    The execution-contract gap reopened here is fixed in #762.

    • run_tests is off by default. It is offered only when the operator starts the server with --allow-authoring. Calling it without the flag is refused, and the error names the flag.
    • The runners that execute code are labelled honestly. run_tests, run_validate, run_test and run_audit all execute trusted project code. They are now annotated readOnlyHint: false, destructiveHint: true, idempotentHint: false and openWorldHint: true, and their descriptions say the scratch data directory is not confinement.
    • The file-writing authoring tools keep their previous annotations.
    • Default MCP is back to inspection only, and runs no project code. SECURITY.md, TOOLING.md, AI-AUTHORING.md, SPECIFICATION.md, the agent guide and the skill all match this.
    • New tests use a synthetic trusted function that writes a marker file.
      • In default mode, 13 project-reading tool calls leave no marker, and run_tests is absent and refused.
      • With --allow-authoring, run_tests runs and the marker appears.
    • sandbox: true is unchanged.

    Closing. Reopen this with the specific item if anything else is left.


    Generated by Claude Code

  10. added a commit that references this issue on Sep 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    ai-firstenhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions