# Mcp

> Teemli's MCP server for AI apps (Claude, ChatGPT, Cursor…), with OAuth 2.1 discovery: 2 endpoints of the Teemli API.

Source: https://docs.teemli.com/developers/reference/mcp/

Generated from [`api/openapi.yaml`](/developers/api/) (OpenAPI 3.1). Base URL: `https://api.teemli.com`. Auth: `Authorization: Bearer <token or tml_ API key>`. Errors are `application/problem+json`; writes accept an `Idempotency-Key` header.

Teemli's MCP server for AI apps (Claude, ChatGPT, Cursor…), with OAuth 2.1 discovery

## Teemli's MCP server (Streamable HTTP, JSON-RPC 2.0)

```http
POST /mcp
```

The Model Context Protocol endpoint for AI apps (Claude, ChatGPT, Cursor, VS Code…): `initialize`,
`tools/list`, `tools/call`. Stateless (no `Mcp-Session-Id`); JSON responses. Every request acts as one
person: an OAuth 2.1 access token from Keycloak (dynamic client registration + PKCE; discovery through
`/.well-known/oauth-protected-resource/mcp`) or a personal API key, whose scopes decide which tools are
listed and callable (`search` needs any read scope). Service keys are refused (403); so is everything
while the organisation's `switches.api` is off. Without a token: 401 with
`WWW-Authenticate: Bearer resource_metadata="…/.well-known/oauth-protected-resource/mcp"`.
Tools: `list_agents`, `ask_agent` (agents:run), `get_task`, `list_tasks`, `search`, `list_projects`,
`my_work_items`, `get_work_item`, `create_work_item`, `update_work_item` (tasks:write), `read_doc`,
`suggest_doc_append` (docs:write; always a suggestion labelled "<person> via <app> (AI)"), `list_channels`,
`read_channel`, `post_message` (chat:write; labelled "via <app> (AI)", members only), `list_meetings`,
`get_meeting`. Tool failures are results with `isError: true` and a sentence, not protocol errors.
Guide: https://docs.teemli.com/developers/mcp/

**API keys:** personal keys; each tool needs its own scope ([MCP server](/developers/mcp/)).

**Responses**

- `200` The JSON-RPC response — object
- `202` A notification was accepted
- `401` No or an invalid bearer token (see `WWW-Authenticate`)
- `403` A service key, or the organisation turned API access off
- `429` The API key is over its rate limit (`Retry-After`)

## OAuth protected resource metadata for the MCP server (RFC 9728)

```http
GET /.well-known/oauth-protected-resource/mcp
```

**Auth:** none (public endpoint).

**Responses**

- `200` `{resource, resource_name, authorization_servers: [the Keycloak realm issuer], bearer_methods_supported, scopes_supported, resource_documentation}` — object
