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

> ## Agent Instructions
> These docs describe the Ancha CLI, npm package @ancha-labs/cli version 0.1.4, and the hosted workspace at app.ancha.io. Coding agents should start at https://docs.ancha.io/coding-agents. Run the CLI as `ancha` after `npm install -g @ancha-labs/cli`, or as `npx -y @ancha-labs/cli@0.1.4` without installing. Pass --json for machine-readable output, or set ANCHA_JSON=1. Every command ends with a `next:` line naming the next command. Exit codes: 0 pass, 1 a check failed or a comparison regressed, 2 usage, config or authentication error, 3 infrastructure error, 4 unimplemented endpoint with --strict.

# ancha mcp

> Serve a sandbox's Slack to an MCP client over stdio, and print the mcpServers entry to add to your MCP host.

`ancha mcp` gives an MCP-based agent the Slack tools of a running sandbox. The server speaks MCP over stdio with the profile `ancha-slack-v1` and exposes 19 `slack_*` tools that call the sandbox's Slack Web API. See [Slack](https://docs.ancha.io/tools/slack.md#mcp-server) for the tool list.

## ancha mcp config

```bash theme={null}
ancha mcp config [options]
```

| Option | Description |
| - | - |
| `--sandbox <id>` | Sandbox containing Slack |

```bash theme={null}
ancha mcp config --sandbox 7m1k3pw1
```

```json Output theme={null}
{
  "mcpServers": {
    "ancha": {
      "command": "/path/to/node",
      "args": ["/path/to/@ancha-labs/cli/lib/mcp-entry.mjs", "--sandbox", "7m1k3pw1", "--server-url", "http://127.0.0.1:4400", "--tool", "slack"]
    }
  }
}
```

Merge the `ancha` entry into your MCP host's settings. The paths point at this CLI installation.

## ancha mcp serve

```bash theme={null}
ancha mcp serve [options]
```

| Option | Description |
| - | - |
| `--sandbox <id>` | Sandbox containing Slack |

```bash theme={null}
ancha mcp serve --sandbox 7m1k3pw1 --server-url http://127.0.0.1:4400
```

Runs the MCP server on stdin and stdout. Do not add `--json`: stdout belongs to the protocol.

## Limits

* Slack only. Other tools are reached through their HTTP APIs.
* Bot features only: no direct messages, user-token search, file uploads or attachments. Messages are plain text.
* No reset, delete or other admin tools. Failed Slack calls come back as tool errors; unknown tools as protocol errors.


## Related topics

- [Slack](https://docs.ancha.io/tools/slack.md)
- [ancha playground](https://docs.ancha.io/cli/playground.md)
- [CLI overview](https://docs.ancha.io/cli/overview.md)
- [Environment variables](https://docs.ancha.io/reference/environment-variables.md)
- [ancha serve](https://docs.ancha.io/cli/serve.md)


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