Borrowing it
Nothing to install: this file belongs to naka-koma/local-llm-mcp. 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/naka-koma/local-llm-mcp/main/CLAUDE.mdgit clone --depth 1 https://github.com/naka-koma/local-llm-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/instructions/naka-koma/local-llm-mcp/claude-md)<a href="https://agentmods.dev/instructions/naka-koma/local-llm-mcp/claude-md"><img src="https://agentmods.dev/badge/instructions/naka-koma/local-llm-mcp/claude-md/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/instructions/naka-koma/local-llm-mcp/claude-md"><img src="https://agentmods.dev/badge/instructions/naka-koma/local-llm-mcp/claude-md.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.02102 | $0.02102 |
| Opus 5 | $0.01051 | $0.01051 |
| Sonnet 5 | $0.00420 | $0.00420 |
| Haiku 4.5 | $0.00210 | $0.00210 |
Grade A, and why
local-llm-mcp CLAUDE.md 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 11d 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 — 123 lines — stays where its author put it; the contents beside it link to each section on GitHub.
CLAUDE.md
Claude Codeがこのリポジトリで作業する際の指針。
プロジェクト概要
Claude Code(またはその他のMCP対応クライアント)から、LiteLLM経由でローカル/クラウドのLLMに軽量タスクを委譲するための、薄いMCPサーバー。特定のプロジェクトに依存しない汎用ツールとして設計している。
- 詳細・セットアップ手順 → README.md(英語)/ README.ja.md(日本語)
技術スタック
- 言語: Python 3.10+
- 主要ライブラリ:
mcp(MCP SDK),requests - 依存先: LiteLLM(別途起動しておく前提。このリポジトリはMCPサーバー本体のみを提供する)
フォルダ構成と役割
server.py MCPサーバー本体。ask_local_llmツールを1つ公開する(main()がエントリポイント)
pyproject.toml パッケージ定義。uvx実行用のscriptエントリポイント(local-llm-mcp)を定義する
requirements.txt 依存パッケージ(pip install用。pyproject.tomlのdependenciesと内容を一致させる)
scripts/setup.sh セットアップスクリプト(macOS/Linux/Git Bash)
scripts/setup.ps1 セットアップスクリプト(Windows PowerShell)
.env.example 環境変数のサンプル(LITELLM_BASE_URL等)
README.md セットアップ・利用方法(英語)
README.ja.md セットアップ・利用方法(日本語)
READMEを更新する際は、内容の同期漏れを避けるため両言語版を同じコミットで更新する。
ビルド・デプロイ
単一のPythonスクリプト(server.py)で、CIによるビルド工程はない。バージョンを区切りたい場合は /release スキルでGitHub Releaseを作成する。
pyproject.toml はPyPI公開用ではなく、uvx --from git+https://github.com/naka-koma/local-llm-mcp local-llm-mcp でclone不要に実行できるようにするためのパッケージ定義。PyPIへの公開は現時点で行っていない(行う場合はユーザーの承認を得ること)。
検証はサブエージェントに委譲する
構文チェック(python -m py_compile server.py)は build-runner エージェントに、テスト(pytest、現時点ではテストスイート未整備)は test-runner エージェントに委譲する。どちらも実行と結果報告のみを行う実行専用エージェントで、エラーが出た場合の原因調査・修正はメイン側が行う。
ローカルLLMへの委譲(ドッグフーディング)
このリポジトリ自体の開発でも、local-llm MCPツール(ask_local_llm)が利用可能な場合は積極的に使う。自分がこのツールの開発元である以上、実際に使いながら使い勝手を検証する。
委譲してよい軽量タスクの例:
- コミットメッセージ・PR本文の下書き作成、表現チェック
python -m py_compile/pytestの実行結果(build-runner / test-runner の出力)の要約- README.ja.mdやCLAUDE.mdの日本語表現の見直し
委譲すべきでないもの:
- コードの設計判断、実装そのもの
- セキュリティやAPIインターフェースに関わる意思決定
- マージ可否など、ユーザーの承認が必要な判断
ツールが未接続・LiteLLM未起動などで使えない場合は、エラーメッセージが返るだけで例外にはならない(MCPサーバー実装の制約と注意事項参照)。その場合は通常通り自分で作業を続ける。
MCPサーバー実装の制約と注意事項
- 例外を投げない:
ask_local_llmは接続エラー・タイムアウト時も例外を投げず、エラー内容を説明する文字列を返す設計にする(呼び出し元のClaude Codeが例外処理を意識しなくて済むようにするため) - 設定は環境変数化する:
LITELLM_BASE_URL等をコードに直書きしない。プロジェクトに依存する値を持たせないのが、このツールの汎用性の根幹 - 依存を増やしすぎない: 「薄いラッパー」であることが設計思想。新機能を追加する際も、LiteLLM側に既にある機能(ルーティング、フォールバック等)をこちら側で再実装しない
main()をエントリポイントとして維持する:pyproject.tomlの[project.scripts]がserver:mainを参照している(uvx実行用)。関数名・シグネチャを変える場合はpyproject.toml側も合わせて確認する- 依存関係は
requirements.txtとpyproject.tomlの両方を更新する:pip installとuvxの両方の導線があるため、依存パッケージを追加・変更する際は両ファイルの内容を一致させる
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.
- 11d ago First seen · 123 lines · 2,102 tokens per session scan A 0106bcf4e1d2
local-llm-mcp CLAUDE.md is an instructions file published in the GitHub repository naka-koma/local-llm-mcp (0 stars, last pushed 1mo ago), licensed MIT. It adds 2,102 tokens to every session, about $0.0105 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.
Other instructions, from other repositories
spec-kit AGENTS.md
AGENTS.md instructions for github/spec-kit, covering agents.md, about spec kit and specify, quickstart — add a new integration in 5 steps, integration architecture and integrationmanifest — file tracking.
next.js AGENTS.md
AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.
codex AGENTS.md
AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.
vscode buildNext.instructions.md
Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).
langchain AGENTS.md
AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.
vscode oss-third-party-notices.instructions.md
Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, applying the notice (cutover) and fallback chain (never fail the build).