
svammxiahilly/mcpbastion
Developer toolsこのページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る
モデルコンテクストプロトコルのローカルゼロトラストチェックポイント: 改行区のJSON-RPCを読んで、各メッセージをポリシーに対して決定 - 許可、拒否、赤字化、および1つで生き残るものだけを書き込みます...
概要
クライアントは、それがうまくいたと思った. サーバが障害をきたす。 それらの間は、ラインをstdinから読み取る1つのプロセスを置きます, シェルを一致させます.* 否定的なルールに対して, stdoutに何も書き込みません, そして、正確に言う単一のJSON監査イベントをドロップ. そのプロセスは、MCP の Bastion です。 MCP のバッションは、モデルコンテキストプロトコルです。 stdin から改行した JSON-RPC を読み込み、各メッセージをポリシーに対して決定します。これにより、/deny/redact が許可され、stdout に生き残るものだけを書き込みます。 すべてのメッセージ、転送、またはない、一行の監査記録を残します。 それはあなたのマシン上で完全に実行し、使用し、 : 自信を持って許可されていないものは、決して転送されません。 何か他のものの前にこれを読んでください。正直なところ、全ポイントです。 - MCP stdio トランスポートに座るライン指向のリレーは、JSON-RPC フィールドの便利な検査を行い、ツール/コールに関するポリシーを強化します。 - 輸送プロキシ.
概要(AI 翻訳)
03:14 — 完全に信頼しなかったセッションは、 [
shell.exec { "cmd": "rm -rf /" }]を実行するためのツールサーバに尋ねました。 クライアントが考えていた。 サーバが障害をきたす。 それらの間は、行を[stdin]から読み、[shell.*]と一致して、何も[stdoutに書いて、なぜ正確に言う単一のJSON監査イベントをドロップする1つのプロセスをsat。 そのプロセスは、MCP の Bastion です。
MCP Bastionは、モデルコンテキストプロトコルのローカルゼロトラストチェックポイントです。 [stdin]から改行されたJSON-RPCを読み、各メッセージをポリシーに対して決定し、許可/拒否/赤字化し、[stdoutに生き残るもののみを書き込みます。 すべてのメッセージ、転送、またはない、一行の監査記録を残します。 それはあなたのマシン上で完全に実行し、サードパーティのランタイム依存関係なし、およびfailsクローズ**を使用します。 自信を持って承認が拒否または削除されることはできません。
実際にあることは(ない)
何か他のものの前にこれを読んでください。正直なところ、全ポイントです。
-**MCP[[stdio]に座るライン指向のリレーで、JSON-RPCのフィールドを手渡して検査し、[tools/call]にポリシーを強制します。
-**輸送プロキシではありません.
このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。
README
以下は原文 README の抜粋です。原文を見る。
MCP Bastion
03:14 — a session you didn’t fully trust just asked a tool server to run
shell.exec { "cmd": "rm -rf /" }. The client thought it was fine. The server would have obeyed. Between them sat one process reading the line offstdin, matchingshell.*against a deny rule, writing nothing tostdout, and dropping a single JSON audit event that says exactly why. That process is MCP Bastion.
MCP Bastion is a local zero-trust checkpoint for the Model Context Protocol. It reads newline-delimited JSON-RPC from stdin, decides each message against a policy — allow / deny / redact — and writes only what survives to stdout. Every message, forwarded or not, leaves a one-line audit record. It runs entirely on your machine, uses no third-party runtime dependencies, and fails closed: anything it cannot confidently authorise is denied or dropped, never forwarded.
What this actually is (and is not)
Read this before anything else — the honesty here is the whole point.
- It is a line-oriented relay that sits on the MCP
stdiotransport, inspects a handful of JSON-RPC fields, and enforces a policy ontools/call. - It is not a transport proxy. It does not speak HTTP or SSE, does not open sockets, does not manage the MCP handshake, and does not spawn the downstream server for you. It moves bytes between one
stdinand onestdout, framed as one JSON object per\n-terminated line. That is the entire I/O contract. - It is not a JSON validator. There is no full parser inside. There is a small, single-pass field extractor (
gateway/src/json_scan.rs) that reads exactly four fields —method,id,params.name,params.arguments— while correctly skipping string literals so a{or"inside a value can never be mistaken for structure. When it cannot confidently extract a field it needs, it stops guessing and denies.
Two components, two languages, zero runtime deps:
| Component | Language | Role |
|---|---|---|
gateway/ |
Rust (std only) |
The enforcement point. Reads, decides, redacts, forwards, audits. |
console/ |
TypeScript (Node stdlib only) | The read-side. Aggregates audit logs, tails events, lints policies. |
Control-room index
インストール
This server does not publish a one-line install command.
Open the repository installation guide MCP 初心者?mcpskill.org のガイドから始めましょう →