---
title: "Designing an MCP server agents can’t abuse"
description: "PaneScale’s MCP bridge lets any agent work with your task board. These are the decisions that keep it from becoming a way around your approvals."
url: "https://panescale.com/blog/an-mcp-server-agents-cant-abuse"
published: "2026-10-10"
updated: "2026-10-29"
category: "Engineering"
---

# Designing an MCP server agents can’t abuse

PaneScale’s MCP bridge lets any agent work with your task board. These are the decisions that keep it from becoming a way around your approvals.

The [MCP bridge](https://panescale.com/docs/mcp) turns PaneScale into a tool other agents can use. An agent in any pane — or any MCP client on your machine — can read the task board, create cards, move them, list workflows, send you a notification or call one of your managed MCP connections.

That is useful. It is also exactly the kind of surface that tends to grow until it can do everything. These are the rules we set before writing the first line, the threats each one answers, and a checklist you can use for an MCP server of your own.

## Who we are defending against

A local MCP server has three kinds of unwanted callers, and each needs a different defence:

| Caller | How it gets in | Defence |
| --- | --- | --- |
| Another machine on your network | Connects to your computer’s IP address | Listen on loopback only |
| A web page in your browser | Sends requests to `localhost`, possibly via DNS rebinding | Reject requests with a browser `Origin` |
| Another program on your computer | Connects to the local port like any client | Require a secret token |
| The agent itself, misled by text it read | Calls the tools it legitimately has | Give it only tools that are safe to misuse |

The last row is the one most designs forget. Prompt injection means an agent can be talked into calling a tool by text it was asked to read — an issue, a web page, a comment in code. Authentication does not help there, because the agent *is* an authorized client. The only defence is a tool list where the worst misuse is boring.

## Off until you turn it on

The bridge doesn’t run by default. Turning it on is a deliberate switch in Settings, and turning it off closes it immediately.

## Loopback only

The server listens on `127.0.0.1` only, on a port between 41920 and 41929. Nothing on your network can reach it — not another computer, not a phone on the same Wi-Fi.

The MCP specification asks the same of local servers using its HTTP transport: bind to localhost rather than all network interfaces. It is the cheapest rule on this list and closes the largest door.

## A token for every request

Every request needs a bearer token. Tokens are 43 random characters, compared in constant time so response timing doesn’t leak how much of a guess was right. You can regenerate the token at any moment; every client using the old one stops working at once.

## No browsers

A web page you visit could try to send requests to `localhost`. The bridge refuses any request that carries a browser `Origin` header. Real MCP clients don’t send one; browsers always do.

This is the defence against DNS rebinding, where a malicious site makes your browser believe that its own domain points at `127.0.0.1` and then talks to local services as if they were part of the site. The MCP specification says servers must validate the `Origin` header on incoming connections for exactly this reason. Loopback alone does not stop it, because the request really does come from your machine.

## Small requests

Request bodies are capped at 1 MB. There is no legitimate reason for a board operation to be larger, and a cap makes some kinds of mischief impossible.

## A short tool list

Six tools, each doing one thing. There is no generic “run a command” tool, no file access and nothing that changes your repository. If an agent needs to work on code, it does so in its own pane, under its own rules.

A short list is also better for the agents. Every tool definition is sent to the model with every turn, and a long list of overlapping tools makes it more likely that the model picks the wrong one. Six clearly named tools are easier to use correctly than sixty clever ones.

## The column agents can’t reach

Agents can move cards to *running*, *needs review*, *blocked*, *failed* or *stopped*. They can’t move a card to **done**. That column is reserved for people, because “done” is a judgment, not a status update.

## Nothing that publishes

The bridge has no tool to approve, merge, push or publish. Those actions need [signed one-time approvals](https://panescale.com/docs/approvals) that only come from clicks in PaneScale itself. An agent connected through MCP can ask you — with a notification — but it can’t say yes on your behalf.

## Managed connections, bounded

The bridge can call your own MCP connections by name. Those calls inherit the same limits PaneScale uses everywhere: a ten-second timeout, at most a hundred tools per server, results capped at 128 kB.

Limits on results matter more than they look. A tool result goes straight into the model’s context; an unbounded result can push the actual task out of the context window, or smuggle a large block of untrusted text into it. A cap keeps both problems small.

## A checklist for your own MCP server

If you are building a local MCP server — for your team’s tools, your project, your home lab — these questions catch most problems before they ship:

1. **Does it need to be on?** Start disabled; make enabling it a deliberate act.
2. **Where does it listen?** Loopback only, unless you have a real reason and real authentication.
3. **Who can call it?** A random token per installation, compared in constant time, easy to rotate.
4. **Does it reject browsers?** Validate `Origin`; refuse anything that looks like a page.
5. **What is the worst thing each tool can do if misused?** If the answer is “delete”, “publish” or “spend money”, that tool needs a human confirmation outside the agent’s reach — or should not exist.
6. **How big can requests and results get?** Cap both.
7. **What happens on a timeout?** A slow downstream server should fail one call, not hang the agent.

None of these needs a framework. They are a page of code, and they decide whether a useful tool stays useful.

## The pattern

None of these rules is clever. Together they follow one principle: **give agents capabilities that are useful when used well and boring when used badly.** Reading and organizing a board is useful. Approving your own work is not something an agent should be able to do, no matter how politely it asks.

## Questions about the bridge

### Can I use the bridge from an agent outside PaneScale?

Yes. Any MCP client on the same computer can connect, as long as it has the token. That is the point of the bridge: an agent in a normal terminal, or another tool you use, can read and organize the same board as the agents inside PaneScale.

### What happens if the token leaks?

Regenerate it in Settings. Every client using the old token stops working at once, and the new token only needs to be pasted into the clients you trust. Because the bridge only listens on your own computer and has no tool that publishes or approves, a leaked token is an annoyance rather than a disaster — which is exactly the design goal.

### Why not let agents mark cards as done?

Because “done” is the one status that means a person looked at the result. If an agent could set it, the board would show what agents believe about their own work, and the column would stop meaning anything.

## The six tools, in full

For reference, this is the complete tool list. Reading it is the fastest way to judge what an agent connected through the bridge can and cannot do:

| Tool | What it does |
| --- | --- |
| `panescale_list_tasks` | Read the board, optionally filtered by status |
| `panescale_create_task` | Add a card with title, description, labels and project |
| `panescale_move_task` | Move a card to another column, optionally with a summary — never to done |
| `panescale_list_workflows` | See your saved workflows |
| `panescale_notify` | Show you a notification |
| `panescale_call_connection` | Call a tool on one of your managed connections |

Nothing on this list reads your files, runs a command or reaches the network on its own. The one tool that reaches further — calling a managed connection — only reaches servers you configured yourself, with the limits described above.

## Sources

- [MCP specification: transports](https://modelcontextprotocol.io/specification/2025-06-18/basic/transports) — localhost binding, `Origin` validation against DNS rebinding, authentication
- [MCP specification: tools](https://modelcontextprotocol.io/specification/2025-06-18/server/tools) — how tools are described to clients and models
- [OWASP LLM06: Excessive agency](https://genai.owasp.org/llmrisk/llm062025-excessive-agency/) — limiting what an agent’s tools can do
- [OWASP LLM01: Prompt injection](https://genai.owasp.org/llmrisk/llm01-prompt-injection/) — why authorized agents can still be misled
