atproto-mcp
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
Claude Desktop (MCPB bundle) — recommended
Download atproto-mcp-<version>.mcpb from the
latest release and open
it. Claude Desktop shows an install dialog with optional fields for the cache
directory, refresh interval, and embedding model; leave them blank for the
defaults. No Python or JSON editing required — the host installs dependencies
with uv.
Bundles are self-signed, so the installer shows an "unknown publisher" warning. See Releases for what that does and does not guarantee.
Every other host below uses the PyPI package and is unaffected by the bundle.
VS Code / Copilot
Add to .vscode/mcp.json in your workspace:
{
"mcpServers": {
"atproto": {
"command": "uvx",
"args": [
"atproto-mcp"
]
}
}
}
Kiro Power
- Open Kiro → Powers
- Select Import power from GitHub
- Enter
https://github.com/Ashex/atproto-mcp
Claude Desktop (manual)
Prefer the MCPB bundle above. To
configure by hand instead, 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
The server connects immediately and warms up in the background, so a slow first run never blocks the host's startup handshake.
On first launch, warmup:
- Shallow clones the repos into
~/.cache/atproto-mcp/repos/ - Parses MDX docs, lexicon schemas, and cookbook examples into text chunks
- Indexes the chunks using txtai hybrid search (BM25 keyword + dense vectors from the
bge-small-en-v1.5sentence-transformer, ~130MB, runs locally) — exact identifiers like NSIDs match reliably alongside semantic queries - Index is persisted in
~/.cache/atproto-mcp/index/for subsequent starts
This takes a few minutes. Until it finishes, tools return a short message
describing what the server is doing rather than failing. If warmup fails — no
network yet, for example — the server stays up, says so, and retries on its
own with exponential backoff until an index is in service. refresh_sources
forces a retry immediately.
On subsequent launches the cached index is loaded and put into service before any network access, so queries work within seconds even offline. Repos older than 24 hours are then refreshed with a shallow fetch and a hard reset to the tracked branch. If the refreshed repos differ from what the index was built from, the existing 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
# Run the test suite (what CI runs)
uv run python -m unittest discover -s tests -p 'test*.py'
# Build the MCPB bundle
npm install -g @anthropic-ai/mcpb
mcpb validate .
mcpb pack . /tmp/atproto-mcp.mcpb
License
MIT
Release files for atproto-mcp 0.3.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| atproto_mcp-0.3.1.tar.gz | 59.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| atproto_mcp-0.3.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 94.7 kB
Release files / atproto_mcp-0.3.1.tar.gz
| Download URL | atproto_mcp-0.3.1.tar.gz |
|---|---|
| Size | 59.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7aa11e9db557e5d9f07ea1064ce4826f39be1e8ebb2537bdcb1ca823325e2257
|
|
BLAKE2b-256 checksum How to use checksums |
a41362929d2f54c75122a407ffb6b8adc50e147dc0657aeae39590c9e257edcb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.3 {"installer":{"name":"uv","version":"0.12.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / atproto_mcp-0.3.1-py3-none-any.whl
| Download URL | atproto_mcp-0.3.1-py3-none-any.whl |
|---|---|
| Size | 35.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
65d88d3e6c8ea3e5cac6e435442a71c0d4d2122d2acb6389758e816453908fef
|
|
BLAKE2b-256 checksum How to use checksums |
3e6550d730b71b87255a82da2d13246d09ea270399915ffcfbc7d8ba0e3976ce
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.3 {"installer":{"name":"uv","version":"0.12.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|