# Baton

> Baton is a free MCP server for developer tools. Local MCP server to edit git-native API requests, environments and scripts in Baton. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Free
- **Platforms:** CLI, macOS, Windows, Linux
- **Website:** https://baton.dudko.dev
- **Repository:** https://github.com/dudko-dev/baton-mcp-setup
- **MCP Registry name:** dev.dudko/baton
- **Categories:** developer tools
- **Listing updated:** 2026-11-14

## About

Baton keeps API requests, collections and environments as plain YAML files in a git repository, and this local stdio server (npm package @dudko.dev/baton-mcp, Node.js 24 or later) lets an assistant work in that workspace. It has two modes chosen at start. In file mode the assistant writes the same YAML the app would, so every edit goes through git review, and it cannot send requests unless you add --allow-run.

In app mode, with the Baton desktop app open on the workspace, edits arrive as drafts on the request's tab for you to accept or discard. Sends run through the app using its secrets, and a send into a production environment or a delete waits for your confirmation. The assistant can also see which request and environment you have open.

Secrets never pass through the server: environments list secret names and sources only. Tools also cover scripts, saved response examples and local mock servers that answer from examples on 127.0.0.1. There is no auth because it runs locally with your user's permissions. Baton itself is free for personal, non-commercial use.

## Features

- **File and app modes:** Edit YAML directly, or propose drafts inside the open Baton app.
- **Request and collection editing:** Create, move, rename and delete requests, collections and folders.
- **Secret-safe environments:** Only secret names and sources are visible, never values.
- **Script access:** Read and write pre-request, test and shared library scripts.
- **Local mocks:** Start mocks from YAML files that answer from saved examples.
- **Confirmation gates:** Production sends and deletes wait for your approval in app mode.

## Good for

- Have an assistant add a request to a collection as a reviewable diff
- Rename or move requests without losing their scripts
- Draft test scripts for existing requests
- Run a collection through the app and review the results
- Spin up a mock API from saved examples

## Install

### Claude Code (Terminal)

```sh
claude mcp add baton -- npx -y @dudko.dev/baton-mcp
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "baton": {
      "command": "npx",
      "args": [
        "-y",
        "@dudko.dev/baton-mcp"
      ]
    }
  }
}
```

### Cursor (~/.cursor/mcp.json)

```json
{
  "mcpServers": {
    "baton": {
      "command": "npx",
      "args": [
        "-y",
        "@dudko.dev/baton-mcp"
      ]
    }
  }
}
```

### VS Code (.vscode/mcp.json)

```json
{
  "servers": {
    "baton": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@dudko.dev/baton-mcp"
      ]
    }
  }
}
```

### Windsurf (~/.codeium/windsurf/mcp_config.json)

```json
{
  "mcpServers": {
    "baton": {
      "command": "npx",
      "args": [
        "-y",
        "@dudko.dev/baton-mcp"
      ]
    }
  }
}
```

### Other clients (your client's MCP settings (most use this shape))

```json
{
  "mcpServers": {
    "baton": {
      "command": "npx",
      "args": [
        "-y",
        "@dudko.dev/baton-mcp"
      ]
    }
  }
}
```

## Tools

- `workspace_info`: Lists collections, environments, schedules, load issues and app connection.
- `list_requests`: Lists requests with method, URL and tags.
- `get_request`: Returns a parsed request and its raw YAML.
- `upsert_request`: Writes a request or proposes it as a draft.
- `move_request`: Moves or renames a request.
- `delete_request`: Deletes a request.
- `upsert_collection`: Creates or replaces a collection or folder.
- `list_environments`: Lists variables and secret names.
- `upsert_environment`: Writes an environment.
- `get_script`: Reads a script.
- `upsert_script`: Writes a script.
- `run_request`: Executes a request.
- `run_collection`: Executes every request under a collection.
- `list_examples`: Lists a request's saved responses.
- `save_example`: Saves the last response as an example.
- `list_mocks`: Lists mocks.
- `start_mock`: Starts a local mock.
- `stop_mock`: Stops a mock.
- `app_state`: Shows what is open in the app.
- `select_request`: Opens a request in the app.

## FAQ

### Can the assistant send requests?

In file mode only with --allow-run; in app mode every send goes through the app on your screen.

### What does it need?

Node.js 24 or later and a Baton workspace, the folder with baton.yaml.

### Does it handle my secrets?

No. Secrets never pass through it; it sees only names and sources.

### Is Baton free to use at work?

No. The free licence covers personal, non-commercial use; company use needs a commercial licence.

### Is Baton free?

Yes. Baton is free to use.

### How do I add Baton to Claude Code?

Run this command in your terminal: claude mcp add baton -- npx -y @dudko.dev/baton-mcp

### What are the best alternatives to Baton?

The closest alternatives to Baton are REA, Codebase Memory, GitHub, Serena MCP: the IDE for your agent and XERJ.

## Alternatives

- [REA](https://ai-powered.com/mcp/rea): REA is an open-source MCP server for developer tools.
- [Codebase Memory](https://ai-powered.com/mcp/codebase-memory): Codebase Memory is an open-source MCP server for knowledge and memory.
- [GitHub](https://ai-powered.com/mcp/github-2): GitHub is an open-source MCP server for developer tools.
- [Serena MCP: the IDE for your agent](https://ai-powered.com/mcp/serena-mcp-the-ide-for-your-agent): Serena MCP: the IDE for your agent is an open-source MCP server for developer tools.
- [XERJ](https://ai-powered.com/mcp/xerj): XERJ is an open-source MCP server for knowledge and memory.
- [Ouroboros](https://ai-powered.com/mcp/ouroboros): Ouroboros is an open-source MCP server for developer tools.
- [Claude Code Ultimate Guide](https://ai-powered.com/mcp/claude-code-ultimate-guide): Claude Code Ultimate Guide is an open-source MCP server for ai models and llm tooling.
- [Concord MCP](https://ai-powered.com/mcp/concord-mcp): Concord MCP is a freemium MCP server for developer tools.

---
Source: https://ai-powered.com/mcp/baton
