Skip to main content

Documentation assistant leveraging Model Context Protocol

Project description

TheAlmanac

A documentation assistant leveraging Model Context Protocol (MCP) to help programmers access the most up-to-date and relevant information from API and software documentation.

Features

  • Documentation Crawler: Automatically download and store documentation locally
  • Simple Search: Find relevant documentation sections quickly
  • MCP Integration: Provide LLMs with tools to access documentation
  • File-based Storage: Efficiently organize documentation in a simple file structure
  • MCP Server: HTTP server for LLM tool access

Installation

# Clone the repository
git clone https://github.com/yourusername/TheAlmanac.git
cd TheAlmanac

# Install dependencies with UV
uv pip install -e .

Usage

Managing Documentation Sources

# Add a documentation source
almanac add python https://docs.python.org/3/

# List all documentation sources
almanac list

# Download documentation
almanac download python

# Remove a documentation source
almanac remove python

Searching Documentation

# Search all documentation
almanac search "context manager"

# Search a specific source
almanac search "context manager" --source python

# Search with more context
almanac search "context manager" --context-lines 5

Running the MCP Server

# Start the HTTP server (for direct API access)
almanac serve --transport http

# Start the MCP server (for integration with MCP clients like Claude for Desktop)
almanac serve --transport stdio

# Start on a specific host and port (for HTTP transport)
almanac serve --transport http --host 0.0.0.0 --port 9000

MCP Tools

TheAlmanac provides the following MCP tools:

  1. search_documentation: Search for relevant documentation
  2. get_documentation: Get a specific document or section
  3. download_documentation: Download a new documentation source
  4. list_documentation: List available documentation sources

Example Scripts

The scripts directory contains example scripts for testing and demonstrating TheAlmanac:

  • test_mcp_tools.py: Directly test MCP tools
  • test_mcp_server.py: Test the MCP server with HTTP requests
  • test_mcp_fastmcp.py: Test the FastMCP implementation directly
  • example_workflow.py: Run a complete workflow example

Example MCP Tool Usage

# Test the search tool (HTTP server)
./scripts/test_mcp_tools.py search "installation"

# Test getting a specific document (HTTP server)
./scripts/test_mcp_tools.py get python index.md

# Test the search tool (FastMCP)
./scripts/test_mcp_fastmcp.py search "installation"

# Test listing documentation (FastMCP)
./scripts/test_mcp_fastmcp.py list

# Test the complete workflow
./scripts/example_workflow.py

MCP Integration with Claude for Desktop

To integrate TheAlmanac with Claude for Desktop:

  1. Make sure Claude for Desktop is installed

  2. Edit the Claude for Desktop configuration file:

    # For macOS:
    code ~/Library/Application\ Support/Claude/claude_desktop_config.json
    
  3. Add TheAlmanac as an MCP server:

    {
      "mcpServers": {
        "the-almanac": {
          "command": "/path/to/python",
          "args": [
            "-m",
            "almanac.cli.commands",
            "serve",
            "--transport",
            "stdio"
          ]
        }
      }
    }
    
  4. Restart Claude for Desktop

  5. Look for the hammer icon to access TheAlmanac tools

Development

# Install development dependencies
uv pip install -e ".[dev]"

# Run tests
uv run pytest

Adding Dependencies

# Add a production dependency
uv add package_name

# Add a development dependency
uv add --dev package_name

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

iflow_mcp_saharcarmel_almanac-0.1.1.tar.gz (24.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

iflow_mcp_saharcarmel_almanac-0.1.1-py3-none-any.whl (34.2 kB view details)

Uploaded Python 3

File details

Details for the file iflow_mcp_saharcarmel_almanac-0.1.1.tar.gz.

File metadata

  • Download URL: iflow_mcp_saharcarmel_almanac-0.1.1.tar.gz
  • Upload date:
  • Size: 24.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.0 {"installer":{"name":"uv","version":"0.10.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for iflow_mcp_saharcarmel_almanac-0.1.1.tar.gz
Algorithm Hash digest
SHA256 09f742a44122412ccf5b7926bde1a6326828ce9c2a5c173910b8f536ec51e345
MD5 d1c2f9398babf5d7f4341f604fee2b0e
BLAKE2b-256 40930a9e2f1bd5079cdfea3c78e0596ea14c8a6911ebc298f3fb301e4be2986c

See more details on using hashes here.

File details

Details for the file iflow_mcp_saharcarmel_almanac-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: iflow_mcp_saharcarmel_almanac-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 34.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.0 {"installer":{"name":"uv","version":"0.10.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for iflow_mcp_saharcarmel_almanac-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 fd558509540397e70793a025908b6c2f962b3295463dc7eb16ad69c118a9fc0f
MD5 9013c38f7ceee15d4450887add424009
BLAKE2b-256 fb8ccee1deefe8a3075a6235bc98c6b8c41fcc2a508828e2dcc1045e186a9262

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page