Official Substack MCP Server
Open-Sourced Model Context Protocol (MCP) implementation that connects Claude to your Substack and Medium writing.
Writer Context Tool is an MCP server that allows Claude to access and analyze your writing from platforms like Substack and Medium. With this tool, Claude can understand the context of your published content, providing more personalized assistance with your writing.
The tool connects to your Substack/Medium blogs via their RSS feeds, fetches your posts, and permanently caches them locally. It also generates embeddings for each post, enabling semantic search to find the most relevant essays based on your queries.
When you ask Claude about your writing, it can use these individual essay resources to provide insights or help you develop new ideas based on your existing content.
git clone https://github.com/yourusername/writer-context-tool.git cd writer-context-tool
Using uv (recommended):
# Install uv if you don't have it curl -LsSf https://astral.sh/uv/install.sh | sh # Create virtual environment and install dependencies uv venv source .venv/bin/activate # On Windows: .venv\Scripts\activate uv pip install -r requirements.txt
Or using standard pip:
python -m venv .venv source .venv/bin/activate # On Windows: .venv\Scripts\activate pip install -r requirements.txt
Copy the example configuration file:
cp config.example.json config.json
Edit config.json
with your Substack/Medium URLs:
{ "platforms": [ { "type": "substack", "url": "https://yourusername.substack.com", "name": "My Substack Blog" }, { "type": "medium", "url": "https://medium.com/@yourusername", "name": "My Medium Blog" } ], "max_posts": 100, "cache_duration_minutes": 10080, "similar_posts_count": 10 }
max_posts
: Maximum number of posts to fetch from each platform (default: 100)cache_duration_minutes
: How long to cache content before refreshing (default: 1 week or 10080 minutes)similar_posts_count
: Number of most relevant posts to return when searching (default: 10)Create the Claude Desktop configuration directory:
# On macOS mkdir -p ~/Library/Application\ Support/Claude/
Create the configuration file:
# Get the absolute path to your uv command UV_PATH=$(which uv) # Create the configuration cat > ~/Library/Application\ Support/Claude/claude_desktop_config.json **Note:** If you experience issues with the `uv` command, you can use the included shell script alternative: > 1. Make the script executable: `chmod +x run_writer_tool.sh` > 2. Update your Claude Desktop config to use the script: > ```json > { > "mcpServers": { > "writer-tool": { > "command": "/absolute/path/to/run_writer_tool.sh", > "args": [] > } > } > } > ```
Restart Claude Desktop
Once set up, you'll see individual essays available as resources in Claude Desktop. You can:
Search across your writing: Ask Claude to find relevant content
Reference specific essays: Access individual essays by clicking on them when listed in search results
Refresh content: Force a refresh of your content
The Writer Context Tool provides:
The tool implements permanent caching with these features:
If you encounter issues:
Tool doesn't appear in Claude Desktop:
No content appears:
Error with uv command:
Embedding issues:
This project is available under the MIT License.
Discover shared experiences
Shared threads will appear here, showcasing real-world applications and insights from the community. Check back soon for updates!