Writer Context Tool for Claude
以下摘录自该仓库的 README(片段) · 在 GitHub 读完整 README →
Open-Sourced Model Context Protocol (MCP) implementation that connects Claude to your Substack and Medium writing.
What is this?
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.
Features
- 🔍 Retrieves and permanently caches your blog posts from Substack and Medium
- 🔎 Uses embeddings to find the most relevant essays based on your queries
- 📚 Makes individual essays available as separate resources for Claude
- 🧠 Performs semantic searches across your writing
- ⚡ Preloads all content and generates embeddings at startup
How It Works
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.
Setup Instructions (Step by Step)
Prerequisites
- Python 3.10 or higher
- Claude Desktop (latest version)
- A Substack or Medium account with published content
1. Clone this Repository
2. Set up Python Environment
Using uv (recommended):
Or using standard pip:
3. Configure Your Blogs
1. Copy the example configuration file:
2. Edit config.json with your Substack/Medium URLs:
- 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)
4. Connect with Claude Desktop
1. Create the Claude Desktop configuration directory:
2. Create the configuration file:
json
> {
> "mcpServers": {
> "writer-tool": {
> "command": "/absolute/path/to/run_writer_tool.sh",
> "args": []
> }
> }
> }
> `
3. Restart Claude Desktop
Using the Tool with Claude
Once set up, you'll see individual essays available as resources in Claude Desktop. You can:
1. **Search across your writing**: Ask Claude to find relevant content
- "Find essays where I discuss [specific topic]"
- "What have I written about [subject]?"
2. **Reference specific essays**: Access individual essays by clicking on them when listed in search results
- "Show me the full text of [essay title]"
3. **Refresh content**: Force a refresh of your content
- "Refresh my writing content"
Available Tools and Resources
The Writer Context Tool provides:
1. **Individual Essay Resources**: Each of your essays becomes a selectable resource
2. **search_writing**: A semantic search tool that finds the most relevant essays using embeddings
3. **refresh_content**: Refreshes and recaches your content from all configured platforms