# Reduce MCP token usage


# Reduce MCP token usage

MCP servers are the fastest way to blow through a context window. Every tool
description loads up front, and every tool response comes back raw - a full
`kubectl get pods`, a whole `docker ps` table, a page of JSON. banish compacts
that output at the tool layer, before it ever reaches Claude Code, Cursor, or any
MCP agent.

## Why MCP servers eat your context window

Two things spend tokens before you do any real work:

- Tool descriptions load on the first message. A handful of MCP servers can add
  ten to twenty thousand tokens of schema before you type anything.
- Tool responses return verbatim. A single verbose command can push tens of
  thousands of tokens of raw text back into the window.

The result is the common complaint: multiple MCP servers running, and half the
context window gone before the agent starts.

## When tool output is too large

Naive fixes make it worse. Blindly truncating a response to a fixed byte count
throws away the part you needed and leaves the noise. banish compacts instead of
truncating: it runs the real command, pipes the output through a matching filter,
and returns compact text that keeps the signal.

If a filter does not match or fails, you get the raw output back. banish never
swallows data.

## Compacting MCP responses with banish

Run the server and every verb in your extensions becomes a compact MCP tool:

```sh
banish serve
```

With the default extensions, agents get 45-plus tools out of the box, each a
compact wrapper around a command you already run:

```text
banish_gs      git status, compact
banish_dps     docker ps, compact
banish_kpods   kubectl get pods, compact
...
```

The proxy and the server share the same filters, so you get the same compact
output whether your agent shells out or calls a tool. This is an MCP-native fix -
the compaction happens at the tool boundary, not through a fragile wrapper around
one shell.

## Set it up in one command

Register the server with any MCP-capable agent:

```sh
banish init mcp
```

For Cursor, run `banish init cursor`. See [set up an agent](/docs/getting-started/set-up-an-agent)
for the full list, or read how the [MCP server](/docs/concepts/mcp-server) exposes
your verbs as tools.
