add-mcp-tool

add-mcp-tool is a skill for Claude Code, Codex from plumbkit/plumb. It costs 55 tokens per session (1,116 once invoked), scanned A, original, MIT.

A checklist for adding, renaming, or removing an MCP tool in the plumb codebase. MCP tools are small functions that let an agent use project capabilities.

In plain words
What is it for?
Use it when creating or changing a plumb MCP tool, including its interface, input handling, execution steps, profile visibility, tests, and docs.
Why use it?
It prevents incomplete changes by identifying the required code, registration, tests, and documentation updates.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/plumbkit/plumb/add-mcp-tool
Any agent
npx skills add plumbkit/plumb --skill add-mcp-tool
Clone the repo
git clone --depth 1 https://github.com/plumbkit/plumb

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for add-mcp-tool

README.md
[![agentmods](https://agentmods.dev/badge/skills/plumbkit/plumb/add-mcp-tool.svg)](https://agentmods.dev/skills/plumbkit/plumb/add-mcp-tool)
Your own site
<a href="https://agentmods.dev/skills/plumbkit/plumb/add-mcp-tool"><img src="https://agentmods.dev/badge/skills/plumbkit/plumb/add-mcp-tool.svg" alt="Measured on agentmods" height="20"></a>
Per session 55 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,116 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00055 $0.01116
Opus 5 $0.00028 $0.00558
Sonnet 5 $0.00011 $0.00223
Haiku 4.5 $0.00006 $0.00112

Measured 4d ago against content hash f1af830cd38a, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

add-mcp-tool scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/skills/add-mcp-tool/SKILL.md · 86 lines

How it starts

The opening of the file, as written. The whole thing — 86 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Adding an MCP tool to plumb

1. File layout and the Tool interface

Create internal/tools/<name>.go implementing the Tool interface from internal/mcp/tools.go: Name, Description, InputSchema, Execute.

The Description is the authoritative per-tool reference clients read via tools/list — describe what the tool does and its params/quirks. Workflow steering that spans multiple tools (routing prose like "prefer this over grep") belongs in a skill, not the description — see the boundary rule in private/docs/internal/skills-strategy.md (plumb-ops): "Tool descriptions describe the tool. Skills describe the workflow of combining tools."

2. The thin-orchestrator Execute() pattern

Every Tool.Execute() must be a thin orchestrator over named, individually-testable steps (parse/validate → domain logic → presentation). PRs that add a monolithic Execute() are non-conforming. Each inner function stays under gocyclo 15.

func (t *Foo) Execute(ctx context.Context, raw json.RawMessage) (string, error) {
    args, err := parseFooArgs(raw)        // JSON decode + shape validation only
    if err != nil { return "", err }
    if err := args.validate(); err != nil { return "", err }
    res, err := t.run(ctx, args)          // domain logic — no formatting
    if err != nil { return "", err }
    return formatFooResult(res), nil      // presentation — no logic
}

3. WriteDeps for write/edit tools

Write/edit tools take a single WriteDeps parameter — don't grow the constructor with positional params. Adding a new cross-cutting concern (locking, LSP notify, quality analysis, rate limiting, …) means adding a field to WriteDeps, not a new argument threaded through every write tool's constructor.

4. Register the tool, and decide lean vs hidden

Register in registerAllTools (internal/cli/conn_register.go), called from handleConn (internal/cli/daemon.go); write tools use the shared writeDeps.

Then decide whether the new tool belongs in the lean profile. Read the mutation-lane rule in internal/tools/profile.go: a read-only commodity tool may be hidden freely under the lean profile, but a mutation tool whose native fallback is unsafe (bypasses plumb's per-path locks, LSP notify, or the transaction WAL) must stay in LeanTools. LeanTools doubles as the Claude Code AlwaysLoad (never-deferred) set — editing it changes both which clients see the tool under the lean profile and whether Claude Code pins its schema up front instead of deferring it to ToolSearch. Don't add a tool to LeanTools casually; it is a shared, high-stakes list.

Read the full file on GitHub · 86 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 86 lines · 55 tokens per session scan A f1af830cd38a

Subscribe to this mod's changes

add-mcp-tool is a skill published in the GitHub repository plumbkit/plumb (4 stars, last pushed 4d ago), licensed MIT. It adds 55 tokens to every session and 1,116 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

nim-mcp-tools

Use for Nim symbol navigation, diagnostics, and type resolution. MANDATORY: Use specialized MCP tools (nimFindSymbols, nimFindReferences, nimListSymbols, nimCheckFile, nimCheckProject, nimFindTypeDefinition) first; fall back to grep only on error or user confirmation.

nim-lang/langserver · 64 tokens

ty-docs

Skill "ty-docs" from pledgeandgrow/pledge-skills, covering ty — python type checker and language server, key features, quick reference, configuration and pyproject.toml.

pledgeandgrow/pledge-skills · 34 tokens

yaml

Validate and understand schema-backed YAML (Kubernetes, Flux, and JSON-Schema configs) with the yayamlls language server. Use when editing or reviewing .yaml/.yml files, diagnosing schema validation errors, configuring .yayamlls.yaml, suppressing a diagnostic, or working with Flux HelmRelease / Kustomization rendering.

home-operations/yayamlls · 69 tokens

lsp-config

This skill should be used when the user asks about "LSP configuration", "language server setup", "adding LSP to Claude Code", "mason config import", "lspconfig migration", "lspctl plugin", or discusses Claude Code LSP integration and troubleshooting.

blvp/cc-lspctl · 60 tokens

feishu

Work with Feishu or Lark bots, docs, sheets, bitables, approval flows, and OpenAPI/MCP setup without hardcoding credentials.

Hmbown/CodeWhale · 33 tokens

interview

Ask one useful structured question at a time only when material product/implementation choices are genuinely missing; remember answers and produce a brief/spec. Discoverable facts should be investigated instead of asked.

Hmbown/CodeWhale · 40 tokens