Synamcps — permission-aware MCP server and team knowledge gatewaySynamcps

Secure bus: let a second agent sign off before a tool runs

Updated · Synamcps

A second agent, a different prompt, and a signature on the bus — so a tool does not run on one model's say-so.

SynaMCPs Secure Bus: Maya (Chat) publishes a signed tool call, Leo (Attester) signs approved or denied, and Sam (Executor) runs only after approval.

If you want fewer nasty surprises from LLM agents, stop letting one model both invent the plan and press the button. Check the result with a second agent that has a different job and a different master prompt, and make the two of them sign what they claim. A chatty agent can be wrong, eager, or talked into a bad URL. A second agent that only knows the rule, and has to put its name on ok or deny, is a much smaller place for that mistake to hide.

The secure-bus example in SynaMCPs is that idea with three named roles. Maya (Chat) talks to a person in a small Streamlit window. She can upload files into a knowledge storage, and when LangChain decides a page should be opened she does not open it. She publishes a signed tool_call. Leo (Attester) wakes up on pending_review, scores that payload against the rule_text in config, and signs ok or deny. Sam (Executor) only consumes messages in the approved condition — Chat's call plus Leo's ok — verifies both signatures, then browses with Playwright.

SynaMCPs is the shared topic, not the holder of their secrets. Each agent keeps an Ed25519 private key on disk under keys/. The server stores public keys, a versioned JSON policy signed by the server, and the signed envelopes. Publish and attest are checked before anyone can treat a message as real. Read tools can verify and consume; they cannot forge a signature.

bootstrap.py writes the policy the demo actually uses. Chat may publish. The attester may attest ok or deny. Everyone may subscribe. The condition pending_review is a new message from Chat. The condition approved is the same message after the attester's ok. anyDeny stays false in the sample, so a deny does not have to cancel a later ok, but Sam never sees a call that Leo has not signed off.

Install Syna first. You need Docker, Git, Make, and Python 3.11+. Clone https://github.com/synamcps/synamcps-server, copy .env.example to .env, and run make compose-up. Open http://localhost:8080/login, create a knowledge storage, and in Admin issue one access token. Write down both the secret and the token id. One token is enough: the policy, not extra tokens, says who Maya, Leo, and Sam are.

Then install the example from https://github.com/synamcps/synamcps-server/tree/main/examples/securebus. From the server repo: cd examples/securebus, python3 -m venv .venv, source .venv/bin/activate, pip install -r requirements.txt, and playwright install chromium. Copy config.example.yaml to config.local.yaml. Fill base_url (http://localhost:8080), token, token_id, storage_id, and llm.api_key (or export SYNA_TOKEN, SYNA_TOKEN_ID, STORAGE_ID, OPENAI_API_KEY). Edit rule_text so it says, in plain language, what Leo is allowed to approve. The default allows only tool browse and a public https URL. It denies localhost, private addresses, other schemes, and any other tool.

Run python bootstrap.py once. It creates three key files if they are missing, registers each public key with proof of possession, creates the securebus object (slug securebus-demo unless you change topic_slug), and saves object_id plus key ids back into config.local.yaml. Keys and that local config stay gitignored. If the policy signing key env is empty, Syna uses an ephemeral key — fine on a laptop, not something you want in production. Set SECUREBUS_POLICY_SIGNING_KEY when the topic has to survive a restart.

Start three terminals in the same virtualenv. streamlit run chat_app.py for Maya. python attester.py for Leo. python executor.py for Sam. In the chat, upload a file if you want, then ask to open a public https page. Leo should comment and sign. Sam should fetch the page only after that. Ask for http://localhost or a private address and Leo should deny; Sam should stay quiet.

To make this your own tool, keep the same shape and change the payload. Publish a tool_call your executor understands (name plus args). Rewrite rule_text as the attester's whole job description — different purpose, different prompt, no browsing tools of its own. Point the executor at your real action, and keep a boring local check (scheme, host, allowlist) even after the signature, the way the sample still refuses non-public URLs in code. Add agents in the policy only if a new role must publish, attest, or subscribe. Rotate by shipping a new policy version; policy_grace_seconds (default 300) lets the previous version linger briefly.

Claude Desktop and Cursor cannot hold these private keys. For them, build cmd/securebus-agent and run it as a local stdio MCP server with SYNA_BASE_URL, SYNA_TOKEN, and SYNA_TOKEN_ID. The sidecar signs under ~/.synamcps/securebus and forwards publish and attest. Policy, verify, and consume still work against remote /mcp without the sidecar. The envelope format — canonical JSON, SHA-256, Ed25519 over the hash — is documented in docs/securebus-envelope.md if you are not using the Python helpers.