# MCP server

Tendbrook runs a hosted [Model Context Protocol](https://modelcontextprotocol.io) server, so assistants can
read and work in your workspace with your permissions.

- **Endpoint:** `https://api.tendbrook.com/mcp` (Streamable HTTP, JSON responses; protocol versions 2025-06-18 and 2025-03-26).
- **OAuth sign-in.** The server supports OAuth 2.1 with PKCE, and clients such as Claude, ChatGPT and Cursor
  register themselves (RFC 7591) and open the consent screen. Self-registered apps are marked "not verified", get
  capped scopes, and can't touch API keys, secrets, approvals or the audit log. Each person can disconnect the
  apps they've connected under Settings → Connected apps.
- **Or an API key.** An owner creates one in Settings → API keys with the scopes it needs, and the client sends
  `Authorization: Bearer ec_live_…`. The key never has more access than the person who made it.

## What it can do

- **Childcare:** sites, rooms and who is in them, ratios, programs and rosters, meal counts, reservations, forms,
  reports and the message settings (see [every tool](https://www.tendbrook.com/docs/mcp/tools)). Tools that would name a child
  answer with counts unless an owner gave that key or assistant children's records.
- Approvals and the audit log (read only).
- `ec_api` calls any `/v1` route with your credentials.
- `ec_propose` runs a platform action the way an agent does: sends and outside changes wait in the approval inbox
  for a person.
- Approving, API keys and secrets stay in the web app.

## Connect

Claude Code:

```bash
export EC_API_KEY=ec_live_…
claude mcp add --transport http daycaresoftware https://api.tendbrook.com/mcp --header "Authorization: Bearer $EC_API_KEY"
```

Codex (`~/.codex/config.toml`):

```toml
[mcp_servers.daycaresoftware]
url = "https://api.tendbrook.com/mcp"
bearer_token_env_var = "EC_API_KEY"
```

Every call is recorded in the organization's audit log.
