Enables reading from and writing to Notion databases through the Relentless CMS API, with features including content creation, database querying, entry management, and built-in validation for property types, required fields, and select options.
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
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
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:
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:
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:
relentless_read
Read a specific entry by slug.
Example:
Parameters:
database: Your database nameslug: The entry's slug
relentless_list
List all entries from a database (full content).
Example:
Parameters:
database: Your database name
relentless_index
Get an index of entries (slugs & titles only, faster).
Example:
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-AfterheaderWaits 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
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 absoluteEnsure you ran
pnpm buildRestart 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 correctCheck 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):
How It Works
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 buildUpdate 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
remote-capable server
The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.
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.