Orrery Studio Part 4: MCP Server Security, Connecting Servers You Don't Trust

MCP server security comes down to two risks when you connect an AI agent to a server you don't control: its text goes straight into your model's prompt (prompt injection and tool poisoning), and its...

Status, October 2026: everything below shipped in Orrery 0.10.0. In the Studio preview, MCP entries are read-only and carry no credentials yet; secret-backed headers are a follow-up.

MCP server security comes down to two risks when you connect an AI agent to a server you don't control: its text goes straight into your model's prompt (prompt injection and tool poisoning), and its URL is fetched from inside your network (SSRF). This part shows the seven checks Orrery Studio puts around every MCP call, and which attack each one stops.


MCP Server Security: Two Ways a Server Can Hurt You

Seven checks around an MCP call in Orrery Studio: registry, pinned tool text, network guard and egress proxy on the way out; byte caps, result screening and counting on the way back

On the Way Out

1. Only what the operator registered

A composition can name only servers and tools listed in the Studio's registry, a YAML file in deployment config. Each tool is classified by the operator. Studio runs are capped at L2, so a spec naming a tool that isn't marked read_only is refused at validation, before anything runs.

Only HTTP transports are allowed. A stdio MCP server means running someone's program on your host, and the Studio refuses it.

2. Pin the tool text

An MCP server can change its tool descriptions on any request. A tool that looked harmless at review can turn hostile later: a rug pull, one form of tool poisoning. So each tool's description, input schema and annotations are:

A Studio run builds its toolsets fresh each time, so the pins live per process, not per run. Otherwise every run would trust whatever the server serves at that moment. Agents in the Open Part 4 covers how pinning was first added for chat.

3. A network guard on every request

One gap remains, and the code says so: the guard resolves the name, then the connection resolves it again. A DNS server that answers differently in between (DNS rebinding) isn't caught. Where that matters, register the server by IP address.

4. An explicit egress proxy

The guarded client ignores HTTPS_PROXY on purpose: a proxy resolves names itself, out of reach of the address check. Where the only way out is a proxy, the operator names it with ORRERY_STUDIO_EGRESS_PROXY. Then:

Part 6 shows the lab's proxy, which allows exactly two hosts.


On the Way Back

5. Cap the bytes

Each response, or each SSE event, is capped at 8 MiB. Orrery asks for Accept-Encoding: identity and refuses compressed bodies, so the cap counts what really arrives and a small gzip can't expand into gigabytes.

This applies to every HTTP MCP server in 0.10.0, chat's included. It's the behaviour change in the release notes: a server that insists on compressing, or sends a single response over 8 MiB, is now refused.

6. Screen the result

A tool result is data, not instructions. It goes through the same safety screen as a remote agent's reply, then PII redaction.

7. Count it

The output cap, the run's ledger and the audit log all see the call, and the trace gets an mcp.call event with the node, tool, outcome and time. Two nodes using the same tool are told apart.

Orrery Studio MCP inspector with the calls table for search_articles and get_article and the Tirraflow server card listing four read-only tools

Limits Today

Next: Part 5, multi-agent workflow patterns.

Read on Tirraflow