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/tumf/grafana-loki-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/tumf/grafana-loki-mcp/mcp)<a href="https://agentmods.dev/rules/tumf/grafana-loki-mcp/mcp"><img src="https://agentmods.dev/badge/rules/tumf/grafana-loki-mcp/mcp/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/tumf/grafana-loki-mcp/mcp"><img src="https://agentmods.dev/badge/rules/tumf/grafana-loki-mcp/mcp.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.01474 | $0.01474 |
| Opus 5 | $0.00737 | $0.00737 |
| Sonnet 5 | $0.00295 | $0.00295 |
| Haiku 4.5 | $0.00147 | $0.00147 |
Grade A, and why
mcp 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 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.
Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
response = requests.post(url, headers=self.headers, json=params) How it starts
The opening of the file, as written. The whole thing — 148 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Model Context Protocol (MCP) の基礎知識
MCPとは
Model Context Protocol (MCP) は、大規模言語モデル (LLM) とツールを接続するための標準プロトコルです。MCPを使用することで、LLMはさまざまなツールやリソースにアクセスし、より複雑なタスクを実行できるようになります。
MCPの主要コンポーネント
MCPは以下の主要なコンポーネントで構成されています:
- MCPサーバー: ツール、リソース、プロンプトを提供するサーバー
- MCPクライアント: サーバーに接続し、ツールを呼び出すクライアント
- LLM: クライアントからの入力を処理し、必要に応じてツールを呼び出す
MCPの主な機能
1. ツール (Tools)
ツールは、LLMが実行できる特定の機能を提供します。例えば:
- データベースクエリの実行
- 外部APIの呼び出し
- ファイルの読み書き
- 計算の実行
各ツールは名前、説明、パラメータスキーマ、戻り値スキーマを持ちます。
2. リソース (Resources)
リソースは、LLMがアクセスできるデータソースです。例えば:
- ドキュメント
- データベース
- コードリポジトリ
- 設定ファイル
リソースはURIで識別され、読み取り/書き込みアクセスが可能です。
3. プロンプト (Prompts)
プロンプトは、LLMに特定のタスクを実行させるための指示です。MCPサーバーは、特定のユースケース向けに最適化されたプロンプトを提供できます。
MCPの通信フロー
- クライアントがサーバーに接続: MCPクライアントがMCPサーバーに接続します
- ツール一覧の取得: クライアントがサーバーから利用可能なツールの一覧を取得します
- ユーザー入力の処理: ユーザーからの入力をLLMに送信します
- ツールの呼び出し: LLMが必要に応じてツールを呼び出します
- 結果の返却: ツールの実行結果をLLMに返し、LLMが最終的な応答を生成します
MCPの実装方法
サーバー側
# FastMCPを使用した例
from fastmcp import FastMCP
# サーバーの作成
mcp = FastMCP(
"Example MCP Server",
host="0.0.0.0",
port=52229
)
# ツールの定義
@mcp.tool()
def example_tool(param1: str, param2: int) -> dict:
"""
Example tool description.
Args:
param1: First parameter description
param2: Second parameter description
Returns:
Dict containing results
"""
# ツールの実装
return {"result": f"{param1}: {param2}"}
# サーバーの実行
if __name__ == "__main__":
mcp.run()
クライアント側
# 基本的なMCPクライアント
import requests
class MCPClient:
def __init__(self, base_url: str = "http://localhost:52229"):
self.base_url = base_url.rstrip("/")
self.headers = {
"Content-Type": "application/json",
}
def call_tool(self, tool_name: str, params: dict) -> dict:
"""ツールを呼び出す"""
url = f"{self.base_url}/api/tools/{tool_name}"
try:
response = requests.post(url, headers=self.headers, json=params)
response.raise_for_status()
return response.json()
except requests.RequestException as e:
return {"error": str(e), "status": "error"}
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.
- 10d ago First seen · 148 lines · 1,474 tokens per session scan A 645457551fd2
mcp is a cursor rule published in the GitHub repository tumf/grafana-loki-mcp (29 stars, last pushed 8mo ago), licensed MIT. It adds 1,474 tokens to every session, about $0.0074 per session on Opus 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-08-30.
Other cursor rules, from other repositories
ponytail
Ponytail, lazy senior dev mode. Always pick the simplest solution that works.
angular-20
This rule provides comprehensive best practices and coding standards for Angular development, focusing on modern TypeScript, standalone components, signals, and performance optimizations.
dev-standard
Apache Superset development standards and guidelines for Cursor IDE.
cli-error-handling
CLI command error handling patterns.
prefer-assertions-over-defensive-checks
Prefer assertions over defensive checks when data is guaranteed to be valid.
prefer-direct-imports-over-module-mocks
Prefer extracting a testable core over vi.mock / vi.resetModules when unit tests need to reach production logic entangled with config, env, or singletons.