Finance Toolkit
500+ transparent financial methods calculated from raw statements, not third-party endpoints.
作者による説明(英語の原文)
Agent guardrails: contract, evidence ledger, loop brake, diff-scope warnings, durable journal.
この3つを1つのスコアにまとめることはしません。意見、測定、人気はそれぞれ別のものだからです。
このサーバーのやさしい解説はまだ書いていません。以下はレジストリから読み取った事実です。
使っているAIアプリを選んで、設定をコピーしてください。
必要なもの
どのアプリを使っていますか?
上でアプリを選んでください。選んだアプリを覚えておくので、次からはボタンに「…にインストール」と表示されます。
Claude Desktop → Settings → Developer → Edit Config を開き、claude_desktop_config.json にこれを貼り付けます
{
"mcpServers": {
"protect-context": {
"command": "uvx",
"args": [
"protect-context",
"mcp"
]
}
}
}ターミナルでこれを実行します
claude mcp add protect-context -- uvx protect-context mcpプロジェクトの .cursor/mcp.json、または ~/.cursor/mcp.json に貼り付けます
{
"mcpServers": {
"protect-context": {
"command": "uvx",
"args": [
"protect-context",
"mcp"
]
}
}
}ブラウザがアプリを開いてよいか確認し、そのあとアプリが設定を表示して確認を求めます。キーの値は空欄のままなので、自分で入力してください。
プロジェクトの .vscode/mcp.json に貼り付けます
{
"servers": {
"protect-context": {
"type": "stdio",
"command": "uvx",
"args": [
"protect-context",
"mcp"
]
}
}
}ブラウザがアプリを開いてよいか確認し、そのあとアプリが設定を表示して確認を求めます。キーの値は空欄のままなので、自分で入力してください。
これはパソコンで動くサーバーですが、ChatGPTがつなげるのはインターネット上のサーバーだけです。ほかのアプリを選んでください。
選んだアプリは、この端末のCookieに保存されます。アカウントは不要です。
この設定は、作者のレジストリ登録情報から作成しています。READMEと違う場合は、READMEに従ってください。
パソコンで動くサーバーです。インストールすると、ツール一覧がAIアプリに表示されます。
誰でも見られる情報をチェックしており、コードは読んでいません。当てはまらない項目は数に入れていません。 · 2026年11月7日にチェック
レジストリ名は、リポジトリを所有するGitHubアカウント XJTLUmedia で確認済みです
このリポジトリはまだGitHubから読み取っていません
このリポジトリはまだGitHubから読み取っていません
これはパソコンで動くため、インターネット上のエンドポイントはありません
パソコンで動き、代わりにローカルの設定を使います
パソコンで動くサーバーです。ツール一覧を読み取れるのは、インターネット上のエンドポイントがある場合だけです
レジストリでこのカテゴリにある有効なすべてのサーバーと比較しています。スターは、公開者がリポジトリの所有者である場合だけ数えます。
当てはまる基本チェック1項目のうち1項目に合格しました。コードは読んでいません。キーやトークンを追加する前に、サーバーがどんなアクセスを求めているかを確認し、必要な権限だけを持つキーを使ってください。
レジストリには必須のキーは載っていません。ただし、最初に使うときにサインインを求めるサーバーもあります。
あなたのパソコンで動きます。必要なときにAIアプリが起動し、データは作者のサーバーを通りません(サーバー自体がオンラインサービスを呼び出す場合を除きます)。
GitHubリポジトリの最終更新は–、最新バージョン(2.0.0)がレジストリに届いたのは一昨日です。
Claude Desktop、Claude Code、Cursor、VS CodeなどのMCP対応アプリで使えます。パソコンにPython (uv)も必要です。
同じカテゴリには:Finance Toolkit, SolidInvoice, Korea Tax Calculator
同じカテゴリで、ほかの作者が作ったサーバー。スターの多い順。
カードの見方:★ GitHubスターi3つの柱:レビュー · チェック · 利用状況i更新=最新バージョンをレジストリに公開した日i
500+ transparent financial methods calculated from raw statements, not third-party endpoints.
Create and send invoices and quotes, manage clients, and track payments in SolidInvoice.
Korean tax calculation and tax-audit judgment MCP: 96 tools with statutory citations.
作者のリポジトリから書かれたとおりにコピーしたものです。PopNx MCPは内容を確認・推奨していません。HTML、画像、スクリプトは取り除いています。リンクはこのサイトの外へ移動します。
Durable context, real evidence, and a brake pedal for AI coding agents.
protect-context keeps the rules, decisions, and proof-of-work an agent needs in front of it — then makes scope creep, unverified claims, and repeated failures visible *before* they cost you a session.
One project-local .agent-guard/ store · three interfaces backed by the same logic:
| Interface | Use it for | Runtime |
|---|---|---|
| pi extension | Automatic brief injection, status widget, loop blocking, diff warnings, risky-command confirmation | TypeScript, loaded by pi via jiti |
| MCP server | Portable model/host access to the same tools | Python 3.10+, fastmcp |
| Python CLI | People, scripts, CI, and hosts without MCP | Python 3.10+ |
The suite is advisory-first. It records evidence and makes unsafe or repetitive behavior visible; it is not a sandbox and does not prove that a change is correct. SPEC.md is the frozen v1.0 contract.
Long agent sessions fail in boring, expensive ways:
protect-context treats those as state problems, not intelligence problems. A durable store plus three small habits — brief before work, evidence after work, journal when something is decided — removes most of the failure surface without turning the agent into a different agent.
| Primitive | What it gives you | Where you meet it |
|---|---|---|
| Brief | Owner task, contract, recent trusted decisions and corrections, a short unverified section for the agent's own notes, open loops, and the last evidence ID — injected before a turn and re-asserted mid-run after a compaction | Automatic in pi; orientation, status, guard_journal elsewhere |
| Orientation | Bounded repo digest: tree, languages, and conventions files (CLAUDE.md, AGENTS.md, CONVENTIONS.md, README.md, README) | Injected once per digest in pi; orientation in CLI/MCP |
| Evidence ledger | Every verification run recorded as ev-NNNN with exit code, duration, command, and a bounded output digest | guard_verify, protect-context verify, guard_evidence |
| Loop brake | Identical failing commands are fingerprinted; the Nth attempt is blocked instead of re-run | Hard block in pi and the CLI; reported through MCP |
| Scope audit | git diff stats over tracked, staged, and bounded untracked work, with ok / warn / hard verdicts | Widget and status in pi; diff, guard_diff_audit |
| Journal | Durable decision / correction / risk / note entries with tags and trust levels | guard_note, protect-context note, guard_journal |
| Recall | Keyword, tag, type, evidence-id, and command search over the retained journal and evidence window — no embeddings | guard_recall, protect-context recall; the brief names it when a cap hides entries |
| Risky-command confirm | Nine catastrophic shell patterns get one grouped confirmation instead of none | pi, when a UI is available |
| Preflight | Tool presence and versions plus Git worktree detection | preflight, guard_preflight |
| Context budget | Watermarks on context usage and hard caps on every injected block | Widget, budget, guard_budget |
Python 3.10+ is required for the CLI and MCP server. Node 22.19+ is required only to validate the TypeScript extension from a checkout — pi supplies the extension's runtime modules, and the extension has zero npm runtime dependencies.
Installed from npm. The package declares "pi": { "extensions": ["./extension/index.ts"], "image": "./preview.png" } and the pi-package keyword required by the Pi package gallery:
pi install npm:protect-context
pi -e npm:protect-context
Install it through pi, not through npm install. The extension declares pi's host modules (@earendil-works/pi-ai, @earendil-works/pi-coding-agent, typebox) as "*" peer dependencies, as Pi requires; Pi suppresses peer installation for managed npm packages, while a plain npm install protect-context does not. The second path downloads the whole pi runtime and surfaces advisories from that tree, which belong to the host and not to this zero-runtime-dependency extension.
Remove any hand-installed copy first — a directory such as ~/.pi/agent/extensions/protect-context or .pi/extensions/protect-context, or pi remove npm:protect-context if that copy came from npm. Two copies register the same tool names, and pi drops the second one:
Error: Failed to load extension "…/.pi/npm/node_modules/protect-context/extension/index.ts":
Tool "guard_verify" conflicts with /home/you/.pi/agent/extensions/protect-context/index.ts
One error is reported per tool (guard_verify, guard_note, guard_contract_check, guard_status, guard_journal, guard_recall), so nothing from the npm copy loads until the other copy is gone.
Or copy/symlink the checkout into a trusted extension directory:
# Personal
mkdir -p ~/.pi/agent/extensions cp -r extension ~/.pi/agent/extensions/protect-context
mkdir -p .pi/extensions cp -r extension .pi/extensions/protect-context
Start a session and you get a single-line status widget, a brief before the first turn, and five slash commands. No configuration file is needed: the extension seeds .agent-guard/config.json with the frozen defaults on first session start.
For pi with pi-mcp-adapter, add .mcp.json at the project root:
{
"mcpServers": { "protect-context": { "command": "/absolute/path/to/protect-context/.venv/bin/python", "args": ["-m", "protect_context.mcp_server"] } } }
The same stdio shape works in any generic MCP host. No checkout is needed either: uvx protect-context mcp runs the same server straight from PyPI. Set PC_SESSION_ID when several host sessions need distinct evidence and loop views:
{
"mcpServers": { "protect-context": { "command": "/absolute/path/to/protect-context/.venv/bin/python", "args": ["-m", "protect_context.mcp_server"], "env": { "PC_SESSION_ID": "my-session" } } } }
The MCP surface exposes the nine frozen v1.0 tools plus later read surfaces (guard_journal, guard_orientation, and guard_recall). Tools carry conservative MCP annotations; in particular guard_verify is marked destructive and open-world because it can run any shell command. Annotations are host hints, not enforcement — configure the host to require human approval for that tool.
pip install protect-context # or: pipx install protect-context
protect-context init # seed .agent-guard/ in the current project protect-context status protect-context verify "pytest -q" protect-context mcp # serve the MCP tools on stdio
The CLI and MCP server are distributed through PyPI; the npm package ships only the pi extension. Both read the same .agent-guard/ directory, so a project can use the extension in pi and scripted verification in CI at the same time.
# Python package, CLI, MCP server, and Python tests
python3 -m venv .venv .venv/bin/python -m pip install -e ".[dev]"
npm ci --ignore-scripts npm run check
If the machine's default Node is older than 22.19, run the same checks with an ephemeral Node 22 binary after npm ci:
npx -y node@22 node_modules/typescript/bin/tsc --noEmit -p extension/tsconfig.json
npx -y node@22 --experimental-strip-types --test extension/test/*.test.ts
Excerpts from a real session in this repository.
Ask for the current state:
$ protect-context status
PC status · session default · git 91fad4d Δdiff +88/-8 · 6 files · verdict ok loops: none contract 12 constraints conventions: README.md Nudge: verify changes with guard_verify and cite the evidence id before claiming success.
Record proof instead of asserting it:
$ protect-context verify --timeout 180 npm run check
PC verify ev-0005 · exit 0 · ok · 1440ms cwd: /path/to/project cmd: npm run check digest: … Nudge: cite this evidence id when claiming success.
A pipeline or || true is still recorded with the shell's real exit code, but the report says UNTRUSTED and the CLI exits 1. That exit 0 is not proof.
Re-run the same failing command a third time and the brake engages:
$ protect-context verify "npm test"
PC verify blocked · npm test · 3 prior failures Nudge: change approach or gather new information — do not re-run unchanged.
What pi injects before the agent starts working (sections elided):
contract:
01-obey-instructions: Obey the owner's explicit instructions and stated constraints exactly; when instructions conflict, ask instead of guessing. 02-evidence-before-success: Never claim success without citing a fresh verification run (evidence id or pasted output) for the exact claim. … decisions:
last verify: ev-0005 exit=0 'npm ru
冒頭だけを表示しています。続きはリポジトリで読めます