MCP server providing AT Protocol documentation, lexicons, Bluesky API docs, and cookbook examples as a searchable knowledge base powered by txtai semantic search.
Project description
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.10+
- 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
Add to .vscode/mcp.json in your workspace:
{
"mcpServers": {
"atproto": {
"command": "uvx",
"args": [
"atproto-mcp"
]
}
}
}
### Claude Desktop
Add to `~/Library/Application Support/Claude/claude_desktop_config.json`:
```json
{
"mcpServers": {
"atproto": {
"command": "uvx",
"args": [
"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` | `sentence-transformers/all-MiniLM-L6-v2` | Sentence-transformers model for embeddings |
## How It Works
On first launch, the server:
1. **Clones** the 4 source repositories into `~/.cache/atproto-mcp/repos/` (shallow clones, ~minutes)
2. **Parses** MDX documentation, lexicon JSON schemas, and cookbook examples into text chunks
3. **Indexes** all chunks using txtai with the `all-MiniLM-L6-v2` sentence-transformer model (~80MB, runs locally on CPU)
4. **Persists** the index to `~/.cache/atproto-mcp/index/` for fast subsequent starts
On subsequent launches, the cached index loads in seconds. Repos older than 24 hours are automatically refreshed with `git pull`.
## Development
```bash
# 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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file atproto_mcp-0.1.1.tar.gz.
File metadata
- Download URL: atproto_mcp-0.1.1.tar.gz
- Upload date:
- Size: 124.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2429ffe6e028e5a4fa50f924806e5b00ae1f84cf838403142d96f761c5ed3386
|
|
| MD5 |
374848a45a2be6d1934b30db44530ff9
|
|
| BLAKE2b-256 |
5427c89cb348dc3eeef1e862c6009bf50b7878249ffb41fa8869de9f05428129
|
File details
Details for the file atproto_mcp-0.1.1-py3-none-any.whl.
File metadata
- Download URL: atproto_mcp-0.1.1-py3-none-any.whl
- Upload date:
- Size: 22.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9ba041972317e6249def73fd451a07bf5b7c7d444bea22cfea6edbf45bb24e8e
|
|
| MD5 |
4e3cb4eacda5afaffb248c29718784eb
|
|
| BLAKE2b-256 |
b7101d8348669e71ad135278dee9228787714e1b5c3c29bbf0380fcd3448288d
|