Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 40 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ A Model Context Protocol (MCP) server that integrates with [Supadata](https://su

- **Video transcript extraction** from YouTube, TikTok, Instagram, Twitter, and file URLs
- Web scraping, crawling, and URL discovery
- Media metadata retrieval from YouTube, TikTok, Instagram, and Twitter
- AI-powered structured data extraction from video content
- Automatic retries and rate limiting

## Installation
Expand All @@ -16,7 +18,7 @@ Connect your AI assistant to Supadata's MCP server to enable transcript extracti

```bash
claude mcp add --transport http supadata https://api.supadata.ai/mcp \
--header "x-api-token: YOUR_SUPADATA_API_TOKEN"
--header "x-api-key: YOUR_SUPADATA_API_KEY"
```

### Claude Desktop
Expand All @@ -31,7 +33,7 @@ Add to your config file:
"supadata": {
"url": "https://api.supadata.ai/mcp",
"headers": {
"x-api-token": "YOUR_SUPADATA_API_TOKEN"
"x-api-key": "YOUR_SUPADATA_API_KEY"
}
}
}
Expand All @@ -48,7 +50,7 @@ Add to `.cursor/mcp.json` in your project root (or global config):
"supadata": {
"url": "https://api.supadata.ai/mcp",
"headers": {
"x-api-token": "YOUR_SUPADATA_API_TOKEN"
"x-api-key": "YOUR_SUPADATA_API_KEY"
}
}
}
Expand All @@ -65,7 +67,7 @@ Add to `~/.codeium/windsurf/mcp_config.json`:
"supadata": {
"serverUrl": "https://api.supadata.ai/mcp",
"headers": {
"x-api-token": "YOUR_SUPADATA_API_TOKEN"
"x-api-key": "YOUR_SUPADATA_API_KEY"
}
}
}
Expand All @@ -83,7 +85,7 @@ Add to your VS Code `settings.json`:
"supadata": {
"url": "https://api.supadata.ai/mcp",
"headers": {
"x-api-token": "YOUR_SUPADATA_API_TOKEN"
"x-api-key": "YOUR_SUPADATA_API_KEY"
}
}
}
Expand All @@ -100,15 +102,15 @@ Open Cline settings and add to the MCP Servers configuration:
"supadata": {
"url": "https://api.supadata.ai/mcp",
"headers": {
"x-api-token": "YOUR_SUPADATA_API_TOKEN"
"x-api-key": "YOUR_SUPADATA_API_KEY"
}
}
}
```

---

Replace `YOUR_SUPADATA_API_TOKEN` with your API token from [supadata.ai](https://supadata.ai).
Replace `YOUR_SUPADATA_API_KEY` with your API key from [supadata.ai](https://supadata.ai).

## Configuration

Expand Down Expand Up @@ -139,13 +141,17 @@ Select the right tool based on your needs:
- **Scrape:** Extract content from a single page when you know the exact URL
- **Map:** Discover all available URLs on a website
- **Crawl:** Extract content from multiple related pages comprehensively
- **Metadata:** Fetch metadata from media URLs (YouTube, TikTok, Instagram, Twitter)
- **Extract:** Extract structured data from video content using AI

| Tool | Best for | Returns |
|------|----------|---------|
| transcript | Video transcript extraction | text/markdown |
| scrape | Single page content | markdown/html |
| map | URL discovery on a site | URL[] |
| crawl | Multi-page extraction | markdown/html[] |
| metadata | Media metadata retrieval | JSON object |
| extract | AI-powered structured extraction | JSON object |

## Available Tools

Expand Down Expand Up @@ -203,6 +209,33 @@ Check the progress of a crawl job using the job ID.
supadata_check_crawl_status --id "550e8400-e29b-41d4-a716-446655440000"
```

### Metadata (`supadata_metadata`)

Fetch metadata from a media URL on supported platforms (YouTube, TikTok, Instagram, Twitter). Returns platform info, title, description, author details, engagement stats, media details, tags, and creation date.

**Usage:**
```bash
supadata_metadata --url "https://youtube.com/watch?v=example"
```

### Extract (`supadata_extract`)

Extract structured data from a video URL using AI. Provide a prompt for what to extract, a JSON Schema for the output format, or both. Returns a job ID for async processing.

**Usage:**
```bash
supadata_extract --url "https://youtube.com/watch?v=example" --prompt "Extract the main topics discussed"
```

### Check Extract Status (`supadata_check_extract_status`)

Check the progress of an extract job using the job ID.

**Usage:**
```bash
supadata_check_extract_status --id "550e8400-e29b-41d4-a716-446655440000"
```

## Development

```bash
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@supadata/mcp",
"version": "1.2.0",
"version": "1.2.1",
"description": "MCP server for Supadata video & web scraping integration. Features include YouTube, TikTok, Instagram, Twitter, and file video transcription, web scraping, batch processing and structured data extraction.",
"type": "module",
"bin": "./dist/index.js",
Expand Down
8 changes: 6 additions & 2 deletions src/worker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,11 @@ export default {
let server: Server | null = null;

try {
let apiKey = request.headers.get('x-api-token');
let apiKey = request.headers.get('x-api-key');

if (!apiKey) {
apiKey = request.headers.get('x-api-token');
}

if (!apiKey) {
apiKey = request.headers.get('supadata-api-key');
Expand All @@ -20,7 +24,7 @@ export default {
}

if (!apiKey) {
console.error('CRITICAL: No API token provided via headers (x-api-token) or environment (SUPADATA_API_KEY).');
console.error('CRITICAL: No API key provided via headers (x-api-key) or environment (SUPADATA_API_KEY).');
} else {
console.log(`Received API Key (length: ${apiKey.length})`);
}
Expand Down