Skip to content

feat: add official MCP server for Claude Code / coding agents #10

Description

@rajarshidattapy

Problem

webpull is great as a CLI tool, but coding agents like Claude Code have no way to use it programmatically. The current workflow requires:

  1. Manually running webpull <url> in the terminal
  2. Hoping the agent can find and read the output directory
  3. No way to trigger a pull from inside an agent session

This means agents can't answer "pull the Anthropic docs and find how streaming works" without manual intervention.

Proposed solution

Add an official mcp/ directory with a zero-dependency MCP server that exposes webpull as tools callable by any MCP-compatible coding agent (Claude Code, Cursor, etc.).

Tools exposed

Tool Description
pull_docs Crawl a URL using webpull's existing engine, save as markdown
search_docs Full-text search across previously pulled docs
read_doc Read a specific pulled file by path
list_docs List all pulled doc sites and file counts
run_code Execute JS/TS/Python/Bash in a sandboxed subprocess

Usage from Claude Code

# Agent can now do this in one shot:
"Pull https://docs.anthropic.com and find all streaming examples"
"Search my docs for tool_use"
"Run this Python snippet and show me the output"

Setup (one command)

claude mcp add webpull bunx webpull-mcp

Implementation

I have a working implementation ready as a single mcp/index.ts file — no npm dependencies beyond what webpull already uses (Bun runtime). Happy to open a PR if this direction looks good to you.

Why this belongs in the main repo

  • webpull's primary use case is feeding docs to LLMs — MCP is the natural interface for that
  • Keeps the MCP server versioned alongside the crawler so they don't drift
  • One install (bun install -g webpull) gives you both the CLI and the agent interface

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions