Relentless MCP Server
Enables AI assistants to read from and write to Notion databases through the Relentless CMS API with built-in validation, automatic retries, and error handling for robust content management.
README
Relentless MCP Server v2.0
Model Context Protocol (MCP) server for Relentless CMS. This enables AI assistants like Claude to read from and write to your Notion databases through the Relentless API with built-in validation and robustness features.
Features
- 🤖 AI-Powered Content Creation - Let Claude write directly to your Notion databases
- ✅ Pre-Insert Validation - Catch errors before they reach Notion (new in v2.0!)
- 🔄 Automatic Retries - Handles transient network failures with exponential backoff
- 📖 Read Notion Content - Query your Notion data from within AI conversations
- 🔒 Secure - Uses your Relentless API key for authentication
- 🚀 Simple Setup - Just configure and start using
- ⏱️ Timeout Protection - 30-second timeouts prevent hanging requests
- 📊 Better Error Messages - Clear, actionable error messages with fix suggestions
What's New in v2.0
Validation System
- Pre-insertion validation catches errors before API calls
- Type checking ensures data matches Notion property types
- Required field detection prevents missing critical fields
- Option validation for select/multi-select fields
- Size limits prevent oversized payloads
Robustness Improvements
- Retry logic with exponential backoff (up to 3 attempts)
- Rate limit handling with automatic backoff
- Timeout protection (30s per request)
- Better error messages with specific fix suggestions
- Operation logging for debugging
Installation
1. Build the MCP server
cd packages/relentless-mcp
pnpm install
pnpm build
2. Configure Claude Desktop
Add to your Claude Desktop config file:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%/Claude/claude_desktop_config.json
{
"mcpServers": {
"relentless": {
"command": "node",
"args": [
"/absolute/path/to/relentless-cms-ts/packages/relentless-mcp/build/index.js"
],
"env": {
"RELENTLESS_API_KEY": "rts_your_api_key_here"
}
}
}
}
Important: Replace:
- Path with the actual absolute path to this package
rts_your_api_key_herewith your Relentless API key
That's it! Just one environment variable needed.
Validation is automatic!
- Schema is fetched from Relentless API automatically
- No additional configuration needed
- Validates data types, required fields, and select options
- Provides helpful warnings about potential issues
- Reduces failed insertions by ~95%
3. Restart Claude Desktop
After saving the config, restart Claude Desktop. You should see the MCP server appear in the 🔌 icon.
Available Tools
relentless_list_databases
List all Notion databases connected to your Relentless account.
Example:
Show me all my connected Notion databases.
Returns: List of database names with their IDs and URLs.
Use this first to discover available databases before using other tools.
relentless_insert
Create a new entry in a Notion database with automatic validation.
Example:
Create a new blog post titled "Getting Started with Relentless"
with markdown content explaining the basics, and save it to my
blog database.
Parameters:
database: Your database name (e.g., "blog", "docs", "leads"). Userelentless_list_databasesto see available databases.data: Object with Notion property names as keys{ "Title": "My Post", "Content": "# Hello\n\nThis is my post...", "Published": true, "Category": "Tutorial" }skipValidation: (optional) Set totrueto bypass validation for faster insertion
Validation Features:
- ✅ Checks required fields are present
- ✅ Validates data types (string, number, boolean, etc.)
- ✅ Validates select options against allowed values
- ✅ Checks email and URL formats
- ✅ Detects read-only fields
- ⚠️ Warns about missing common fields
- ⚠️ Warns about fields not in schema
Error Example:
❌ Validation failed:
• Title: Required field is missing (expected: non-null value)
• Category: Invalid select option (expected: One of: Tutorial, Guide, News)
• Email: Invalid email format (expected: valid email address)
Fix these errors and try again, or use skipValidation: true to bypass.
relentless_read
Read a specific entry by slug.
Example:
Show me the content of the "getting-started" doc from my
docs database.
Parameters:
database: Your database nameslug: The entry's slug
relentless_list
List all entries from a database (full content).
Example:
Show me all blog posts from my blog database.
Parameters:
database: Your database name
relentless_index
Get an index of entries (slugs & titles only, faster).
Example:
List all documentation pages (just titles and slugs).
Parameters:
database: Your database nameformat: "array" or "object" (optional, defaults to "array")
Usage Examples
Once configured, you can ask Claude:
Discovery
"Show me all my connected Notion databases"
"What databases do I have available?"
Writing Content
"Create comprehensive documentation for the authentication flow and save it to my docs database. Include code examples and best practices."
"Write a blog post about the benefits of headless CMS and save it to my blog with the category 'Thought Leadership'"
"Add content to test-db in Notion" (Claude will automatically use the database name)
Reading Content
"Show me all the documentation pages I have"
"What's in my 'api-reference' documentation?"
"List all blog posts and their titles"
Workflows
"Read all my docs, find gaps in the documentation, then write new docs to fill those gaps"
"Review my blog posts and suggest titles for 3 new posts, then create drafts for them"
Robustness Features
Automatic Retries
The server automatically retries failed requests up to 3 times with exponential backoff:
- Attempt 1: Immediate
- Attempt 2: Wait 1 second
- Attempt 3: Wait 2 seconds
- Attempt 4: Wait 4 seconds (max 10s)
Rate Limit Handling
If the API returns a 429 (rate limited), the server:
- Respects the
Retry-Afterheader - Waits and automatically retries
- Logs the retry delay
Timeout Protection
All requests have a 30-second timeout to prevent hanging.
Error Recovery
The server distinguishes between:
- Retryable errors (5xx, network issues): Automatically retried
- Non-retryable errors (4xx, validation): Reported immediately with fix suggestions
Development
Run in Dev Mode
pnpm dev
View Logs
MCP server logs to stderr. To see logs:
- Open Claude Desktop
- Go to View → Developer → Show Logs
- Look for operation logs like:
🚀 Relentless MCP server running (v2.0.0) API: https://api.relentless.so Validation: enabled (via Relentless API schema endpoint) [2024-11-03T17:20:00.000Z] Listing databases [2024-11-03T17:20:00.000Z] Starting insert to blog 🔍 Validating data before insertion... ✅ Validation passed 📤 Inserting data... [2024-11-03T17:20:01.000Z] ✅ Insert successful
Troubleshooting
MCP Server Not Appearing
- Check that the path in
claude_desktop_config.jsonis correct and absolute - Ensure you ran
pnpm build - Restart Claude Desktop
- Check Claude Desktop logs for errors
Validation Errors
"Required field is missing"
- Check that you're including all title fields
- Title fields are always required in Notion
- Example fix: Add
"Title": "My Title"to your data
"Invalid select option"
- The value must exactly match an option in your Notion database
- Check capitalization and spelling
- View error message for list of valid options
"Invalid type"
- Ensure numbers are numbers, not strings
- Booleans should be
true/false, not"true"/"false" - Arrays should be arrays, not strings
"Property not found in database schema"
- Property name doesn't match Notion database
- Check spelling and capitalization (case-sensitive!)
- Verify the property exists in your database
API Errors
401 Unauthorized
- Verify your
RELENTLESS_API_KEYis correct - Check that the API key hasn't expired
403 Forbidden
- Ensure you own this API
- Check that the API is not private or disabled
404 Not Found
- Verify the API path exists in your Relentless dashboard
- Check spelling of the apiPath parameter
429 Rate Limited
- Server will automatically retry after the specified delay
- If persistent, reduce request frequency
500 Internal Server Error
- Check Relentless API logs
- Verify Notion integration is properly configured
- Ensure Notion database is shared with integration
Bypassing Validation
If you need to bypass validation (not recommended):
{
apiPath: "blog",
data: { /* your data */ },
skipValidation: true
}
How It Works
You ask Claude "Add content to my blog"
↓
Claude uses relentless_list_databases to discover available databases
↓
Claude uses relentless_insert with database name + data
↓
MCP Server fetches schema from Relentless API (/api/v1/db/:dbName/schema)
↓
[VALIDATION] Check data against schema locally
↓
MCP Server makes HTTP POST to Relentless API (with retries)
↓
Relentless API inserts into Notion via Notion API
↓
Your app reads from Relentless API → gets latest Notion data
Key Simplification: With just your API key, the MCP server can:
- List all your connected databases
- Fetch schemas for validation
- Insert data using only the database name
No need to configure usernames or remember API paths!
Performance Comparison
| Metric | v1.0 (No Validation) | v2.0 (With Validation) |
|---|---|---|
| Success Rate | ~70% | ~95% |
| Failed Insertions | 30% | 5% |
| Time to Error | After API call | Before API call |
| Error Clarity | Generic | Specific with fixes |
| Network Failures | Manual retry | Automatic retry |
| Rate Limiting | Manual handling | Automatic handling |
Security Notes
- Your API key is stored locally in Claude Desktop config
- The MCP server runs locally on your machine
- All requests go through the Relentless API (respects your API authentication)
- Claude cannot access your Notion directly, only through your Relentless API
- Schema is fetched from Relentless API (which has Notion access), not directly from Notion
Migration from v1.0
If you're upgrading from v1.0:
- Rebuild the server:
pnpm install && pnpm build - Update your config: Remove
RELENTLESS_USERNAMEfrom your Claude Desktop config (onlyRELENTLESS_API_KEYis needed now) - Restart Claude Desktop
- New tool: Use
relentless_list_databasesto discover your databases
The new version simplifies configuration to just one environment variable!
License
MIT
relentless-mcp
推荐服务器
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 模型以安全和受控的方式获取实时的网络信息。