프로토타입 · 미리 보기: 공식 레지스트리의 모든 서버를 담고 있으며 30분마다 동기화해요. 리뷰와 계정 기능은 다음 단계에서 열려요.
PopNx MCPAI를 쓰는 사람을 위한 MCP 서버 · 쉬운 말로 설명해요

protect-context

제작자: XJTLUmedia버전 2.0.0i★ –i내 컴퓨터에서 실행
레지스트리 이름io.github.XJTLUmedia/protect-context

설치

개요

제작자가 쓴 설명(영어 원문)

Agent guardrails: contract, evidence ledger, loop brake, diff-scope warnings, durable journal.

PopNx MCP의 세 기둥

이 세 가지는 절대 하나의 점수로 합치지 않아요. 의견, 측정, 인기는 서로 다른 것이니까요.

할 수 있는 일

이 서버는 아직 쉬운 말로 된 요약을 쓰지 못했어요. 아래는 레지스트리에서 읽어 온 사실이에요.

  • 연결 방식: 내 컴퓨터에서 실행
  • 전송 방식: stdio
  • 카테고리: 회계, 재무 및 세금

설치

쓰고 있는 AI 앱을 고른 다음 설정을 복사하세요.

설치하기 전에

  • 기본 점검: 1개 중 1개 통과
  • 내 컴퓨터에서 내 사용자 계정의 권한(파일, 네트워크, 앱)으로 실행돼요.
  • 레지스트리에 입력해야 할 키가 나와 있지 않아요.

필요한 것

  • PyPIPython의 uv 설치(uvx 명령어용)

어떤 앱을 쓰세요?

위에서 앱을 고르세요. 기억해 두었다가 다음부터는 버튼에 “…에 설치”라고 표시해요.

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에서 열기

또는 설정을 직접 복사하기

프로젝트의 .cursor/mcp.json 또는 ~/.cursor/mcp.json에 붙여 넣으세요

{
  "mcpServers": {
    "protect-context": {
      "command": "uvx",
      "args": [
        "protect-context",
        "mcp"
      ]
    }
  }
}

브라우저가 앱을 열지 물어본 다음, 앱이 설정을 보여 주고 확인을 요청해요. 키 값은 비워 두니 직접 입력하세요.

VS Code에서 열기

또는 설정을 직접 복사하기

프로젝트의 .vscode/mcp.json에 붙여 넣으세요

{
  "servers": {
    "protect-context": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "protect-context",
        "mcp"
      ]
    }
  }
}

브라우저가 앱을 열지 물어본 다음, 앱이 설정을 보여 주고 확인을 요청해요. 키 값은 비워 두니 직접 입력하세요.

이 서버는 내 컴퓨터에서 실행되는데, ChatGPT는 인터넷에 있는 서버에만 연결할 수 있어요. 다른 앱을 고르세요.

선택한 앱은 이 기기의 쿠키에만 저장돼요. 계정은 필요 없어요.

이 설정은 제작자의 레지스트리 정보로 만들었어요. README와 다르면 README를 따르세요.

할 수 있는 일

내 컴퓨터에서 실행돼요. 설치하면 AI 앱에 도구 목록이 나타나요.

기본 점검i

누구나 볼 수 있는 정보를 점검했고, 코드는 읽지 않았어요. 해당하지 않는 항목은 개수에서 뺐어요. · 2026년 11월 7일 점검

  • ✓ 통과

    제작자와 저장소 일치

    레지스트리 이름이 GitHub 계정 XJTLUmedia 기준으로 확인되었고, 이 계정이 저장소를 소유하고 있어요

  • … 아직 점검 안 함

    계속 관리되고 있음

    아직 GitHub에서 이 저장소를 읽어 오지 않았어요

  • … 아직 점검 안 함

    라이선스 있음

    아직 GitHub에서 이 저장소를 읽어 오지 않았어요

  • – 해당 없음

    엔드포인트 응답

    내 컴퓨터에서 실행되는 서버라 인터넷 엔드포인트가 없어요

  • – 해당 없음

    OAuth로 로그인

    내 컴퓨터에서 실행되며, 대신 로컬 설정을 사용해요

  • … 아직 점검 안 함

    도구 설명에 숨겨진 지시 없음

    내 컴퓨터에서 실행돼요. 도구 목록은 인터넷 엔드포인트가 있는 서버에서만 읽을 수 있어요

회계, 재무 및 세금 카테고리의 다른 서버와 비교i

  • 이 카테고리의 다른 서버 1730개 중 0%보다 스타가 많아요
  • 이 카테고리의 다른 서버 1730개 중 94%보다 최근에 레지스트리에 공개됐어요
  • 기본 점검 결과가 이 카테고리의 다른 서버 1730개 중 100%와 같거나 더 좋아요

레지스트리에서 이 카테고리의 활성 서버 전체와 비교했어요. 스타는 게시자가 저장소를 소유한 경우에만 세요.

자주 묻는 질문

protect-context, 안전한가요?

해당하는 기본 점검 1개 중 1개를 통과했어요. 코드는 읽지 않았어요. 키나 토큰을 넣기 전에 서버가 어떤 권한을 요구하는지 확인하고, 꼭 필요한 권한만 있는 키를 쓰세요.

어떤 키나 코드가 필요한가요?

레지스트리에 필수 키가 나와 있지 않아요. 다만 처음 쓸 때 로그인을 요구하는 서버도 있어요.

내 컴퓨터에서 실행되나요, 클라우드에서 실행되나요?

내 컴퓨터에서 실행돼요. AI 앱이 필요할 때 실행하고, 데이터는 제작자의 서버를 거치지 않아요(서버 자체가 온라인 서비스를 호출하는 경우는 제외).

아직 관리되고 있나요?

GitHub 저장소는 마지막으로 – 변경됐고, 최신 버전(2.0.0)은 그저께 레지스트리에 올라왔어요.

어떤 앱에서 쓸 수 있나요?

Claude Desktop, Claude Code, Cursor, VS Code처럼 MCP를 지원하는 앱에서 쓸 수 있어요. 내 컴퓨터에 Python (uv)도 있어야 해요.

대신 쓸 수 있는 건 뭐가 있나요?

같은 카테고리에는: Finance Toolkit, SolidInvoice, Korea Tax Calculator

대안

같은 카테고리에서 다른 제작자가 만든 서버예요. 스타 순으로 정렬했어요.

카드 보는 법:★ GitHub 스타i세 기둥: 리뷰 · 점검 · 사용 정도i업데이트 = 최신 버전을 레지스트리에 공개한 날i

Finance Toolkit

제작자: JerBouma

500+ transparent financial methods calculated from raw statements, not third-party endpoints.

컴퓨터 또는 클라우드★ 5,496MIT오늘 업데이트
설치

SolidInvoice

제작자: SolidInvoice

Create and send invoices and quotes, manage clients, and track payments in SolidInvoice.

클라우드에서 실행★ 981MIT8일 전 업데이트
설치

Korea Tax Calculator

제작자: UpstageAI

Korean tax calculation and tax-audit judgment MCP: 96 tools with statutory citations.

내 컴퓨터에서 실행★ 97MIT어제 업데이트
설치

제작자의 README

README 열기

제작자의 저장소에서 쓰인 그대로 가져왔어요. PopNx MCP가 검토하거나 보증한 내용이 아니에요. HTML, 이미지, 스크립트는 제거했어요. 링크를 누르면 이 사이트를 벗어나요.

protect-context · Agent Guardrail Suite

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:

InterfaceUse it forRuntime
pi extensionAutomatic brief injection, status widget, loop blocking, diff warnings, risky-command confirmationTypeScript, loaded by pi via jiti
MCP serverPortable model/host access to the same toolsPython 3.10+, fastmcp
Python CLIPeople, scripts, CI, and hosts without MCPPython 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.

Contents

  • Why this exists
  • What it does
  • Quick start
  • Install the pi extension
  • Install the MCP server
  • Install the Python CLI
  • From source
  • A 30-second tour
  • Interface comparison
  • Reference
  • pi commands and tools
  • MCP tools
  • CLI
  • Configuration
  • Environment variables
  • Runtime store and concurrency
  • The 12 failure modes and what ships
  • How it works
  • Session lifecycle
  • The brief
  • Local recall
  • Evidence and loop detection
  • Scope audit
  • Trust and provenance
  • Context budget
  • Development and validation
  • Troubleshooting
  • Limitations and security boundary
  • Design sources
  • Non-goals
  • License

Why this exists

Long agent sessions fail in boring, expensive ways:

  • the constraints you stated at minute two are gone by minute forty;
  • "done" is claimed with no command output behind it;
  • a "quick fix" quietly rewrites six unrelated files;
  • decisions get re-litigated because nothing recorded the reasoning;
  • the same failing command is retried until the context window dies.

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.

What it does

PrimitiveWhat it gives youWhere you meet it
BriefOwner 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 compactionAutomatic in pi; orientation, status, guard_journal elsewhere
OrientationBounded 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 ledgerEvery verification run recorded as ev-NNNN with exit code, duration, command, and a bounded output digestguard_verify, protect-context verify, guard_evidence
Loop brakeIdentical failing commands are fingerprinted; the Nth attempt is blocked instead of re-runHard block in pi and the CLI; reported through MCP
Scope auditgit diff stats over tracked, staged, and bounded untracked work, with ok / warn / hard verdictsWidget and status in pi; diff, guard_diff_audit
JournalDurable decision / correction / risk / note entries with tags and trust levelsguard_note, protect-context note, guard_journal
RecallKeyword, tag, type, evidence-id, and command search over the retained journal and evidence window — no embeddingsguard_recall, protect-context recall; the brief names it when a cap hides entries
Risky-command confirmNine catastrophic shell patterns get one grouped confirmation instead of nonepi, when a UI is available
PreflightTool presence and versions plus Git worktree detectionpreflight, guard_preflight
Context budgetWatermarks on context usage and hard caps on every injected blockWidget, budget, guard_budget

Quick start

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.

Install the pi extension

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

Try it for one run without adding it to settings

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

Project-local (read after the project is trusted)

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.

Install the MCP server

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.

Install the Python CLI
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.

From source
# Python package, CLI, MCP server, and Python tests

python3 -m venv .venv .venv/bin/python -m pip install -e ".[dev]"

Reproducible extension development checks (dev dependencies only)

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

A 30-second tour

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:

  • Use the atomic-mkdir lease, not fcntl alone; Python must interoperate with the extension. [locking,spec]

last verify: ev-0005 exit=0 'npm ru

앞부분만 보여 드려요. 나머지는 저장소에서 읽어 보세요

PopNx에게 묻기