# MCP bridge (OpenClaw → Teddy)

Package: [`mcp-server/`](../../../mcp-server/)

Exposes Teddy **domain tools** over the [Model Context Protocol](https://modelcontextprotocol.io/) so OpenClaw (or any MCP client) can manage the WordPress site through the same ToolRegistry / approval path as the admin Copilot.

## Flow

1. Client starts `node mcp-server/src/index.js` (stdio).
2. Bridge `GET /wp-json/teddy/v1/domain-tools` → MCP `tools/list`.
3. Bridge `POST /wp-json/teddy/v1/tools/{name}/execute` → MCP `tools/call`.
4. Dangerous tools still go through dry-run + `approval_token` (unless `TEDDY_AUTO_APPROVE_DANGEROUS`).

## Requirements

- Setting `use_agent_pipeline` = on (registers domain-tools routes).
- REST auth: Application Password or JWT (`BEAN_AI_JWT_SECRET`).

See [mcp-server/README.md](../../../mcp-server/README.md) for OpenClaw config examples.

**Live (blackbean.io.vn):** [deploy-blackbean-io-vn.md](./deploy-blackbean-io-vn.md) · [approvals-zalo.md](./approvals-zalo.md)

**Buyer onboarding (OpenClaw):** [USER-GUIDE-OPENCLAW.md](./USER-GUIDE-OPENCLAW.md) · [openclaw-onboarding.md](./openclaw-onboarding.md) · package [`openclaw/`](../../../openclaw/)
