modelcontextprotocol

A set of development rules for Model Context Protocol, a standard way for applications to expose tools, data, and prompts to an AI assistant. The rules describe server capabilities, structure, communication methods, and coding practices.

In plain words
What is it for?
Use it when developing an MCP server that exposes API operations or other data to an AI assistant. It covers resources, callable tools, prompts, transports, and recommended project structure.
Why use it?
It provides shared guidance for building MCP servers consistently. This helps keep servers stateless, type-safe, asynchronous, and compatible with standard connections.

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/yangkyeongmo/mcp-server-openmetadata/modelcontextprotocol
Clone the repo
git clone --depth 1 https://github.com/yangkyeongmo/mcp-server-openmetadata

Made for: Cursor.

Per session 2,509 This file is loaded in full into every session.
When invoked 2,509 The same file — it is already loaded in full.
Security scan A 1 finding. Scan, not verified.
Origin 94% copy Near-identical to another mod 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.02509 $0.02509
Opus 5 $0.01255 $0.01255
Sonnet 5 $0.00502 $0.00502
Haiku 4.5 $0.00251 $0.00251

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

Security

Grade A, and why

modelcontextprotocol scanned grade A with 1 finding 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 2d 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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

from urllib.parse import urlparse
Origin

This is a copy

94% identical to modelcontextprotocol — 6 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

.cursor/rules/modelcontextprotocol.mdc · 445 lines

How it starts

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

At the start of every response, say "APPLIED MODELCONTEXTPROTOCOL RULE".

Model Context Protocol (MCP) Server Development Rules and Guidelines

Overview

This document provides comprehensive rules, guidelines, and best practices for developing Model Context Protocol (MCP) servers, based on the official MCP specification and the Apache Airflow MCP server implementation.

Core MCP Concepts

1. MCP Server Capabilities

MCP servers can provide three main types of capabilities:

  1. Resources: File-like data that can be read by clients (like API responses or file contents)
  2. Tools: Functions that can be called by the LLM (with user approval)
  3. Prompts: Pre-written templates that help users accomplish specific tasks

2. Architecture Principles

  • Stateless Design: Servers should be stateless and handle each request independently
  • Standard Transport: Use stdio or SSE transport protocols as defined in the MCP specification
  • Type Safety: Leverage Python type hints for automatic tool definition generation
  • Async First: Use asynchronous programming patterns for better performance

Development Guidelines

1. Project Structure

Follow this recommended project structure:

project-root/
├── src/
│   ├── __init__.py
│   ├── __main__.py
│   ├── main.py              # CLI entry point
│   ├── server.py            # FastMCP server instance
│   ├── enums.py             # Project enums
│   ├── envs.py              # Environment configuration
│   └── [domain]/            # Domain-specific modules
│       ├── __init__.py
│       ├── client.py        # External API client setup
│       └── [feature].py     # Feature-specific tool implementations
├── pyproject.toml
├── README.md
├── Makefile
└── @modelcontextprotocol.mdc  # This file

2. Tool Implementation Standards

Tool Function Signature

All tool functions must follow this pattern:

from typing import Any, List, Optional, Union
import mcp.types as types

async def tool_name(
    required_param: str,
    optional_param: Optional[str] = None
) -> List[Union[types.TextContent, types.ImageContent, types.EmbeddedResource]]:
    """
    Brief description of what the tool does.
    
    Args:
        required_param: Description of required parameter
        optional_param: Description of optional parameter
    
    Returns:
        List of MCP content types
    """
    # Implementation here
    return [types.TextContent(type="text", text=str(result))]

Read the full file on GitHub · 445 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. 2d ago First seen · 445 lines · 2,509 tokens per session scan A 543f528d9381

Subscribe to this mod's changes

modelcontextprotocol is a cursor rule published in the GitHub repository yangkyeongmo/mcp-server-openmetadata (24 stars, last pushed 1y ago), licensed MIT. It adds 2,509 tokens to every session, about $0.0125 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). It is 94% identical to modelcontextprotocol, differing in 6 lines, and is treated as a copy.