MCP Connector

Search and analyze your published Substack and Medium posts

MCP server giving Claude semantic search over your own Substack and Medium writing via RSS-fed embeddings.

Works with substackmediumclaude

46
Spark score
out of 100
Updated Apr 2025
Source checked Sep 10, 2026
Version 1.0.0

Add to Favorites

Why it matters

Connect Claude to your published writing on Substack and Medium so it can understand your voice, reference past work, and help you develop new ideas grounded in your existing content.

Outcomes

What it gets done

01

Fetch and permanently cache all blog posts from Substack and Medium RSS feeds

02

Generate semantic embeddings to enable intelligent search across your writing

03

Find the most relevant essays based on topic queries using similarity search

04

Make individual essays available as selectable resources for Claude to reference

Source

Get it from source

Spark does not host a copy of it.

Open source

Reports

Agent outcome reports

No reports yet

Overview

Substack/Medium

Writer Context Tool connects Claude to a writer's own Substack and Medium blogs via RSS, caching every post locally and generating embeddings so Claude can semantically search across the writer's published essays and reference individual ones as resources. Use it when Claude needs to draw on your own past writing, finding what you've already said about a topic or referencing a specific essay, rather than writing from scratch. It only indexes public RSS-fed content from the blogs listed in config.json.

What it does

Writer Context Tool connects Claude to a writer's own Substack and/or Medium blogs, fetched via their RSS feeds and permanently cached locally. At startup it preloads all configured content and generates embeddings for every post, so Claude can run semantic searches to find the most relevant essays for a given query, and can reference any individual essay as its own MCP resource.

When to use - and when NOT to

Use this connector when Claude needs to draw on a writer's actual published output - finding what they've already written about a topic, pulling up a specific essay's full text, or grounding new writing assistance in their existing voice and ideas - rather than writing generically or from scratch. It only indexes content from the Substack and Medium blogs explicitly listed in config.json, fetched over public RSS feeds, so private or unpublished drafts are not included, and content is only as fresh as the configured cache_duration_minutes (default one week) unless manually refreshed.

Capabilities

  • Individual essay resources - every fetched post becomes a separately selectable resource in Claude.
  • search_writing - a semantic search tool using embeddings to find the most relevant essays for a query, returning up to similar_posts_count results (default 10).
  • refresh_content - forces a re-fetch and re-caching of content from all configured platforms, bypassing the normal cache duration.

How to install

Requires Python 3.10+ and Claude Desktop. Clone the repo and set up the environment:

git clone https://github.com/yourusername/writer-context-tool.git
cd writer-context-tool
uv venv
source .venv/bin/activate
uv pip install -r requirements.txt

Copy config.example.json to config.json and list each blog with its type (substack or medium), url, and display name, plus max_posts, cache_duration_minutes, and similar_posts_count. Then point Claude Desktop's claude_desktop_config.json at writer_tool.py via uv run (or the bundled run_writer_tool.sh shell script if the uv command has issues), and restart Claude Desktop.

The project is released under the MIT License.

Who it's for

Writers who publish on Substack or Medium and want Claude to help them develop new pieces, find past essays on a topic, or write more consistently with their existing voice, by giving it direct, semantically searchable access to their own back catalog rather than a generic model of what good writing sounds like. It suits anyone with a substantial archive who is tired of manually re-reading old posts one by one to check whether they've already covered a particular idea before starting a new draft.

Source README

Writer Context Tool for Claude

image

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

git clone https://github.com/yourusername/writer-context-tool.git
cd writer-context-tool

2. Set up Python Environment

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

3. Configure Your Blogs

  1. Copy the example configuration file:

    cp config.example.json config.json
    
  2. 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)

4. Connect with Claude Desktop

  1. Create the Claude Desktop configuration directory:

    # On macOS
    mkdir -p ~/Library/Application\ Support/Claude/
    
  2. 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:

    1. Make the script executable: chmod +x run_writer_tool.sh
    2. Update your Claude Desktop config to use the script:
    {
      "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

How Caching Works

The tool implements permanent caching with these features:

  1. Disk Caching: All content is stored on disk, so it persists between sessions
  2. Embeddings: Each essay is converted to embeddings for semantic search
  3. Selective Refresh: The tool only refreshes content when needed according to your cache settings
  4. Preloading: All content is automatically refreshed and embeddings generated at startup

Troubleshooting

If you encounter issues:

  1. Tool doesn't appear in Claude Desktop:

    • Check that your Claude Desktop configuration file is correct
    • Verify that all paths in the configuration are absolute
    • Make sure your Python environment has all required packages
    • Restart Claude Desktop
  2. No content appears:

    • Verify your Substack/Medium URLs in config.json
    • Try using the "refresh_content" tool
    • Check that your blogs are public and have published posts
  3. Error with uv command:

    • Try using the shell script approach instead
    • Verify the uv command is installed and in your PATH
  4. Embedding issues:

    • If you see errors about the embedding model, make sure you have enough disk space
    • Consider rerunning with a fresh installation if embeddings aren't working properly

Discussion

Questions & comments · 0

Sign In Sign in to leave a comment.