Skip to main content
Glama
README.md
# FreeLLM MCP

Create images and short videos from any MCP client, and clean up existing clips.

**Endpoint:** `https://mcp.freellm.xin/mcp` (Streamable HTTP)

| Tool | What it does |
| --- | --- |
| `create_video` | Text to video, or animate a still image (`image_url`) |
| `extend_video` | Continue an existing clip by a few seconds |
| `create_image` | Text to image, 1–4 images, five aspect ratios |
| `edit_image` | Change an image by instruction (restyle, swap background, add or remove objects) |
| `upscale_image` | 2K / 4K / 8K |
| `upscale_video` | 4K |
| `remove_video_watermark` | Erase a logo or watermark from a clip you own |
| `remove_video_subtitles` | Strip burned-in subtitles |
| `get_task` | Poll a job; returns the file URLs when done |
| `get_balance` | Credits left |

Creation tools are asynchronous: they return a `task_id` at once, and `get_task` reports progress and results. Images usually take under a minute, videos 1–5 minutes.

Tools for real people's likeness (face swap, person replacement, lip sync, talking avatars) are deliberately not exposed here.

## Connect

You need a FreeLLM account and API key: sign up at [freellm.xin](https://freellm.xin) (new accounts get 100 free credits) and create a key at [freellm.xin/app/keys](https://freellm.xin/app/keys). Jobs are billed to that account; failed jobs are free.

**OAuth (recommended).** Add `https://mcp.freellm.xin/mcp` as a remote MCP server. The client registers itself (dynamic client registration), opens a FreeLLM consent page, and you paste your key there once. The key stays on the FreeLLM side; the client only gets an OAuth token.

**API key as Bearer token.** For clients that only take a static header:

```json
{
  "mcpServers": {
    "freellm": {
      "type": "http",
      "url": "https://mcp.freellm.xin/mcp",
      "headers": { "Authorization": "Bearer plh_your_key" }
    }
  }
}
```

**Claude Code.** This repo is also a plugin (MCP server + the `freellm-creator` skill):

```
/plugin marketplace add joeytang/freellm-mcp
/plugin install freellm@freellm
```

## Skill

[`skills/freellm-creator/SKILL.md`](skills/freellm-creator/SKILL.md) teaches an agent how to use the tools well: confirm cost before submitting, start with 5 seconds, poll instead of retrying, and stay away from real people's likeness.

## Run your own

The server is a Cloudflare Worker (`agents` MCP handler + `@cloudflare/workers-oauth-provider`) that forwards each call to the public FreeLLM API with the user's own key.

```
npm install
npx wrangler kv namespace create OAUTH_KV   # put the id in wrangler.jsonc
npx wrangler deploy
```

Set `PUBLIC_ORIGIN` and `FREELLM_API_BASE` in `wrangler.jsonc`.

---

# 中文说明

在任何支持 MCP 的 AI 助手里使用 FreeLLM:文生视频、图生视频、视频续写、文生图、改图、图片/视频超分、去水印、去字幕。

- MCP 地址:`https://mcp.freellm.xin/mcp`(Streamable HTTP)
- 鉴权:OAuth(助手会弹出 FreeLLM 授权页,贴一次 API Key 即可),或直接把 API Key 作为 Bearer Token
- API Key 在 [freellm.xin/app/keys](https://freellm.xin/app/keys) 创建,新账号送 100 积分,失败的任务不扣费
- 不提供换脸、人物替换、对口型、数字人等涉及真人肖像的能力

## License

MIT