# MCP server

> Connect Claude, ChatGPT, Cursor, VS Code and other AI apps to your Teemli — ask your agents, search, manage work items, read docs and post in chat, as you.

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

Teemli runs an **MCP server**, so AI apps you already use can work with your Teemli: hand a job to one of your agents, find a doc, file a work item, catch up on a channel or a meeting.

**MCP** (Model Context Protocol) is the open standard AI apps use to connect to other tools. You add Teemli's address to your AI app once, sign in, and the app gets a set of Teemli tools it can call while you chat with it.

```text
https://api.teemli.com/mcp
```

## What an AI app can do

Everything happens **as you**: the app sees exactly what you can see in Teemli, never a colleague's private things or another organisation's data.

| Tool | What it does | Scope (API keys) |
|---|---|---|
| `list_agents` | Your agents and the AI employees shared with you | `agents:read` |
| `ask_agent` | Give one of your agents a task and wait (up to 50 s) for the answer | `agents:run` |
| `get_task`, `list_tasks` | Check on agent tasks: working, waiting, done, couldn't finish | `agents:read` |
| `search` | Search everything you can see, like ⌘K in the app | any read scope |
| `list_projects`, `my_work_items`, `get_work_item` | Read projects and work items (Tasks) | `tasks:read` |
| `create_work_item`, `update_work_item` | Create work items, change them, add comments | `tasks:write` |
| `read_doc` | Read a Docs page as Markdown | `docs:read` |
| `suggest_doc_append` | Suggest an addition to a page (see below) | `docs:write` |
| `list_channels`, `read_channel` | Your channels and DMs, and their latest messages | `chat:read` |
| `post_message` | Post in a channel or DM you're in | `chat:write` |
| `list_meetings`, `get_meeting` | Your meeting notes, decisions, action items and transcripts | `meetings:read` |

When an app asks one of your agents to do something, the agent works exactly as if you'd asked it in Teemli: on its own cloud computer, with your connected apps, and it **asks you in Teemli** before anything sensitive. Approvals can only be answered in Teemli, never by the AI app.

### Labelled as AI

What an app writes where other people see it says so, like everything an agent does:

- **Chat:** messages show your name **via Claude (AI)** (or whichever app posted them).
- **Docs:** additions arrive as **suggestions** from "Your name via Claude (AI)". Nothing changes until someone who can edit the page accepts them.
- Work items and comments are created as you.

Good AI apps ask before calling a tool that others will see (Teemli marks `post_message` as one to confirm). Still, only connect apps you trust, and give API keys only the scopes they need.

## Connect an AI app

There are two ways to sign in:

- **Sign in with Teemli (OAuth)**, recommended: the app opens Teemli's sign-in page, you sign in as usual and approve the app on a consent screen. The app gets **your** access, like the Teemli app. Nothing to copy or paste.
- **A personal API key**, for apps that can't do the sign-in, or when you want to limit what the app can do with [scopes](/developers/api/#what-a-key-can-see). Create one in **Developers → API keys** and send it as `Authorization: Bearer tml_…`. Tools outside the key's scopes aren't offered to the app.

:::note
Your organisation's admin can turn off API access for everyone (**Admin → Switches → API access**). That switches off the MCP server too.
:::

### Claude (claude.ai and Claude Desktop)

1. Open **Settings → Connectors** and choose **Add custom connector**.
2. Name it "Teemli" and paste `https://api.teemli.com/mcp` as the URL.
3. Click **Connect**, sign in to Teemli and approve Claude.
4. In a chat, turn Teemli on from the tools menu and ask, for example: *"Ask my Teemli assistant to summarise this week's sales emails."*

On Team and Enterprise plans an owner may need to add the connector for the organisation first.

### Claude Code

```sh
claude mcp add --transport http teemli https://api.teemli.com/mcp
```

Then run `/mcp` inside Claude Code and choose **Authenticate** to sign in. With an API key instead:

```sh
claude mcp add --transport http teemli https://api.teemli.com/mcp \
  --header "Authorization: Bearer tml_your_key"
```

### ChatGPT

Custom connectors need a ChatGPT plan that allows them (and, on Business and Enterprise plans, an admin who allows them).

1. Open **Settings → Apps & Connectors**. Under **Advanced settings**, turn on **Developer mode** if your plan asks for it.
2. Choose **Create** (or **Add custom connector**), name it "Teemli", and paste `https://api.teemli.com/mcp`.
3. Choose **OAuth** as the authentication, create it, then sign in to Teemli and approve ChatGPT.

### Cursor

Add Teemli to `~/.cursor/mcp.json` (all projects) or `.cursor/mcp.json` (one project):

```json
{
  "mcpServers": {
    "teemli": { "url": "https://api.teemli.com/mcp" }
  }
}
```

Cursor shows a **Needs login** button next to Teemli in its MCP settings: click it to sign in. With an API key, add `"headers": { "Authorization": "Bearer tml_your_key" }` next to `url`.

### VS Code (GitHub Copilot)

Add to `.vscode/mcp.json` in your project (or run **MCP: Add Server** from the command palette and pick **HTTP**):

```json
{
  "servers": {
    "teemli": { "type": "http", "url": "https://api.teemli.com/mcp" }
  }
}
```

VS Code asks you to sign in to Teemli the first time a tool is used.

### Other apps

Any app that supports **remote MCP servers over Streamable HTTP** works: use `https://api.teemli.com/mcp` with OAuth, or send a personal API key in the `Authorization` header. For apps that only run local (stdio) servers, the open-source [`mcp-remote`](https://www.npmjs.com/package/mcp-remote) bridge connects them:

```json
{
  "mcpServers": {
    "teemli": { "command": "npx", "args": ["-y", "mcp-remote", "https://api.teemli.com/mcp"] }
  }
}
```

## Disconnect an app

- **Signed in with OAuth:** remove the connector in the AI app. To end its access for good, open your [sign-in account page](https://auth.teemli.com/realms/teemli/account/applications) → **Applications** and remove the app there.
- **API key:** revoke the key in **Developers → API keys**. It stops working at once.

## For developers

- **Transport:** Streamable HTTP, stateless (no sessions), JSON responses. Clients on the `2026-07-28` protocol and older ones that start with `initialize` both work.
- **Authorization:** OAuth 2.1 with PKCE. A request without a token gets `401` with `WWW-Authenticate: Bearer resource_metadata="https://api.teemli.com/.well-known/oauth-protected-resource/mcp"`. That [protected resource metadata](https://www.rfc-editor.org/rfc/rfc9728) names the authorization server, `https://auth.teemli.com/realms/teemli`, which supports dynamic client registration and shows a consent screen. Or send a personal API key as the bearer token.
- **Errors:** a tool that fails (not found, missing scope, a rule like "you're not a member of this channel") returns a normal result with `isError: true` and a sentence explaining why, so the AI can tell you.
- **Limits:** API keys keep their [rate limits](/developers/api/#rate-limits). Service keys can't be used (they never read content).
- **What's never available:** answering an agent's approval cards, private sign-in and passwords, model keys, connecting apps and managing keys. Those always need you in the Teemli app.

Teemli's own agents can also *use* other MCP servers: see [Apps and connections](/agents/apps/).
