Skip to main content

Readium MCP

Readium MCP

Python Version Model Context Protocol License: MIT PyPI version

A Model Context Protocol (MCP) server that exposes the powerful documentation analysis functionality of Readium for LLMs like Claude and other MCP-compatible clients.

🔍 What is this?

Readium MCP acts as a bridge between LLMs and any documentation repository, allowing:

  • Analyzing local directories, public/private Git repositories, and URLs
  • Processing multiple file formats (code, Markdown, text)
  • Converting web pages to Markdown for analysis
  • Delivering structured results with summary, file tree, and content

Perfect for when you need an LLM to analyze large bodies of documentation, code repositories, or technical websites.

🚀 Installation

With pip (recommended)

pip install readium-mcp

From source code

# Clone the repository
git clone https://github.com/tu-usuario/readium-mcp.git
cd readium-mcp

# Install dependencies with Poetry
poetry install

🛠️ Usage

Direct execution

readium-mcp

With Poetry (from source code)

poetry run readium-mcp

🔌 Integration with MCP clients

VSCode

Add to your VSCode configuration (settings.json):

{
  "mcp": {
    "servers": {
      "readium": {
        "command": "readium-mcp"
      }
    }
  }
}

Or create a .vscode/mcp.json file in your project:

{
  "servers": {
    "readium": {
      "command": "readium-mcp"
    }
  }
}

Claude Desktop

Add to your claude_desktop_config.json:

{
  "mcpServers": {
    "readium": {
      "command": "readium-mcp"
    }
  }
}

MCP CLI

# Install
mcp install -n readium -- readium-mcp

# Inspect
mcp inspect readium

# Test in console
mcp call-tool readium analyze_docs --path https://github.com/modelcontextprotocol/servers.git

📝 Exposed tools

analyze_docs

Analyzes documentation from a local directory, Git repository, or URL using Readium.

Parameters

Parameter Type Description Default
path string Local path, GitHub URL, or documentation URL (required)
branch string Branch to use if it's a repository null
target_dir string Specific subdirectory to analyze null
use_markitdown boolean Use Markitdown for conversion false
url_mode string URL processing mode ('clean', 'full') "clean"
max_file_size integer Maximum file size in bytes 5242880 (5MB)
exclude_dirs array Directories to exclude []
exclude_ext array Extensions to exclude (e.g., ['.png']) []
include_ext array Extensions to include (e.g., ['.md']) []

Response

{
  "content": [
    {"type": "text", "text": "Summary:\n..."},
    {"type": "text", "text": "Tree:\n..."},
    {"type": "text", "text": "Content:\n..."}
  ],
  "isError": false
}

🧪 Testing

Unit tests

poetry run pytest

Direct Readium test

python test.py

🧩 Example usage with Python

import asyncio
from mcp import ClientSession, StdioServerParameters
from mcp.client.stdio import stdio_client

async def test_readium_mcp():
    server_params = StdioServerParameters(
        command="readium-mcp"
    )

    async with stdio_client(server_params) as (read, write):
        async with ClientSession(read, write) as session:
            await session.initialize()

            # List tools
            tools = await session.list_tools()
            print(f"Available tools: {tools}")

            # Analyze a repository
            result = await session.call_tool(
                "analyze_docs",
                {"path": "https://github.com/modelcontextprotocol/servers.git"}
            )

            print(f"Analysis result: {result}")

# Run
asyncio.run(test_readium_mcp())

📋 Advantages

  • Fast: Efficient analysis even for large repositories
  • Flexible: Works with local directories, Git repositories, and URLs
  • Configurable: Customize extensions, sizes, and directories to analyze
  • Compatible: Works with any MCP client (Claude, VSCode, CLI)
  • Simple: No complex dependencies, stdio transport for maximum compatibility

🤝 Contributing

Contributions are welcome. Please feel free to:

  1. Fork the repository
  2. Create a branch for your feature (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

👏 Acknowledgments


Developed with ❤️ by Pablo Toledo

Metadata

Release files for readium-mcp 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for readium-mcp 0.2.0
File Size Uploaded Provenance
readium_mcp-0.2.0.tar.gz 5.3 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for readium-mcp 0.2.0
File Interpreter ABI Platform
readium_mcp-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 11.5 kB

Release files / readium_mcp-0.2.0.tar.gz

Download URL readium_mcp-0.2.0.tar.gz
Size 5.3 kB
Tags Source
SHA-256 checksum
How to use checksums
b0e10e3b4a66045b7da67669ff230d4be6f3471cdfb9a0ff26262abc8368f13a
BLAKE2b-256 checksum
How to use checksums
496d08f7d7e11f34dc6579a0e02d2c5cff3b5aa2d47da4598dff965482038ebb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.1.3 CPython/3.10.17 Linux/6.11.0-1014-azure

Release files / readium_mcp-0.2.0-py3-none-any.whl

Download URL readium_mcp-0.2.0-py3-none-any.whl
Size 6.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
661c3306001beaa23339789044fd0d891bd65d57f86662fd1c54b74b5a4f05fc
BLAKE2b-256 checksum
How to use checksums
0d6a965b7d33c00aacc6581113171f10f7179a6a5eb6723f604473e056f6c2ee
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.1.3 CPython/3.10.17 Linux/6.11.0-1014-azure

Security for readium-mcp 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page