An MCP server that enables AI assistants like Claude to interact with Substack newsletters, allowing for post retrieval, content searching, and author information access through a standardized interface.
An MCP (Model Context Protocol) server for Substack API integration with Claude and other AI assistants.
This project implements a Model Context Protocol (MCP) server that enables AI assistants like Claude to interact with Substack newsletters, posts, and authors through a standardized interface. It leverages the Substack API library and makes its functionality available through MCP.
With this MCP server, Claude can:
Clone this repository:
git clone https://github.com/Greg-Swiftomatic/substack-mcp.git cd substack-mcp
Set up a virtual environment using uv
:
curl -LsSf https://astral.sh/uv/install.sh | sh # Install uv if not already installed uv init . uv venv source .venv/bin/activate # On Windows: .venv\Scripts\activate
Install dependencies:
uv add "mcp[cli]" substack-api
Run the MCP server:
python substack_mcp.py
Open Claude for Desktop's configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%\Claude\claude_desktop_config.json
Add your server configuration:
{ "mcpServers": { "substack": { "command": "uv", "args": [ "--directory", "/ABSOLUTE/PATH/TO/substack-mcp", "run", "substack_mcp.py" ] } } }
Restart Claude for Desktop.
Once configured, you can ask Claude questions like:
The server provides the following MCP tools:
Tool | Description |
---|---|
get_newsletter_posts | Retrieves recent posts from a Substack newsletter |
get_post_content | Gets the full content of a specific Substack post |
search_newsletter | Searches for posts within a newsletter |
get_author_info | Gets information about a Substack author |
get_newsletter_recommendations | Gets recommended newsletters for a Substack publication |
get_newsletter_authors | Gets authors of a Substack newsletter |
substack_mcp.py
- The main MCP server implementationexamples/
- Example queries and responsesdocker/
- Docker configuration for containerized deploymentTo contribute to this project:
git checkout -b feature/amazing-feature
)git commit -m 'Add some amazing feature'
)git push origin feature/amazing-feature
)If you encounter issues:
Check Claude's logs for errors:
# macOS/Linux tail -n 20 -f ~/Library/Logs/Claude/mcp*.log # Windows type %APPDATA%\Claude\Logs\mcp*.log
Verify your server builds and runs without errors:
python substack_mcp.py
Make sure your claude_desktop_config.json
file has the correct paths and syntax.
Try restarting Claude for Desktop completely.
This project is licensed under the MIT License - see the LICENSE file for details.
Discover shared experiences
Shared threads will appear here, showcasing real-world applications and insights from the community. Check back soon for updates!