Mirelo MCP Server
Enables AI-powered sound effects generation, audio extension, inpainting, and account management through the Mirelo API, accessible via natural language in MCP-compatible clients.
README
Mirelo MCP Server
A Model Context Protocol (MCP) server that wraps the Mirelo v2 HTTP API, exposing Mirelo's sound-effects generation, audio extension, inpainting, and account tooling to any MCP-compatible client (Claude Desktop, Kiro, and others).
The server speaks MCP over stdio and advertises 21 tools covering six generation families plus job polling, asset uploads, and account lookup.
Features
- Six generation families, each available as a sync generate, async submit, and preflight tool:
- Text → SFX
- Video → SFX
- Extend audio (audio-only)
- Extend audio (with video)
- Inpaint audio (audio-only)
- Inpaint audio (with video)
- Async job polling (
mirelo_job_status) for long-running submissions. - Asset upload slots with optional direct upload of a local file to the presigned S3 URL.
- Account/quota lookup (
mirelo_get_account). - Eager config validation at startup, with a clear error and non-zero exit on invalid configuration.
- Starts and advertises every tool even without an API key — credential-requiring calls return a structured missing-credential error instead of failing at startup.
Requirements
- Node.js
>=20
Installation
npm install
npm run build
npm run build compiles TypeScript to dist/ and produces the executable entrypoint dist/index.js (with a #!/usr/bin/env node shebang, exposed as the mirelo-mcp-server bin).
Configuration
The server reads three environment variables at startup:
| Variable | Required | Default | Notes |
|---|---|---|---|
MIRELO_API_KEY |
No | — | Mirelo API key (bearer token). If absent, the server still starts and advertises all tools; calls that need credentials return a missing-credential error. |
MIRELO_BASE_URL |
No | https://api.mirelo.ai |
Must be an absolute http/https URL. Normalized (trailing slash stripped). An invalid value aborts startup. |
MIRELO_TIMEOUT_MS |
No | 60000 |
Request timeout in ms. Must be an integer in [1000, 600000]. An out-of-range value aborts startup. |
Invalid MIRELO_BASE_URL or MIRELO_TIMEOUT_MS values cause a ConfigError, printed to stderr with a non-zero exit code.
MCP client configuration
Add the server to your MCP client's config (e.g. mcp.json).
Recommended — run via npx (no clone or build; npx fetches the published package on demand):
{
"mcpServers": {
"mirelo": {
"command": "npx",
"args": ["-y", "mirelo-mcp-server"],
"env": {
"MIRELO_API_KEY": "your-mirelo-api-key",
"MIRELO_BASE_URL": "https://api.mirelo.ai",
"MIRELO_TIMEOUT_MS": "60000"
}
}
}
}
Global install (installs the mirelo-mcp-server bin on PATH):
npm install -g mirelo-mcp-server
{
"mcpServers": {
"mirelo": {
"command": "mirelo-mcp-server",
"env": {
"MIRELO_API_KEY": "your-mirelo-api-key"
}
}
}
}
From source (clone + build, then point at the built entrypoint):
{
"mcpServers": {
"mirelo": {
"command": "node",
"args": ["/absolute/path/to/mirelo-mcp/dist/index.js"],
"env": {
"MIRELO_API_KEY": "your-mirelo-api-key"
}
}
}
}
Tools
The server advertises 21 tools.
Generation families
Each family provides three tools:
_generate— synchronous generation; returnsresult_urlswhen the job completes inline._submit— asynchronous submission; returns ajob_id/job_urlto poll._preflight— validates inputs and reports what would be sent without calling the generation endpoint.
| Family | Tools | Notes |
|---|---|---|
| Text → SFX | mirelo_text_to_sfx_generate, mirelo_text_to_sfx_submit, mirelo_text_to_sfx_preflight |
Model versions v1.5 / v1.6. |
| Video → SFX | mirelo_video_to_sfx_generate, mirelo_video_to_sfx_submit, mirelo_video_to_sfx_preflight |
Requires a video Input_Source and duration_ms. |
| Extend audio (audio-only) | mirelo_extend_audio_generate, mirelo_extend_audio_submit, mirelo_extend_audio_preflight |
v1.6. |
| Extend audio (with video) | mirelo_extend_audio_with_video_generate, mirelo_extend_audio_with_video_submit, mirelo_extend_audio_with_video_preflight |
v1.6. |
| Inpaint audio (audio-only) | mirelo_inpaint_audio_generate, mirelo_inpaint_audio_submit, mirelo_inpaint_audio_preflight |
v1.6. |
| Inpaint audio (with video) | mirelo_inpaint_audio_with_video_generate, mirelo_inpaint_audio_with_video_submit, mirelo_inpaint_audio_with_video_preflight |
v1.6. |
Management tools
| Tool | Purpose |
|---|---|
mirelo_job_status |
Poll an async job by job_id (GET /v2/jobs/{job_id}). Reports processing → succeeded / errored. |
mirelo_create_asset_upload_slot |
Create an asset upload slot (POST /v2/assets) and optionally upload a local file to the returned presigned S3 URL. |
mirelo_get_account |
Fetch account details (GET /v2/me): id, email, credits_available, overage_enabled. |
Input sources
Tools that take audio or video accept an Input_Source in one of two shapes:
{ "type": "url", "audio_url": "https://..." }
{ "type": "asset", "asset_id": "asset_..." }
(Use video_url for video sources.) To reference an uploaded file, create an asset with mirelo_create_asset_upload_slot, then pass { "type": "asset", "asset_id": "..." }.
Example prompts to test
These are natural-language prompts you can give an MCP client (Claude Desktop, Kiro, etc.) once the server is connected and MIRELO_API_KEY is set. Each is phrased so the client maps it to the right tool and parameters. Durations are in milliseconds and stay within each tool's valid range.
Account and connectivity
- "Check my Mirelo account — what's my email and how many credits do I have left?"
- "Is overage enabled on my Mirelo account?"
Text → SFX
- "Generate a 5-second sound effect of heavy rain on a tin roof." (sync generate,
duration_ms: 5000) - "Create the sound of a sword being drawn from a metal scabbard, about 2 seconds long, and give me 3 variations." (
duration_ms: 2000,num_samples: 3) - "Make a seamless 10-second looping campfire crackle." (sets
loop: true,duration_ms: 10000) - "Generate a distant thunder rumble using model v1.5." (
model_version: "v1.5") - "Estimate the cost and time to generate a 30-second forest ambience before actually making it." (preflight)
- "Submit a long 45-second cinematic whoosh as a background job and give me the job id." (async submit)
Video → SFX
- "Generate sound effects for this video and match them to its first 8 seconds: https://example.com/clip.mp4." (
videourl source,duration_ms: 8000) - "Add foley to my video asset asset_123 starting at the 2-second mark, and return the result as a muxed video." (
start_offset_ms: 2000,output: "video") - "Preflight the cost of scoring a 12-second video clip." (preflight,
duration_ms: 12000) - "Submit a video-to-SFX job for https://example.com/scene.mp4 covering 20 seconds and give me the job id to poll." (async submit)
Extend audio (audio-only)
- "Take this audio https://example.com/loop.wav and extend it by 8 more seconds." (
append_duration_ms: 8000) - "Extend my audio asset asset_456 by 15 seconds and guide the new part with the prompt 'building to a crescendo'." (
append_duration_ms: 15000,prompt) - "Loop-extend this 3-second clip so it plays seamlessly, adding 5 seconds." (
loop: true,append_duration_ms: 5000)
Extend audio (with video)
- "I have a video at https://example.com/ad.mp4 and its audio at https://example.com/ad.wav — extend the audio by 6 seconds to match the video tail." (
append_duration_ms: 6000) - "Extend the soundtrack of my video asset by 30 seconds starting 4 seconds in." (
append_duration_ms: 30000,start_offset_ms: 4000)
Inpaint audio (audio-only)
- "In this audio https://example.com/take.wav, replace the section from 2s to 5s with a clean guitar strum." (
segment: { start_ms: 2000, end_ms: 5000 },prompt) - "Fix my audio asset asset_789 by regenerating the 10000-14000ms region." (
segment: { start_ms: 10000, end_ms: 14000 }) - "Preflight replacing a 3-second segment (from 6s to 9s) of a clip." (preflight)
Inpaint audio (with video)
- "For my video asset (video asset_v1, audio asset_a1), replace the audio between 3s and 7s to fix a glitch." (
segment: { start_ms: 3000, end_ms: 7000 })
Assets
- "Create an upload slot for a WAV file and upload /Users/me/sfx/input.wav to it." (
content_type: "audio/wav",file_path) - "Create an asset upload slot for content type video/mp4 and give me the presigned URL." (slot only, no local upload)
Async job polling
- "Check the status of Mirelo job job_abc123." (
mirelo_job_status) - "Poll job job_abc123 and, once it's succeeded, give me the result URLs."
Tip: the
_preflighttools never generate audio or spend credits, so they're the safest way to smoke-test connectivity and your API key.
Async job flow
- Call a family's
_submittool to get ajob_id. - Poll
mirelo_job_statuswith thatjob_id. - When the status is
succeeded, read theresult_urlsfrom the response.
Synchronous _generate tools skip this loop and return result_urls directly when the job finishes inline.
Architecture
- Transport: stdio via the
@modelcontextprotocol/sdkserver. The SDK owns the handshake, version negotiation, and request dispatch. - Startup sequence: load and validate config → read the API key once → build a single configured HTTP client → bind each registry tool's handler → register
ListTools+CallTooland connect the stdio transport. - The entrypoint (
src/index.ts) exportscreateServer,connectStdio, andmain, and is import-safe (importing it has no side effects) so it can be exercised by tests without spawning stdio. - Tool definitions live in
src/tools/*and are aggregated bysrc/registry.ts, which enforces the 21-tool invariant at load time.
Development
npm test # run the test suite once (vitest)
npm run test:watch # watch mode
npm run build # type-check and emit dist/
The suite includes property-based tests using fast-check alongside unit and integration tests.
License
MIT
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。