Context Guardian
MCP server and proxy that indexes local context so agents can search it with tools.
Tested on LinuxKnown vulnerabilities
Use it
Before you install: known vulnerabilities
pickfit found 2 known high or critical vulnerabilities in the packages a fresh install brings (OSV.dev, 3 Nov 2026). Weigh this before you install it.
npm:hono 4.12.12hono: CORS Middleware reflects any Origin with credentials when `origin` defaults to the wildcard (GHSA-88fw-hqm2-52qc, high, fixed in 4.12.25)npm:zod 3.25.76Zod can exhaust memory while validating oversized constrained collections (GHSA-mrhx-c7xc-m3w5, high, fixed in 4.6.6)
Linux x86_64
You need first
- Runtimes:
Node.js 20+ - Needs the network
install context-guardian via npm
npm install -g context-guardian-mcp
Where the README and reality differ
- README: Create `.context-guardian.json` with `context-guardian init`
What worked: init creates guardian.config.json in cwd and prints to stderr
Check that it works
curl -s http://localhost:9120/mcp -H 'Content-Type: application/json' -d '{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"index_content","arguments":{"content":"function login(user, pass) { return auth(user, pass); }\nERROR 2024-01-01 login failed for user alice\nconfig: {\"port\": 9120}","source":"auth.ts"}}}'The output should contain “Indexed 1 chunks from”.
First thing to try
curl -s http://localhost:9120/mcp -H 'Content-Type: application/json' -d '{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"index_content","arguments":{"content":"function login(user, pass) { return auth(user, pass); }\nERROR 2024-01-01 login failed for user alice\nconfig: {\"port\": 9Start the server with context-guardian mcp --port 9120, then send MCP requests to http://localhost:9120/mcp.
What it does
- Index code, logs and config locallyTested
How to use it
- Start the server with
context-guardian mcp --port 9120. - Call the
index_contenttool with your text and a source name: `curl -s http://localhost:9120/mcp -H 'Content-Type: application/json' -d '{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name
- Start the server with
- Give coding agents search tools over the indexTested
How to use it
- Start the server with
context-guardian mcp --port 9120and index some content. - Search it with the
greptool: `curl -s http://localhost:9120/mcp -H 'Content-Type: application/json' -d '{"jsonrpc":"2.0","id":3,"method":"tools/call","params":{"name":"grep","arguments":{"pattern":
- Start the server with
- Proxy OpenAI and Anthropic agent requests locallyNot shown working
How far pickfit got
Linux x86_64
- Installs
- Starts
- 2 of 3 features work
- Works offline
Good for
- index code, logs and configs into local store
- regex search indexed content with context lines
- search logs and errors by query
- find functions, classes and interfaces across code
- inspect git changes
How pickfit tested it
Each run starts from a clean machine and follows the steps above. How pickfit verifies
Linux x86_64
Its service answers requests
- Replayed from scratch
- Works offline
- Checked on 30 Oct 2026
- Version 0.3.0
Differences the test machine hit
- README: Requirements: Ollama running locally with qwen3.5:4b and nomic-embed-text
In the test: index_content and grep work without Ollama via heuristic classification and zero-vector embedding fallback; proxy warns Ollama not detected and uses fallback behavior