by jonathan-politzki
Access and analyze your Substack and Medium posts through Claude, enabling semantic search and personalized writing assistance.
Writer Context Tool bridges Claude with your Substack and Medium blogs. It fetches, caches, and embeds every published essay so Claude can retrieve relevant content on demand, offering context‑aware help while you write.
config.example.json
to config.json
and fill in your Substack/Medium URLs and optional limits.writer_tool.py
(or the provided run_writer_tool.sh
).search_writing
or the refresh tool refresh_content
as needed.search_writing
– find the most relevant essays for a query.refresh_content
– force a fresh pull and re‑embedding of all posts.Q: Do I need a paid Claude plan? A: The tool works with Claude Desktop, which requires a valid Claude subscription.
Q: Can I use platforms other than Substack or Medium? A: Currently only Substack and Medium RSS feeds are supported; additional platforms would require custom adapters.
Q: How often is the cache refreshed?
A: Cache duration is configurable via cache_duration_minutes
(default is one week). You can also trigger an immediate refresh with the refresh_content
tool.
Q: What if embeddings fail to generate? A: Ensure sufficient disk space and that the embedding model dependencies are installed. Re‑run the startup script after fixing any environment issues.
Q: Is there a way to run this without Python? A: The project is Python‑based; an npm‑style wrapper is not provided, so use the recommended Python setup.
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 << EOF
{
"mcpServers": {
"writer-tool": {
"command": "${UV_PATH}",
"args": [
"--directory",
"$(pwd)",
"run",
"writer_tool.py"
]
}
}
}
EOF
Note: If you experience issues with the
uv
command, you can use the included shell script alternative:
- Make the script executable:
chmod +x run_writer_tool.sh
- Update your Claude Desktop config to use the script:
{ "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.
Please log in to share your review and rating for this MCP.
Discover more MCP servers with similar functionality and use cases
by topoteretes
Enables AI agents to store, retrieve, and reason over past conversations, documents, images, and audio transcriptions by loading data into graph and vector databases with minimal code.
by basicmachines-co
Basic Memory is a local-first knowledge management system that allows users to build a persistent semantic graph from conversations with AI assistants. It addresses the ephemeral nature of most LLM interactions by providing a structured, bi-directional knowledge base that both humans and LLMs can read and write to.
by smithery-ai
mcp-obsidian is a connector that allows Claude Desktop to read and search an Obsidian vault or any directory containing Markdown notes.
by qdrant
Provides a semantic memory layer on top of the Qdrant vector search engine, enabling storage and retrieval of information via the Model Context Protocol.
by GreatScottyMac
A database‑backed MCP server that stores project decisions, progress, architecture, custom data, and vector embeddings, allowing AI assistants in IDEs to retrieve precise, up‑to‑date context for generation tasks.
by StevenStavrakis
Enables AI assistants to read, create, edit, move, delete, and organize notes and tags within an Obsidian vault.
by mem0ai
Provides tools to store, retrieve, and semantically search coding preferences via an SSE endpoint for integration with MCP clients.
by graphlit
Enables integration between MCP clients and the Graphlit platform, providing ingestion, retrieval, RAG, and publishing capabilities across a wide range of data sources and tools.
by chroma-core
Provides vector, full‑text, and metadata‑based retrieval powered by Chroma for LLM applications, supporting in‑memory, persistent, HTTP, and cloud clients as well as multiple embedding functions.