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.
git clone --depth 1 https://github.com/koizumikento/reinfolib-mcpWrote 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/koizumikento/reinfolib-mcp/fastmcp-library)<a href="https://agentmods.dev/rules/koizumikento/reinfolib-mcp/fastmcp-library"><img src="https://agentmods.dev/badge/rules/koizumikento/reinfolib-mcp/fastmcp-library/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/koizumikento/reinfolib-mcp/fastmcp-library"><img src="https://agentmods.dev/badge/rules/koizumikento/reinfolib-mcp/fastmcp-library.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.00000 | $0.01583 |
| Opus 5 | $0.00000 | $0.00792 |
| Sonnet 5 | $0.00000 | $0.00317 |
| Haiku 4.5 | $0.00000 | $0.00158 |
Grade A, and why
fastmcp-library 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 12d 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.
How it starts
The opening of the file, as written. The whole thing — 222 lines — stays where its author put it; the contents beside it link to each section on GitHub.
FastMCPライブラリ使用ガイド
FastMCPの基本構造
FastMCPは、Model Context Protocol (MCP) サーバーとクライアントを構築するためのPythonフレームワークです。
基本的なサーバー設定
from fastmcp import FastMCP
mcp = FastMCP("不動産情報ライブラリMCPサーバー")
@mcp.tool
def greet(name: str) -> str:
"""指定された名前で挨拶を返します。"""
return f"こんにちは、{name}さん!"
if __name__ == "__main__":
mcp.run(transport="stdio") # stdio, http, sse をサポート
ツール定義パターン
1. 基本的なツール定義
@mcp.tool
def add(a: int, b: int) -> int:
"""2つの整数を加算します。"""
return a + b
2. カスタム名とメタデータ付きツール
@mcp.tool(
name="find_products",
description="製品カタログを検索します",
tags={"catalog", "search"},
meta={"version": "1.2", "author": "team"}
)
def search_products(query: str, category: str | None = None) -> list[dict]:
"""製品検索の実装"""
return [{"id": 1, "name": "商品名"}]
3. ツールアノテーション
from mcp.types import ToolAnnotations
@mcp.tool(
annotations=ToolAnnotations(
title="計算ツール",
readOnlyHint=True, # 読み取り専用
destructiveHint=False, # 破壊的でない
idempotentHint=True, # 冪等性あり
openWorldHint=False # 閉じた世界
)
)
def calculate_sum(a: float, b: float) -> float:
"""数値の合計を計算します。"""
return a + b
リソース定義
@mcp.resource("system://status")
def get_system_status() -> dict:
"""システムステータスを返します。"""
return {"status": "正常稼働中"}
@mcp.resource("weather://{city}")
def get_weather(city: str) -> str:
"""指定都市の天気を取得します。"""
return f"{city}の天気情報"
プロンプト定義
@mcp.prompt
def ask_about_topic(topic: str) -> str:
"""トピックについて説明を求めるプロンプトを生成します。"""
return f"'{topic}'について詳しく説明してください。"
@mcp.prompt(
name="analyze_request",
description="データ分析リクエストを生成",
tags={"analysis", "data"}
)
def data_analysis_prompt(data_uri: str, analysis_type: str = "summary") -> str:
"""データ分析のプロンプトを生成します。"""
return f"{data_uri}のデータに対して{analysis_type}分析を実行してください。"
コンテキストの使用
from fastmcp import Context
@mcp.tool
async def process_data(uri: str, ctx: Context) -> str:
"""コンテキストを使用したデータ処理。"""
# ログ出力
await ctx.info(f"処理開始: {uri}")
await ctx.debug("デバッグ情報")
# プログレス報告
await ctx.report_progress(50, 100, "処理中...")
# リソース読み取り
data = await ctx.read_resource(uri)
# 状態管理
ctx.set_state("processing", True)
return f"処理完了: {uri}"
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.
- 12d ago First seen · 222 lines · 1,583 tokens per session scan A bfe8aeb286dd
fastmcp-library is a cursor rule published in the GitHub repository koizumikento/reinfolib-mcp (2 stars, last pushed 16d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,583 tokens. 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.
Other cursor rules, from other repositories
mcp-debugging
The mcp-debug agent provides essential tools to test and explore MCP (Model Context Protocol) servers. This guide focuses on using the agent to debug MCP server behavior and functionality.
architecture
This document outlines the fundamental architectural principles and patterns for the mcp-debug codebase. Adherence to these guidelines is mandatory to maintain a clean, decoupled, and testable system.
mcp-development
Cursor rule "mcp-development" from floriscornel/todo-mcp, covering mcp development patterns, tool definition structure, error handling patterns, tool naming conventions and response formatting.
api-patterns
Cursor rule "api-patterns" from LeadMagic/smartlead-mcp-server, covering 🏗️ smartlead api development patterns & best practices, 🎯 quick reference, 🔥 most important patterns, 🏗️ smartlead api client architecture and 🛠️ base client pattern.
get-api-route
Guidelines for implementing GET API routes in Next.js.
logging
How to do backend logging.