add-mcp-tool

add-mcp-tool is a skill for Claude Code from paulieb89/property-shared. It costs 35 tokens per session (604 once invoked), scanned A, original, MIT.

A coding guide for adding a new MCP tool to a property-data server. MCP is a standard way for AI assistants to call external tools.

In plain words
What is it for?
Use it when adding a property-related tool to mcp_server/server.py, including its inputs, property-service call, description, and returned data.
Why use it?
It removes the need to work out the server's required function shape, imports, data conversion, and result format.

Skill for Claude Code

Written for Claude Code: installed under .claude/.

Good fit Use it when adding a property-related tool to mcp_server/server.py, including its inputs, property-service call, description, and returned data.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/paulieb89/property-shared/add-mcp-tool
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.

Any agent
npx skills add paulieb89/property-shared --skill add-mcp-tool
Clone the repo
git clone --depth 1 https://github.com/paulieb89/property-shared

Made for: Claude Code.

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/paulieb89/property-shared/add-mcp-tool/github.svg)](https://agentmods.dev/skills/paulieb89/property-shared/add-mcp-tool)
Your own site
<a href="https://agentmods.dev/skills/paulieb89/property-shared/add-mcp-tool"><img src="https://agentmods.dev/badge/skills/paulieb89/property-shared/add-mcp-tool/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for add-mcp-tool

Your own site · 80×15
<a href="https://agentmods.dev/skills/paulieb89/property-shared/add-mcp-tool"><img src="https://agentmods.dev/badge/skills/paulieb89/property-shared/add-mcp-tool.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 35 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 604 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.1 $0.00035 $0.00604
Opus 5 $0.00017 $0.00302
Sonnet 5 $0.00007 $0.00121
Haiku 4.5 $0.00003 $0.00060

Measured 10d ago against content hash d96e27eaea0c, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, 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 10d 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 · 67 lines

How it starts

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

Add an MCP Tool

Add a new tool to mcp_server/server.py following the established FastMCP pattern.

Step 1: Add the Tool Function

Add to mcp_server/server.py. The docstring becomes the tool description for AI hosts.

@mcp.tool()
async def new_tool(
    required_param: str,
    optional_param: Optional[str] = None,
    limit: int = 50,
) -> ToolResult:
    """One-line description of what this tool does.

    Args:
        required_param: UK postcode (e.g. "SW1A 1AA")
        optional_param: Optional filter description
        limit: Maximum results (default 50)
    """
    from property_core import SomeService  # Step 2: lazy import

    # Step 3: call property_core (sync → thread)
    result = await anyio.to_thread.run_sync(
        partial(
            SomeService().method,
            param=required_param,
            limit=limit,
        )
    )

    # Step 4: build and return ToolResult
    data = result.model_dump(mode="json")
    summary = f"Found {result.count} items for {required_param}"
    return ToolResult(content=_content(summary, data), structured_content=data)

Key Rules

  1. Lazy importsfrom property_core import X inside the function body, never at module top level
  2. Async wrapping — use anyio.to_thread.run_sync(partial(...)) for sync property_core calls. For already-async functions, just await them directly.
  3. ToolResult construction:
    • content = human-readable summary + slimmed JSON (via _content() helper)
    • structured_content = full data dict for programmatic consumers
  4. Configuration-gated tools — if the data source needs credentials, check is_configured() and return early with an explanatory message if not configured. See property_epc() for the pattern.

Helpers Available

  • _slim(obj) — strips raw, images, floorplans from dicts recursively
  • _content(summary, data) — builds content string: summary + "\n\n" + slimmed JSON

Checklist

  • Tool added to mcp_server/server.py with @mcp.tool()
  • Function is async
  • Imports are lazy (inside function body)
  • Returns ToolResult with both content and structured_content
  • Summary line includes key metrics (count, median, etc.)
  • Docstring includes Args: section for all parameters

Read the full file on GitHub · 67 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. 10d ago First seen · 67 lines · 35 tokens per session scan A d96e27eaea0c

Subscribe to this mod's changes

add-mcp-tool is a skill published in the GitHub repository paulieb89/property-shared (16 stars, last pushed 5d ago), licensed MIT. It adds 35 tokens to every session and 604 once invoked, about $0.0002 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-30.

Related

Other skills, from other repositories

api-architect

Design and build production-grade RESTful and GraphQL APIs with proper authentication, error handling, rate limiting, and documentation. Use when designing APIs, creating API specifications, or reviewing API architecture.

skillsdirectory/awesome-ai-skills · 42 tokens

n8n-code-tool

Write JavaScript or Python for the n8n Custom Code Tool (@n8n/n8n-nodes-langchain.toolCode) — the AI-agent-callable tool, NOT the workflow Code node. Use when building a Code Tool attached to an AI Agent, writing code that an LLM will invoke, parsing the query input, returning a string result, defining an input schema…

czlonkowski/n8n-mcp · 221 tokens

n8n-subworkflows

Build reusable, composable n8n sub-workflows. Use when extracting shared logic, building anything multi-step or reused across workflows, or any workflow over 10 nodes — and whenever the user mentions sub-workflows, Execute Workflow, reuse, shared/common logic, modular workflows, "Define Below" inputs…

czlonkowski/n8n-mcp · 121 tokens

agent-communication-protocol

Open protocol for AI agent interoperability enabling standardized communication between agents, applications, and humans across different frameworks.

majiayu000/claude-skill-registry · 25 tokens

csharp-patterns

C#/.NET: LINQ, async/await, DI, records, nullable refs, ASP.NET Core, EF Core, MediatR. Triggers: C#, .NET, dotnet, ASP.NET, EF Core, LINQ, record type, IServiceCollection.

softspark/ai-toolkit · 61 tokens

sanity-best-practices

Sanity development best practices for schema design, GROQ queries, TypeGen, Visual Editing, images, Portable Text, Studio structure, localization, migrations, Sanity Functions, webhooks, Blueprints, and framework integrations such as Next.js, Nuxt, Astro, Remix, SvelteKit, Angular, Hydrogen, and the App SDK. Use this…

sanity-io/agent-toolkit · 164 tokens