> ## Documentation Index
> Fetch the complete documentation index at: https://stampede.autonomousorganizations.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Tools and MCP servers

> The native tools Stampede offers a model, and how to add tools from MCP servers in config.toml.

A model does its work through tools: it reads and edits files, runs programs, sends mail and delegates. Stampede ships a set of native tools and can add the tools of any MCP (Model Context Protocol) server you configure. Which tools a given run may use is decided by its person's preset or, for your own console turns, by the `[tools]` section (see [Persons](https://stampede.autonomousorganizations.ai/persons/overview.md)).

## Native tools

| Group | Tools |
| - | - |
| Files | `read_file`, `write_file`, `edit`, `apply_patch`, `glob`, `grep`, `list_dir`, `read_artifact_range` |
| Commands | `run_command` (foreground), `start_command`, `command_output`, `kill_command` (background), `inspect_lost_job`, `terminate_lost_job` |
| Persons | `send_message`, `room_open`, `room_post`, `schedule_task` |
| Delegation | `run_subagent`, `run_subagents` |
| Memory and skills | `memory_get`, `memory_search`, `memory_propose`, `skill_search`, `skill_load`, `skill_propose` |
| Session | `todo_write`, `ask_user`, `stampede_state`, `stampede_help` |
| Configuration | `save_model_profile`, `save_mcp_server` |

The file tools stay inside the configured read and write roots unless the run has full access. `run_command` has no shell: the command line is split on spaces, quotes keep spaces inside one argument, and an unquoted `|`, `&&`, `;` or redirect is refused. Which programs may start depends on whose run it is; see [Presets](https://stampede.autonomousorganizations.ai/persons/presets.md). Command time limits are on [Budgets and timeouts](https://stampede.autonomousorganizations.ai/models/limits.md). Mail and rooms are on [Mail and task rooms](https://stampede.autonomousorganizations.ai/teamwork/mail-and-task-rooms.md), delegation on [Sub-agents](https://stampede.autonomousorganizations.ai/teamwork/sub-agents.md).

## Adding an MCP server

Each `[[mcp]]` table in `~/.stampede/config.toml` launches one server as a subprocess. Its tools join the model's set, each name prefixed with the label and two underscores (`github__search_issues`).

```toml theme={null}
[[mcp]]
label = "github"
command = "npx"
args = ["-y", "@modelcontextprotocol/server-github"]
env_passthrough = ["GITHUB_PERSONAL_ACCESS_TOKEN"]
```

| Key | Required | Meaning |
| - | - | - |
| `label` | yes | Short name that prefixes the server's tools. |
| `command` | yes | The program to launch. |
| `args` | no | Its arguments. |
| `env_passthrough` | no | Names of the environment variables the server needs. Names only, never values. |

Put `[[mcp]]` tables below the top-level keys. The values of the `env_passthrough` variables come from the environment or the env file, as model keys do:

```bash theme={null}
# in ~/.stampede/env (mode 0600)
GITHUB_PERSONAL_ACCESS_TOKEN=...
```

### Environment of a server

A server starts with a cleared environment: only `PATH`, `HOME`, `LANG`, `LC_ALL`, `TMPDIR`, `USER` and `TERM`, plus exactly the variables named in its `env_passthrough`. A third-party server cannot read Stampede's model keys, and a token passed to one server reaches only that server.

### Checking a server

Configuration is read at startup, so restart after adding a server. Then check it:

```bash theme={null}
stampede doctor
```

`doctor` shows an `mcp LABEL` row per server: whether the command resolves, whether every `env_passthrough` name is set (names only), and a probe that launches the server and reports its tool count within 30 seconds. `stampede doctor --offline` skips the probe. A server that fails to start during a run is reported and skipped; the run goes on without its tools.

Restart the workers so gateway, schedule and node runs see the server too:

```bash theme={null}
stampede service restart
```

## MCP tool access

A server runs with your rights from the moment it starts, before any tool policy applies. Adding a server or changing what it runs is therefore your edit to the file. The agent's `save_mcp_server` tool can re-save a server you already configured, unchanged, and refuses a new label or a different `command`, `args` or `env_passthrough`.

A `free` person may use every MCP tool. A bounded person uses an MCP tool only when its policy names that tool exactly:

```bash theme={null}
stampede person policy analyst research --allow-tool github__search_issues
```

A person's sub-agents use the same MCP tools from the same running servers. A sub-agent started where no person is involved (your own console turn, a headless `stampede agent`) runs no MCP tool.

## Git host credentials

Commands and MCP servers both run with the cleared environment above, so a token in `~/.stampede/env` does not reach `gh`, `git` or `glab`. Sign those tools in as the service user instead:

```bash theme={null}
gh auth login --with-token < ~/gh-token.txt
gh auth setup-git
```

That login is held in the user's files, so every allowed command a run starts can read it. Use a fine-grained, short-lived token limited to the repositories the person needs.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.