Tavily Licensed MCP
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
Tavily Licensed MCP (Copyright.sh)
Open-source MCP server with automatic AI content licensing and token usage tracking.
This server enables AI systems to automatically discover, respect, and log licensing for web content through Copyright.sh's license ledger. Built on Tavily's search infrastructure, it provides real-time web search, content extraction, and crawling - all with transparent license tracking for fair creator compensation.
๐ Features
Copyright.sh License Tracking (Core Value)
Automatic License Discovery: Checks Copyright.sh
ai-licensemeta tags on every URLToken Usage Tracking: Accurately counts and logs token consumption using tiktoken
API Key Authentication: Authenticated usage logging for attribution and billing
Fair Creator Compensation: Enables transparent royalty payments to content creators
Dual-Axis Licensing: Respects stage (infer/train/tune/embed) and distribution (private/public) permissions
x402 Compliance: Optional direct fetch path that handles HTTP 402 + x402 offers and retries with licensed URLs
Graceful Degradation: Continues to work even if licensing API is unavailable
Web Search & Content Capabilities (Powered by Tavily)
Real-time Web Search: Comprehensive search with customizable depth and filtering
Content Extraction: Extract and process content from specific URLs
Web Crawling: Systematically explore websites with configurable depth/breadth
Site Mapping: Create structured maps of website architecture
Related MCP server: webscout-mcp
๐ Quick Start
Installation
# Using npx (recommended)
npx @copyrightsh/tavily-licensed-mcp@latest
# Or install globally
npm install -g @copyrightsh/tavily-licensed-mcpConfiguration
Claude Desktop
Add to your Claude Desktop configuration file:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"tavily-licensed": {
"command": "npx",
"args": ["-y", "@copyrightsh/tavily-licensed-mcp@latest"],
"env": {
"TAVILY_API_KEY": "tvly-your-api-key-here",
"COPYRIGHTSH_LEDGER_API": "https://ledger.copyright.sh",
"COPYRIGHTSH_LEDGER_API_KEY": "cs-ledger-your-key-here",
"ENABLE_LICENSE_TRACKING": "true"
}
}
}
}VS Code / Cursor
Add to your mcp.json:
{
"mcpServers": {
"tavily-licensed": {
"command": "npx",
"args": ["-y", "@copyrightsh/tavily-licensed-mcp@latest"],
"env": {
"TAVILY_API_KEY": "tvly-your-api-key-here",
"COPYRIGHTSH_LEDGER_API": "https://ledger.copyright.sh",
"COPYRIGHTSH_LEDGER_API_KEY": "cs-ledger-your-key-here",
"ENABLE_LICENSE_TRACKING": "true"
}
}
}
}Environment Variables
Variable | Required | Default | Description |
| โ Yes | - | Your Tavily API key (get one here) |
| โ ๏ธ Recommended | - | API key for license discovery + usage logging |
| No |
| Enable/disable Copyright.sh integration |
| No | Production URL | Custom ledger API endpoint |
| No |
| Timeout for license discovery (ms) |
| No |
| Timeout for license acquisition (ms) |
| No |
| Timeout for usage logging (ms) |
| No |
| Timeout for direct licensed fetch (ms) |
๐ Available Tools
copyrightish-search
Search the web with automatic license tracking.
{
query: "AI content licensing",
search_depth: "basic" | "advanced",
max_results: 10,
include_domains: ["example.com"],
exclude_domains: ["spam.com"],
fetch: false,
stage: "infer",
distribution: "private",
estimated_tokens: 1500,
payment_method: "account_balance"
}Output includes:
Search results with content
License information for each URL
Token usage tracking
Session summary with licensing statistics
If fetch=true, the server will also perform a direct licensed fetch (x402-aware) per URL and log usage from the fetched content.
copyrightish-extract
Extract content from specific URLs with license checking.
{
urls: ["https://example.com/article1", "https://example.com/article2"],
extract_depth: "basic" | "advanced",
format: "markdown" | "text",
fetch: false,
stage: "infer",
distribution: "private",
estimated_tokens: 1500,
payment_method: "account_balance"
}Set fetch=true to bypass Tavily extraction and perform a direct licensed fetch (x402-aware).
copyrightish-crawl
Crawl websites systematically with per-page license tracking.
{
url: "https://example.com",
max_depth: 2,
max_breadth: 20,
limit: 50,
instructions: "Find all blog posts",
fetch: false,
stage: "infer",
distribution: "private",
estimated_tokens: 1500,
payment_method: "account_balance"
}Set fetch=true to re-fetch crawled URLs directly with x402 support.
copyrightish-map
Map website structure (lightweight license checking).
{
url: "https://example.com",
max_depth: 3,
select_paths: ["/blog/.*", "/docs/.*"]
}๐ How License Tracking Works
1. Content Discovery
When any tool returns web content, the server automatically:
Extracts URLs from Tavily results
Makes parallel requests to Copyright.sh License Ledger API
Discovers license metadata from
<meta name="ai-license">tags
2. Token Counting
Uses
tiktokenlibrary for accurate GPT-4 token estimationCounts tokens in returned content snippets
Applies to all text content from search/extract/crawl operations
3. Usage Logging
Logs token consumption to Copyright.sh ledger
API-key authenticated to prevent attribution fraud
Includes: URL, token count, license version, timestamp
Enables fair creator compensation
4. x402 Licensed Fetch (Optional)
When fetch=true, the server performs a direct fetch for each URL and:
Detects
402 Payment Requiredwithpayment-required: x402Calls
POST /api/v1/licenses/acquireRetries with the returned
licensed_urlLogs usage against the acquired license
4. License Metadata Format
Each result includes license information:
Title: Example Article
URL: https://example.com/article
Content: [article text...]
๐ License: Allow (private use only) | $0.15/1K tokens | Tracked โ
๐ Session Summary:
- Total URLs: 5
- Licensed content: 3 (tracked)
- Unlicensed content: 2 (best effort)
- Total tokens: ~2,450๐ก๏ธ Error Handling
The server implements graceful degradation:
License API unavailable: Logs warning, continues with
license: 'unknown'Token logging fails: Logs error but doesn't block content delivery
Timeout protection: 5s for license discovery, 3s for usage logging
Network resilience: Retries with exponential backoff
๐๏ธ Architecture
โโโโโโโโโโโโโโโ
โ LLM/MCP โ
โ Client โ
โโโโโโโโฌโโโโโโโ
โ query
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ @copyrightsh/tavily-licensed-mcp โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ 1. Tavily API (search/crawl) โ โ
โ โโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ results[] โ
โ โโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ 2. License Service โ โ
โ โ - Check license (async) โโโโผโโโบ Copyright.sh
โ โ - Estimate tokens โ โ License Ledger API
โ โ - Log usage (async) โ โ
โ โโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ enriched_results[] โ
โ โโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ 3. Format with License Info โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโ
โ formatted text
โผ
โโโโโโโโโโโโโโโ
โ LLM sees โ
โ licensed โ
โ content โ
โโโโโโโโโโโโโโโ๐งช Development
Setup
git clone https://github.com/tymrtn/mcp-tavily-licensed.git
cd mcp-tavily-licensed
npm install
cp .env.example .env
# Edit .env with your API keysBuild
npm run buildQuick setup via CLI
# Write env template and add .mcp.json entry (defaults to project root)
node build/index.js --init
# Verify required env vars are present
node build/index.js --doctorAdditional flags:
--mcp-config <path>: choose where to write the MCP config (defaults to.mcp.jsonin project root)--env-path <path>: choose env file location (defaults to.envin project root)--setup-pay: prints current payment setup steps (balance-based today)
Testing
npm test # Run all tests
npm run test:watch # Watch mode
npm run test:coverage # Coverage reportLocal Development
npm run watch # Build in watch mode
npm run inspector # Use MCP inspector tool๐ Documentation
๐ค Contributing
We welcome contributions! Please see CONTRIBUTING.md for guidelines.
๐ License
MIT License - see LICENSE for details.
๐ Links
Copyright.sh: https://copyright.sh
Tavily: https://tavily.com
npm package: https://www.npmjs.com/package/@copyrightsh/tavily-licensed-mcp
Issues: https://github.com/tymrtn/mcp-tavily-licensed/issues
๐ Acknowledgments
License Tracking: Powered by Copyright.sh license ledger
Search Infrastructure: Built on Tavily's API and MCP work by Alpha AI Technologies Inc.
Protocol: Implements Model Context Protocol by Anthropic
Made with โค๏ธ for fair AI content licensing
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogโฆ
This server cannot be deployed
Maintenance
Related MCP Connectors
The web capability layer for AI agents: render, extract, DNS, SSL, WHOIS & more via x402.
Web scraping, search, crawling, structured extraction and research for AI agents.
Live AI-native web search with citations. One tool for every MCP client. Flat per-request pricing.
Live web checks for AI agents: sitemaps, robots.txt, URL status, broken links, feeds, citations.
Related MCP Servers
- AlicenseAqualityCmaintenanceProvides AI-driven web search, page fetching, and site mapping with real xAI citations, enabling LLM clients to access up-to-date external information.134MIT
- AlicenseAqualityBmaintenanceEnables AI agents to perform web searches, fetch and extract page content, and crawl sites with caching, rate limiting, and robots.txt compliance, all without needing API keys.171,364 PyPI2MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to reliably fetch public web URLs and extract clean, agent-ready text, Markdown, links, and metadata, with automatic browser fallback and optional x402 payment support.MIT
- AlicenseNot gradedqualityCmaintenanceEnables AI clients to read public webpages as Markdown or HTML, discover links, extract structured JSON, and perform bounded crawls.AGPL 3.0