Skip to main content
Glama
README.md
# @useclypt/mcp-server

Model Context Protocol server for **Clypt**. Lets AI agents (Claude Desktop, Cursor, Claude Code, any MCP-aware client) submit a podcast URL and receive clips, an optional trailer, show notes, a guest-share link, and the transcript.

Pure shim over the public REST API at `https://useclypt.com/api/v1` — three tools, no clever middleware.

## Tools

| Tool | Wraps | Returns |
|---|---|---|
| `submit_job` | `POST /v1/jobs` | `{ id, status: 'queued', ... }` — kicks the pipeline. Wall-clock to terminal: ~2-5 min for audio/RSS sources, ~10-12 min for video + trailer. |
| `get_job` | `GET /v1/jobs/{id}` | Current job state. When `status='complete'`, `output` contains clips, optional trailer, `guest_share_url`, `show_notes`, transcript. When `failed`, `error` carries a `code` + `message`. |
| `list_jobs` | `GET /v1/jobs` | Cursor-paginated list of the org's recent jobs. |

The flow is asynchronous: `submit_job` returns immediately with a queued id; the agent polls `get_job` until terminal. Once a webhook is registered against your org, `job.completed` and `job.failed` events fire on every terminal transition — register via the public API at `POST /v1/webhooks` (no MCP tool for this yet; coming in a later minor).

## Try it

With the server configured in Claude Desktop, ask:

> *Use Clypt to clip this podcast and tell me when it's done: https://feeds.simplecast.com/abc123*

Claude will call `submit_job`, get back a job id, poll `get_job` until terminal, and surface the clips + trailer + transcript inline. Wall-clock: ~2-5 min for audio/RSS, ~10-12 min for video + trailer.

## Installation

```bash
npm install -g @useclypt/mcp-server
```

Or run without installing:

```bash
npx -y @useclypt/mcp-server
```

## Configuration

### Claude Desktop

`~/Library/Application Support/Claude/claude_desktop_config.json` (macOS) or `%APPDATA%\Claude\claude_desktop_config.json` (Windows):

```json
{
  "mcpServers": {
    "clypt": {
      "command": "npx",
      "args": ["-y", "@useclypt/mcp-server"],
      "env": {
        "CLYPT_API_KEY": "clk_live_..."
      }
    }
  }
}
```

Restart Claude Desktop. Then prompt: *"Use Clypt to clip this podcast: <RSS or audio URL>"*.

### Cursor / Claude Code / other MCP hosts

Same recipe — the binary is `mcp-server` (or run without global install via `npx -y @useclypt/mcp-server`) and the only required env var is `CLYPT_API_KEY`.

## Sandbox keys (free testing)

If your key starts with `clk_test_` instead of `clk_live_`, every job returns a deterministic fixture instead of running the real pipeline. No transcription cost, no R2 storage cost, no Stripe charges. Useful for wiring up your agent before you commit to real submissions.

Fixture mapping:
- `source.type='video_url'` (any URL) → success fixture with 3 clips + optional trailer
- `source.type='audio_url'` / `rss_feed_url` (URL without "fail") → success fixture
- Any URL containing "fail" → `transcription_failed` error fixture
- `source.type='youtube_url'` → `youtube_ingestion_failed` error fixture
- Malformed URL → `invalid_source_url` validation error at submit

Get a sandbox key in seconds at [useclypt.com/developers/signup](https://useclypt.com/developers/signup) — no credit card, no waiting list. Sandbox keys (prefix `clk_test_`) return deterministic fixtures so you can wire up your agent for free before swapping in a `clk_live_` key.

## Environment variables

| Variable | Required | Default | Purpose |
|---|---|---|---|
| `CLYPT_API_KEY` | yes | — | Bearer token for the Clypt API. `clk_live_*` or `clk_test_*`. |
| `CLYPT_BASE_URL` | no | `https://useclypt.com` | Override for staging or local development. Trailing slash is stripped. |

## Development

```bash
npm install
npm run build
npm test              # vitest unit tests with mocked fetch
npm run dev           # tsc --watch
```

Smoke against the live API with the MCP inspector CLI:

```bash
npm run build
CLYPT_API_KEY=clk_test_xxx \
  npx @modelcontextprotocol/inspector --cli node dist/index.js --method tools/list
```

## Learn more

- API reference: [useclypt.com/developers/docs](https://useclypt.com/developers/docs)
- Get a key: [useclypt.com/developers/signup](https://useclypt.com/developers/signup)
- About Clypt: [useclypt.com](https://useclypt.com)

## License

MIT — see [LICENSE](LICENSE).

TDQS

A4.5/5.0

Scored across 3 tools

Disambiguation5/5

Each tool has a clearly distinct purpose: submit creates a job, get retrieves a specific job, and list enumerates jobs. No overlap or ambiguity.

Naming Consistency5/5

All tool names follow a consistent verb_noun pattern: submit_job, get_job, list_jobs. The slight pluralization in list_jobs is a minor and natural deviation.

Tool Count5/5

Three tools is well-scoped for the server's purpose of managing asynchronous podcast processing jobs. Each tool earns its place with no redundancy.

Completeness4/5

The surface covers the core lifecycle: submit, poll, and list jobs. Missing cancel/delete is a minor gap but not essential for the stated async-processing workflow.