Borrowing it
Nothing to install: this file belongs to GitGuardian/ggmcp. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/GitGuardian/ggmcp/main/.windsurfrulesgit clone --depth 1 https://github.com/GitGuardian/ggmcpWrote 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.
[](https://agentmods.dev/rules/gitguardian/ggmcp/windsurfrules)<a href="https://agentmods.dev/rules/gitguardian/ggmcp/windsurfrules"><img src="https://agentmods.dev/badge/rules/gitguardian/ggmcp/windsurfrules/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.
<a href="https://agentmods.dev/rules/gitguardian/ggmcp/windsurfrules"><img src="https://agentmods.dev/badge/rules/gitguardian/ggmcp/windsurfrules.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.01437 | $0.01437 |
| Opus 5.5 | $0.00575 | $0.00575 |
| Sonnet 5.5 | $0.00287 | $0.00287 |
| Haiku 4.5 | $0.00144 | $0.00144 |
Grade A, and why
windsurfrules 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 1mo 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.
- Incorrect: `requests.get(...)` How it starts
The opening of the file, as written. The whole thing — 230 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Cursor Rules for MCP Tool Generation
Tool Definition Guidelines
-
Use the @mcp.tool() decorator
- All tools must be defined using the
@mcp.tool()decorator - This properly registers the function as an MCP tool
- Include proper type hints for parameters and return values
- All tools must be defined using the
-
Methods must be async
- All tool methods should be defined as async functions
- Use
async deffor all tool definitions - Use appropriate async libraries and patterns (e.g., httpx.AsyncClient instead of requests)
-
Include descriptive docstrings
- Each tool must have a clear, descriptive docstring
- Docstrings should explain what the tool does and describe parameters
Examples of correct tool implementations:
@mcp.tool()
async def calculate_bmi(weight_kg: float, height_m: float) -> float:
"""Calculate BMI given weight in kg and height in meters"""
return weight_kg / (height_m**2)
@mcp.tool()
async def fetch_weather(city: str) -> str:
"""Fetch current weather for a city"""
async with httpx.AsyncClient() as client:
response = await client.get(f"https://api.weather.com/{city}")
return response.text
Common Mistakes to Avoid
-
Don't use synchronous functions
- Incorrect:
def my_tool(): - Correct:
async def my_tool():
- Incorrect:
-
Don't forget the decorator
- Incorrect:
async def my_tool(): - Correct:
@mcp.tool()\nasync def my_tool():
- Incorrect:
-
Don't use blocking HTTP libraries
- Incorrect:
requests.get(...) - Correct:
async with httpx.AsyncClient() as client: await client.get(...)
- Incorrect:
title: "Don't use uvicorn or fastapi with MCP" description: "MCP has native server capabilities, external web servers are not needed" severity: warning
Don't use uvicorn or fastapi with MCP/FastMCP
Rule Details
MCP and FastMCP have their own server implementations that can run directly without external web servers like uvicorn or fastapi.
❌ Incorrect
# Incorrect: Using uvicorn with MCP
import uvicorn
from mcp.server.fastmcp import FastMCP
mcp = FastMCP("MyServer")
if __name__ == "__main__":
uvicorn.run(mcp.app, host="0.0.0.0", port=8000) # Wrong
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.
- 1mo ago First seen · 230 lines · 1,437 tokens per session scan A cc5fe8e60e4d
windsurfrules is a cursor rule published in the GitHub repository GitGuardian/ggmcp (41 stars, last pushed 4d ago), licensed MIT. It adds 1,437 tokens to every session, about $0.0057 per session on Opus 5.5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-11.
Other cursor rules, from other repositories
about-codebase
General information about the Lineai MCP Server codebase and its purpose.
toc-readme
When updating README.md, the table of contents should contain only the second-level headings below it.
runwhen-infrastructure
Infrastructure conventions for scripts targeting Kubernetes and databases via RunWhen runners.
php-client-implementation
Guidelines for implementing MCP clients in PHP.
cursor_rules
Guidelines for creating and maintaining Cursor rules to ensure consistency and effectiveness.
validate-design-early
Ask for design approval before implementing 100+ lines.