Recapfy MCP
Exposes Recapfy's paid endpoints as MCP tools to ask questions about YouTube videos and fetch full transcripts, with automatic USDC payment on Solana per call.
README
Recapfy MCP
An MCP server that exposes Recapfy's paid endpoints as tools — ask anything about a YouTube video and fetch a video's full transcript — straight from an MCP-capable agent like Claude Desktop, Cursor, or Cline. It runs locally — there's no hosted Recapfy MCP endpoint; you launch your own copy.
Each call is paid in USDC on Solana (dynamic price, scales with
maxOutputTokens), settled automatically via the x402
protocol. You bring your own wallet; you pay only for what you call.
📦 npm: recapfy-mcp
Prerequisites
- Node.js ≥ 20.
- A Solana wallet funded with USDC on mainnet. You do not need SOL for fees — the API's facilitator sponsors the network fee.
- That wallet's secret key, base58-encoded (the 64-byte form that Phantom's
"Export Private Key" gives you, or
solana-keygen).
⚠️ The key signs real payments. Use a dedicated low-balance wallet, never share it, and never commit it.
Install
No clone or build needed. Add this to your MCP client config (Claude Desktop:
claude_desktop_config.json) and restart the client:
{
"mcpServers": {
"recapfy": {
"command": "npx",
"args": ["-y", "recapfy-mcp@latest"],
"env": {
"SVM_PRIVATE_KEY": "<your base58 Solana secret key>"
}
}
}
}
Always use
recapfy-mcp@latest. A barenpx -y recapfy-mcpreuses whatever is in npx's cache and never re-checks the registry, so you can stay pinned to an old build (and miss new tools) indefinitely. The@latesttag forces npx to resolve the newest published version on every launch.
Updating
New versions (including new tools/endpoints) are picked up automatically when two things happen, because of two independent caches:
- npx package cache — using
recapfy-mcp@latest(as above) makes npx fetch the newest published version each launch. Without@latest, npx serves the cached copy and you stay on an old build. - MCP client tool list — clients read the server's tool list once per session. New tools only appear after you fully restart the MCP client (Claude Desktop, Cursor, Cline, …) so it relaunches the server and re-reads the tools.
So after a release: keep @latest and restart your client. If a brand-new
tool still doesn't show up, force a clean fetch:
npx clear-npx-cache # or: rm -rf "$(npm config get cache)/_npx"
then restart the client again.
Configuration
| Variable | Required | Description |
|---|---|---|
SVM_PRIVATE_KEY |
yes | Base58-encoded Solana secret key. Pays per call. Keep it funded. |
RECAPFY_API_BASE_URL |
no | Override the API base URL (defaults to https://api.recapfy.ai). For local dev. |
RECAPFY_ALLOW_INSECURE_TLS |
no | Set to 1 to accept self-signed TLS (local dev over https only). |
Tool: ask
| Input | Type | Required | Description |
|---|---|---|---|
videoUrl |
string | yes | Absolute http(s) URL of the YouTube video. |
prompt |
string | yes | What to ask about the video. |
maxOutputTokens |
integer | no | Max tokens in the answer (default 1024). Drives the dynamic price. |
Returns the agent's answer as text. Payment is settled before the answer returns.
The per-call price is dynamic: the API quotes the USDC amount in the 402
challenge based on maxOutputTokens, and your wallet pays whatever is quoted — so
keep maxOutputTokens sensible.
Tool: get_transcript
| Input | Type | Required | Description |
|---|---|---|---|
videoUrl |
string | yes | Absolute http(s) URL of the YouTube video. |
Returns the video's full transcript as timestamped segments, plus its title,
channelName, and durationSeconds. The text content is a readable, timestamped
transcript; the structured content carries the raw transcript array (each
segment is { timestampInSeconds, text }). The per-call price is flat USDC,
quoted in the 402 challenge and paid automatically.
How payment works
Built on the official Coinbase x402 v2 client packages (@x402/fetch,
@x402/svm, @x402/core) plus @solana/kit for signing:
- The tool POSTs to the matching endpoint under
${RECAPFY_API_BASE_URL}(/api/v1/agents/askor/api/v1/agents/get-transcript). - The API replies
402with requirements in thePAYMENT-REQUIREDheader (exactSVM scheme, USDC, dynamic amount, and a facilitatorfeePayerthat sponsors the network fee). - The wrapped fetch signs a gasless SPL-token transfer with your wallet and
retries with the
PAYMENT-SIGNATUREheader. - The API verifies, settles, and returns the answer plus a
PAYMENT-RESPONSEsettlement header.
Verify it works
Inspect the tools without spending anything using the MCP Inspector (it only signs a payment when you actually invoke a tool, so any key is fine just to browse):
SVM_PRIVATE_KEY=<key> npx @modelcontextprotocol/inspector npx -y recapfy-mcp@latest
Open the printed URL → Tools → ask / get_transcript. Invoking a tool with a funded wallet performs a real paid call; verify the spend on a Solana explorer.
Troubleshooting
| Symptom | Cause / fix |
|---|---|
Missing required environment variable ... |
SVM_PRIVATE_KEY not set. |
SVM_PRIVATE_KEY is not valid base58 |
Needs base58 of the 64-byte secret key. |
400 ... maxOutputTokens must be greater than 0 |
Pass a positive maxOutputTokens (the tool defaults to 1024). |
400 ... prompt |
prompt is required and non-empty. |
| New tool/endpoint missing after an update | Pin recapfy-mcp@latest, restart the client, then clear the npx cache (see Updating). |
| 402 loop / "Failed to create payment payload" | Wallet has no USDC on mainnet, or wrong network. Fund it. |
| TLS error against a local API over https | Set RECAPFY_ALLOW_INSECURE_TLS=1 (localhost dev only). |
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 模型以安全和受控的方式获取实时的网络信息。