Skip to main content
Glama
README.md
# speakr-mcp

[![CI](https://github.com/jjsmackay/speakr-mcp/actions/workflows/ci.yml/badge.svg)](https://github.com/jjsmackay/speakr-mcp/actions/workflows/ci.yml)
[![Licence: MIT](https://img.shields.io/badge/licence-MIT-blue.svg)](LICENSE)
![Python 3.12+](https://img.shields.io/badge/python-3.12%2B-blue.svg)
![MCP 2025-11-25 and 2026-07-28](https://img.shields.io/badge/MCP-2025--11--25%20%7C%202026--07--28-6e56cf.svg)

An [MCP](https://modelcontextprotocol.io) server for [Speakr](https://github.com/murtaza-nasir/speakr), the self-hosted transcription and meeting-notes app. It gives an AI agent such as Claude a small set of tools to find your recordings, read their summaries, notes and transcripts, and ask questions across them.

> "What did we agree with the supplier about delivery dates last month?"
>
> "Find the call where Sam mentioned the budget, and show me what was said around it."
>
> "Summarise every recording tagged *Board* since 1 October."

It talks to Speakr's `/api/v1` REST API with a Speakr API token. I've tested it against Speakr v0.11.10.

## Why this server

- **Task-shaped tools.** One search tool covers words, speakers, tags, folders and dates. The nine tools take about 5,000 tokens of definitions.
- **Look things up by name.** You pass tags, folders and speakers as names, and the server finds the ids. An unknown name returns the closest matches.
- **Small results.** Each call returns structured data with a one-line summary. The server drops empty fields and pages long transcripts by time, so an agent can jump to the moment a search found.
- **Read-only by default.** You turn on the two write tools yourself. There are no delete, share or webhook tools.
- **Errors an agent can act on.** A missing scope, a disabled feature, a rate limit or an unknown recording each comes back with what to do next.
- **Tokens stay secret.** The server sends them in request headers and keeps them out of logs, results and errors.

[docs/design.md](docs/design.md) explains these choices.

## Tools

| Tool | What it does | Token scope |
|---|---|---|
| `speakr_recordings_search` | Find recordings by words, speaker, tag, folder or date | `read` |
| `speakr_recording_get` | One recording's details, summary and notes, or its processing stage | `read` |
| `speakr_transcript_get` | The speaker-labelled transcript, paged by time | `read` |
| `speakr_inquire` | Ask a question across recordings; get an answer with citations | `process` |
| `speakr_speakers_list` | People named in Speakr | `read` |
| `speakr_tags_list` | Your tags | `read` |
| `speakr_folders_list` | Your folders | `read` |
| `speakr_recording_update` | Change title, participants, notes or summary; add or remove tags | `write` |
| `speakr_recording_process` | Queue a recording for transcription or summarising again | `process` |

The server adds the last two only when `SPEAKR_WRITE_TOOLS_ENABLED=true`. `speakr_inquire` also needs Inquire turned on in Speakr. [docs/tools.md](docs/tools.md) lists every parameter and output.

## Quick start

You need Speakr v0.11 or later, a Speakr API token, and [uv](https://docs.astral.sh/uv/).

**1. Create a token.** In Speakr, open Account settings > API tokens. Choose **Read only** for the read tools. Add `process` for `speakr_inquire`, and `write` if you will turn on the write tools.

**2. Add the server to your MCP client.**

Claude Code:

```sh
claude mcp add speakr \
  -e SPEAKR_URL=https://speakr.example.com \
  -e SPEAKR_API_TOKEN=your-token \
  -- uvx --from git+https://github.com/jjsmackay/speakr-mcp speakr-mcp
```

Claude Desktop, in `claude_desktop_config.json`:

```json
{
  "mcpServers": {
    "speakr": {
      "command": "uvx",
      "args": ["--from", "git+https://github.com/jjsmackay/speakr-mcp", "speakr-mcp"],
      "env": {
        "SPEAKR_URL": "https://speakr.example.com",
        "SPEAKR_API_TOKEN": "your-token"
      }
    }
  }
}
```

Other clients that start a stdio server take the same command and environment.

**3. Ask about a meeting.** The server checks the token when it starts. If Speakr rejects the token, or the URL doesn't reach Speakr, it exits with a message in the client's MCP log saying what to fix.

To run one shared instance over HTTP in Docker, see [docs/deployment.md](docs/deployment.md).

## Configuration

| Variable | Needed | Meaning |
|---|---|---|
| `SPEAKR_URL` | yes | Speakr's base URL, such as `https://speakr.example.com` |
| `SPEAKR_API_TOKEN` | yes | A Speakr API token |
| `SPEAKR_WRITE_TOOLS_ENABLED` | no | `true` adds the two write tools. Off by default |
| `SPEAKR_TIMEOUT_SECONDS` | no | Timeout for Speakr calls, default 30. Inquire always gets 120 |
| `SPEAKR_MCP_HTTP_TOKEN` | HTTP only | Bearer token clients must send, at least 32 characters |
| `SPEAKR_MCP_ALLOWED_HOSTS` | HTTP only | Comma-separated `Host` header values to accept |

`SPEAKR_URL` has to reach Speakr itself. A login gate such as Cloudflare Access redirects API calls to its login page, and the server refuses to start. Use an address on your network, or one the gate lets through.

## Security

- The server acts as the Speakr user who owns the token. Anyone who can call it can read what that user can read.
- Use the narrowest token that works. The server warns at startup when a token has full access.
- HTTP mode needs a bearer token and a `Host` allowlist. Run it on a private network or behind a VPN.
- `speakr_inquire` answers are written by Speakr's language model from transcript text. Treat them as untrusted input.

[SECURITY.md](SECURITY.md) has the full model and how to report a vulnerability.

## Development

```sh
uv sync
uv run pytest                 # unit tests, Speakr mocked
uv run pytest -m live         # read-only checks against a real Speakr; needs SPEAKR_URL and SPEAKR_API_TOKEN
uv run ruff check . && uv run ruff format --check . && uv run mypy
```

[CONTRIBUTING.md](CONTRIBUTING.md) covers how to plan a change and what the tests enforce.

## Licence

[MIT](LICENSE). speakr-mcp is an independent project. The Speakr maintainers don't run it.