Skip to main content

MCP server providing AT Protocol documentation, lexicons, Bluesky API docs, and cookbook examples as a searchable knowledge base powered by semantic search.

Project description

atproto-mcp

Tests

MCP server providing a searchable knowledge base for the AT Protocol ecosystem — protocol documentation, lexicon schemas, Bluesky developer API docs, and cookbook examples — powered by txtai semantic search.

Data Sources

Source Repository Description
AT Protocol Website bluesky-social/atproto-website Protocol specs, guides, and blog posts from atproto.com
Bluesky API Docs bluesky-social/bsky-docs Developer docs from docs.bsky.app — tutorials, guides, advanced topics
AT Protocol Lexicons bluesky-social/atproto JSON schemas defining all AT Protocol endpoints and record types
Cookbook bluesky-social/cookbook Example projects in Python, Go, TypeScript, and JavaScript

Tools

Tool Description
search_atproto_docs Semantic search across all documentation sources
get_lexicon Retrieve a specific lexicon by NSID (e.g. app.bsky.feed.post)
list_lexicons List all lexicons, optionally filtered by namespace
search_lexicons Semantic search within lexicon schemas
get_cookbook_example Get a specific cookbook example by project name
list_cookbook_examples List all cookbook examples, optionally by language
search_bsky_api Semantic search within Bluesky API docs
refresh_sources Force re-fetch repos and rebuild the index

Prompts

Prompt Description
explain_lexicon Get a comprehensive explanation of a lexicon
implement_feature Get implementation guidance with code examples
debug_atproto Help debug AT Protocol / Bluesky API issues
explore_namespace Explore all lexicons in a namespace

Installation

Prerequisites

  • Python 3.12+
  • uv (recommended) or pip
  • Git (for cloning source repositories)

Install from source

git clone https://github.com/ashex/atproto-mcp.git
cd atproto-mcp
uv sync

Run with uvx

uvx atproto-mcp

Configuration

VS Code / Copilot

Install in VS Code

Add to .vscode/mcp.json in your workspace:

{
  "mcpServers": {
    "atproto": {
      "command": "uvx",
      "args": [
        "atproto-mcp"
        ]
    }
  }
}

Kiro Power

  1. Open Kiro → Powers
  2. Select Import power from GitHub
  3. Enter https://github.com/ashex/atproto-mcp

Claude Desktop

Add to ~/Library/Application Support/Claude/claude_desktop_config.json:

{
  "mcpServers": {
    "atproto": {
      "command": "uvx",
      "args": [
         "atproto-mcp"
      ]
    }
  }
}

MCPHub

Add to ~/.config/mcphub/servers.json:

{
  "mcpServers": {
    "atproto": {
      "command": "uvx",
      "args": ["atproto-mcp"]
    }
  }
}

OpenCode

Add to your opencode.json:

{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "atproto": {
      "type": "local",
      "command": ["uvx", "atproto-mcp"]
    }
  }
}

Environment Variables

Variable Default Description
ATPROTO_MCP_CACHE_DIR ~/.cache/atproto-mcp Where repos and the search index are stored
ATPROTO_MCP_REFRESH_HOURS 24 Hours before re-fetching repositories
ATPROTO_MCP_EMBEDDING_MODEL BAAI/bge-small-en-v1.5 Sentence-transformers model for embeddings

How It Works

On first launch, the server:

  1. Shallow clones the repos into ~/.cache/atproto-mcp/repos/
  2. Parses MDX docs, lexicon schemas, and cookbook examples into text chunks
  3. Indexes the chunks using txtai hybrid search (BM25 keyword + dense vectors from the bge-small-en-v1.5 sentence-transformer, ~130MB, runs locally) — exact identifiers like NSIDs match reliably alongside semantic queries
  4. Index is persisted in ~/.cache/atproto-mcp/index/ for subsequent starts

On subsequent launches, the cached index loads in seconds. Repos older than 24 hours are automatically refreshed with git pull. If the refreshed repos differ from what the index was built from, the stale index keeps serving queries while a fresh one is rebuilt in the background and swapped in when ready.

Development

# Install in development mode
uv sync

# Run the server locally (stdio)
uv run atproto-mcp

# Test with the MCP Inspector
uv run mcp dev src/atproto_mcp/server.py

# Run with debug logging
ATPROTO_MCP_CACHE_DIR=/tmp/atproto-mcp uv run atproto-mcp

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

atproto_mcp-0.3.0.tar.gz (36.3 kB view details)

Uploaded Source

Built Distribution

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

atproto_mcp-0.3.0-py3-none-any.whl (28.4 kB view details)

Uploaded Python 3

File details

Details for the file atproto_mcp-0.3.0.tar.gz.

File metadata

  • Download URL: atproto_mcp-0.3.0.tar.gz
  • Upload date:
  • Size: 36.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.28 {"installer":{"name":"uv","version":"0.11.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Fedora Linux","version":"44","id":"","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for atproto_mcp-0.3.0.tar.gz
Algorithm Hash digest
SHA256 2950e58701468093286f82cb8005ee48351f5e8507dc9902edfbf2fcc83f523b
MD5 ac0f120c17872c86e96c8242066c37b4
BLAKE2b-256 52d180a26086e9ed05ac450e9e026b95bdfca250a88c0bde00d02a6bb2c6f4cc

See more details on using hashes here.

File details

Details for the file atproto_mcp-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: atproto_mcp-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 28.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.28 {"installer":{"name":"uv","version":"0.11.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Fedora Linux","version":"44","id":"","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for atproto_mcp-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9b7b7293fab63d2a0eaddd48c16aa2efdfcda0008d8ce5820fbc92c4574e669d
MD5 f472fdfded052ae8d52665f951097bc9
BLAKE2b-256 9a2deaf6e7b296d4275ef9025736111b2f4fd58da83c61e885d708ba93fd4a1a

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