Skip to content

Make MCP metadata configurable via --tools/--prompts/--examples overrides#29

Merged
neilberkman merged 2 commits intoneilberkman:mainfrom
mmmnorthmark:mcp-config-overrides
Feb 2, 2026
Merged

Make MCP metadata configurable via --tools/--prompts/--examples overrides#29
neilberkman merged 2 commits intoneilberkman:mainfrom
mmmnorthmark:mcp-config-overrides

Conversation

@millerforce-bot
Copy link
Contributor

@millerforce-bot millerforce-bot commented Feb 1, 2026

What this PR does

This adds optional runtime overrides for the MCP server metadata that is currently static in server.json and compiled into the binary.

New clippy mcp-server flags:

  • --tools <path>: override MCP tool descriptions + argument descriptions
  • --prompts <path>: override MCP prompt descriptions + argument descriptions
  • --examples <path>: override MCP examples shown to clients

Why this is useful

  • Enables teams to adapt Clippy's MCP UX to local conventions and workflows without forking behavior code
  • Keeps tool handlers stable while allowing prompt/tool wording to evolve quickly
  • Makes it easier to tune assistant guidance for different clients/environments

Validation behavior

  • All override files are validated at startup
  • Invalid JSON fails fast with a clear error
  • --tools validation requires complete coverage of every MCP tool + every expected argument description
  • --prompts validation requires complete coverage of every MCP prompt + every expected argument description
  • Unknown/missing tools, prompts, or arguments fail startup

Included artifacts

  • New metadata loader and override validator in cmd/clippy/mcp/metadata.go
  • MCP server now consumes metadata dynamically in cmd/clippy/mcp/server.go
  • New CLI flags for mcp-server in cmd/clippy/main.go
  • Example override files:
    • examples/clippy.mcp.tools.json
    • examples/clippy.mcp.prompts.json
    • examples/clippy.mcp.examples.json
  • server.json updated to include buffer_cut so metadata stays in sync with server tools

Usage

clippy mcp-server \
  --tools examples/clippy.mcp.tools.json \
  --prompts examples/clippy.mcp.prompts.json \
  --examples examples/clippy.mcp.examples.json

Notes

  • No behavior changes to the underlying tool handlers.
  • This is metadata/configuration flexibility only.

@neilberkman neilberkman merged commit ce5d29d into neilberkman:main Feb 2, 2026
1 check passed
@neilberkman
Copy link
Owner

@mmmnorthmark thanks for the contribution. Will be released in 1.6.5.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants