mcp-development

mcp-development is a cursor rule for Cursor from floriscornel/todo-mcp. It costs 368 tokens per session, scanned A, original, MIT.

A set of coding rules for developing MCP tools, which let AI applications call external services through defined functions.

In plain words
What is it for?
Use it when adding MCP tools to define schemas with Zod, name tools consistently, return structured results, format timestamps, and report useful errors.
Why use it?
It encourages validated inputs, consistent tool names and responses, and clear handling of invalid requests or database failures.

Cursor rule for Cursor

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 rules/floriscornel/todo-mcp/mcp-development
Clone the repo
git clone --depth 1 https://github.com/floriscornel/todo-mcp

Made for: Cursor.

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 mcp-development

README.md
[![agentmods](https://agentmods.dev/badge/rules/floriscornel/todo-mcp/mcp-development.svg)](https://agentmods.dev/rules/floriscornel/todo-mcp/mcp-development)
Your own site
<a href="https://agentmods.dev/rules/floriscornel/todo-mcp/mcp-development"><img src="https://agentmods.dev/badge/rules/floriscornel/todo-mcp/mcp-development.svg" alt="Measured on agentmods" height="20"></a>
Per session 368 This file is loaded in full into every session.
When invoked 368 The same file — it is already loaded in full.
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.1 $0.00368 $0.00368
Opus 5 $0.00184 $0.00184
Sonnet 5 $0.00074 $0.00074
Haiku 4.5 $0.00037 $0.00037

Measured 5d ago against content hash 1249eeb90161, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

mcp-development 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 5d 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.

.cursor/rules/mcp-development.mdc · 65 lines

What it actually says

MCP Development Patterns

Tool Definition Structure

When adding new MCP tools:

  1. Tool Registration:

    server.tool(
      "toolName",
      "Clear description of what this tool does",
      { /* Zod schema for parameters */ },
      async (params) => { /* implementation */ }
    );
    
  2. Parameter Validation:

    • Use Zod schemas for all parameters
    • Provide clear descriptions for each parameter
    • Include validation constraints (min/max length, etc.)
    • Set sensible defaults where appropriate
  3. Response Format:

    • Always return structured responses
    • Include metadata when helpful
    • Use consistent error handling
    • Format dates with relative timestamps

Error Handling Patterns

  • Throw descriptive errors for invalid inputs
  • Include available options in error messages
  • Handle database connection failures gracefully
  • Validate foreign key relationships

Tool Naming Conventions

  • Use camelCase for tool names
  • Start with verb: getTasks, createList, completeTask
  • Be specific about what the tool does
  • Match the function to the tool name

Response Formatting

  • Use formatRelativeTime() for timestamps
  • Sort results consistently (priority first, then date)
  • Include relevant metadata in responses
  • Structure JSON responses with proper nesting

Testing MCP Tools

  • Test parameter validation
  • Test error scenarios
  • Test database interactions
  • Verify response formats
  • Test edge cases (empty results, missing data)

MCP Server Configuration

  • Set proper server name and version
  • Initialize database before starting server
  • Use stdio transport for Claude integration
  • Include proper metadata in responses

@src/index.ts

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. 5d ago First seen · 65 lines · 368 tokens per session scan A 1249eeb90161

Subscribe to this mod's changes

mcp-development is a cursor rule published in the GitHub repository floriscornel/todo-mcp (2 stars, last pushed 6mo ago), licensed MIT. It adds 368 tokens to every session, about $0.0018 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.