contentapi-mcp-server
v1.3.0
Published
MCP Server for ContentAPI — extract web content, YouTube transcripts, search, and more
Maintainers
Readme
@contentapi/mcp-server
An MCP (Model Context Protocol) server for ContentAPI — extract web content, YouTube transcripts, search the web, and more, directly from AI assistants.
Features
| Tool | Description |
|------|-------------|
| extract_web_content | Extract readable content from any web page (markdown or text) |
| get_youtube_transcript | Get full transcript/captions from a YouTube video |
| get_youtube_summary | Get an AI-generated summary of a YouTube video |
| get_youtube_metadata | Get metadata (title, channel, duration, etc.) for a YouTube video |
| search_web | Search the web and return results with snippets |
| extract_twitter_thread | Extract a Twitter/X thread |
| extract_reddit_post | Extract a Reddit post with comments |
| batch_extract | Extract content from multiple URLs at once (max 10) |
Prerequisites
- Node.js ≥ 18
- A ContentAPI API key — get one at getcontentapi.com
Installation
Via npx (no install needed)
npx contentapi-mcp-serverGlobal install
npm install -g @contentapi/mcp-serverFrom source
git clone https://github.com/nicholascontentapi/contentapi-mcp-server.git
cd contentapi-mcp-server
npm install
npm run buildConfiguration
The server requires a CONTENTAPI_API_KEY environment variable.
Claude Desktop
Add the following to your Claude Desktop config file:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json
Using npx
{
"mcpServers": {
"contentapi": {
"command": "npx",
"args": ["-y", "@contentapi/mcp-server"],
"env": {
"CONTENTAPI_API_KEY": "your-api-key-here"
}
}
}
}Using global install
{
"mcpServers": {
"contentapi": {
"command": "contentapi-mcp-server",
"env": {
"CONTENTAPI_API_KEY": "your-api-key-here"
}
}
}
}Using local build
{
"mcpServers": {
"contentapi": {
"command": "node",
"args": ["/path/to/mcp-server/dist/index.js"],
"env": {
"CONTENTAPI_API_KEY": "your-api-key-here"
}
}
}
}Cursor
In Cursor Settings → MCP, add a new server:
{
"mcpServers": {
"contentapi": {
"command": "npx",
"args": ["-y", "@contentapi/mcp-server"],
"env": {
"CONTENTAPI_API_KEY": "your-api-key-here"
}
}
}
}Windsurf
Add to your Windsurf MCP configuration:
{
"mcpServers": {
"contentapi": {
"command": "npx",
"args": ["-y", "@contentapi/mcp-server"],
"env": {
"CONTENTAPI_API_KEY": "your-api-key-here"
}
}
}
}Generic MCP Client
The server communicates over stdio using the MCP protocol. Start it as a subprocess and pass messages via stdin/stdout:
CONTENTAPI_API_KEY=your-key node dist/index.jsOr programmatically:
import { Client } from "@modelcontextprotocol/sdk/client/index.js";
import { StdioClientTransport } from "@modelcontextprotocol/sdk/client/stdio.js";
const transport = new StdioClientTransport({
command: "npx",
args: ["-y", "@contentapi/mcp-server"],
env: {
CONTENTAPI_API_KEY: "your-api-key",
},
});
const client = new Client({ name: "my-app", version: "1.0.0" });
await client.connect(transport);
// List tools
const tools = await client.listTools();
// Call a tool
const result = await client.callTool({
name: "extract_web_content",
arguments: { url: "https://example.com" },
});Tool Reference
extract_web_content
Extract readable content from any web page.
| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| url | string | ✅ | — | Web page URL |
| format | "markdown" | "text" | ❌ | "markdown" | Output format |
| ignore_robots | boolean | ❌ | false | Ignore robots.txt |
get_youtube_transcript
Get transcript/captions from a YouTube video.
| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| url | string | ✅ | — | YouTube video URL |
| lang | string | ❌ | auto | Language code (e.g. "en", "pt") |
get_youtube_summary
Get an AI-generated summary of a YouTube video.
| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| url | string | ✅ | YouTube video URL |
get_youtube_metadata
Get video metadata (title, description, channel, duration, etc.).
| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| url | string | ✅ | YouTube video URL |
search_web
Search the web.
| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| query | string | ✅ | — | Search query |
| count | number (1-10) | ❌ | 5 | Number of results |
extract_twitter_thread
Extract a Twitter/X thread.
| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| url | string | ✅ | Twitter/X thread URL |
extract_reddit_post
Extract a Reddit post with comments.
| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| url | string | ✅ | Reddit post URL |
batch_extract
Extract content from multiple URLs at once.
| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| urls | string[] (max 10) | ✅ | Array of URLs |
Error Handling
The server returns clear error messages for common issues:
- Missing API key — Prompts you to set
CONTENTAPI_API_KEY - Invalid URL — Validation errors from Zod schemas
- API errors — HTTP status code + error message from ContentAPI
- Network errors — Connection/timeout errors surfaced to the client
Development
# Install dependencies
npm install
# Build
npm run build
# Watch mode
npm run dev
# Run locally
CONTENTAPI_API_KEY=your-key npm startLicense
MIT
