Thanks for your interest. The bridge is small, single-file, and deliberately unopinionated — contributions that keep it that way are very welcome.
git clone https://github.com/Bantarus/context-bridge-mcp.git
cd context-bridge-mcp
npm install # the `prepare` hook builds dist/ for you
npm testRequires Node ≥ 20.11.
- Bug fixes — small, focused, with a test that demonstrates the bug
- Documentation improvements — including fixes for doc-vs-code gaps
- New or refined tools, after discussion in an issue
- Coverage gaps in the test suite
- Major refactors — the single-file architecture is intentional; let's align on direction before code
- New runtime dependencies — the bridge currently ships only
@modelcontextprotocol/sdkandzod; please open an issue if you think another is justified - Project-specific features — the server has zero project knowledge by design and we want to keep it that way
The server lives in a single file: src/index.ts. Everything
is filesystem I/O against .context/ folders, with shared state in
~/.context-bridge/.
npm run dev # tsx watch — no build step, instant reload
npm run build # compile dist/index.js with shebang
npm run typecheck # tsc --noEmit
npm test # unit + integration + scenarios
npm run test:watch # vitest watch mode
npm run test:coverageThe suite is split into four layers (details):
| Layer | What it tests | When to add |
|---|---|---|
| Unit | Pure helpers (deepMerge, extractVersion, etc.) |
If you touched them |
| Integration | Each MCP tool, exercised via real Client over stdio | If you touched any handler |
| Scenarios | Multi-repo journeys | If your change crosses repos |
| Headless E2E | Real claude -p driving the bridge |
Optional (local-only, costs a few cents) |
Vitest auto-discovers test/**/*.test.ts. Headless E2E tests are gated by
RUN_E2E_HEADLESS=1 and use your Claude Code subscription auth — they do
not run in CI.
When you change a tool's name, signature, or behavior, also update the
three companion skills in .claude/skills/:
context-reader/SKILL.md— what Claude Code reads at session startcontext-feeder/SKILL.md— how Claude Code writes back after implementingcontext-bridge/SKILL.md— cross-repo coordination guide
Stale skills produce incorrect tool calls and silently fail. See the IMPORTANT block in CLAUDE.md for the full rationale.
- ESM throughout (
"type": "module") - Minimal comments: explain why, not what — identifiers carry the what
- No new abstractions for hypothetical needs
- Every external path goes through
assertSafePath - Writes to
manifest.json/ecosystem.jsongo throughwriteFileAtomic - The boot guard at the bottom of
src/index.tskeeps the module import-safe — please don't remove it
- Fork and create a feature branch from
master - Run
npm test && npm run typechecklocally - Open a PR with a short description: what changed and why
- The CI matrix (5 jobs across Linux/macOS/Windows × Node 20/22/24) runs automatically
- Discussion happens in the PR; squash-merges keep history readable
Do not open a public issue for vulnerabilities. See SECURITY.md for the private reporting process.
By contributing, you agree that your contributions are licensed under the MIT License.