Content
# Solana Divers MCP Server
MCP server for searching through the archive of Telegram chats of Solana developers. Works with Claude Web, Claude Code, and other MCP clients.
## What is this
A search engine for ~94K messages from two chats:
- **Divers** (`on_chain_divers_chat`) — ~50K messages, MEV, trading, bots, infrastructure
- **Solana Dev RU** (`solana_dev_ru`) — ~43K messages, development, Anchor, SPL, RPC
Hybrid search: semantic (Voyage embeddings) + full-text (BM25) + cross-encoder reranking (FlashRank).
## Security and Privacy
### What the server sees and does NOT see
**The server receives ONLY tool call parameters:**
```
search(query="jito bundles", top_k=5, chat_ids=None)
```
That's it. Three fields: search query, number of results, and chat filter.
**The server does NOT receive and does NOT have access to:**
- Your conversation with Claude (prompts, answers, dialogue history)
- Other tool calls in your session
- Your files, projects, context
- Your account information
### How it works (MCP protocol)
```
You write to Claude: "find discussions about jito bundles"
│
▼
Claude decides to call the tool and sends to the MCP server:
POST /mcp { "method": "tools/call", "params": {"name": "search", "arguments": {"query": "jito bundles"}} }
│
▼
The server performs a search on the SQLite database and returns results
│
▼
Claude receives the results and forms an answer for you
```
The MCP server is just a search API. It works like a regular search engine: receives a query, returns results. No dialogue context is transmitted to the server.
### What is logged
The server saves to a local SQLite database:
- Search query (`query`)
- Parameters (`top_k`, `chat_ids`)
- Number of results found
- Query execution time
This is necessary for monitoring search quality. Information about who sent the query is not saved (MCP protocol does not transmit the user ID).
### Authorization
- OAuth 2.1 with password (entered once when connecting)
- Access token is valid for 24 hours, refresh token — 30 days
- Tokens are stored encrypted on the server
- All connections via HTTPS (TLS 1.2+)
## Connection
### Claude Web (claude.ai)
Settings → MCP Servers → Add MCP Server → insert server URL → Connect → enter password.
### Claude Code
```json
{
"mcpServers": {
"solana-divers": {
"type": "url",
"url": "<server-url>/mcp"
}
}
}
```
## Tools
### `search(query, top_k?, chat_ids?)`
Search through the chat archive. Returns fragments of correspondence with context (±5 messages).
- `query` — search query (Russian or English)
- `top_k` — number of results (1-10, default 5)
- `chat_ids` — chat filter (`["on_chain_divers_chat"]`, `["solana_dev_ru"]`, or `null` for all)
### `stats(chat_ids?)`
Database statistics: number of messages, authors, date range, top authors.
### `history(limit?)`
History of recent search queries (for monitoring).
## Architecture
```
MCP client (Claude Web / Claude Code)
│
▼ HTTPS
Nginx (reverse proxy, SSL)
│
▼ HTTP :8430
Docker: divers-mcp
│
├── search tool → hybrid_search() → SQLite (read-only)
├── stats tool → direct SQL queries → SQLite (read-only)
└── history tool → mcp_logs.db (read-write)
```
- **Message database** — read-only, shared volume with the main application
- **Log database** — separate SQLite for search log + OAuth tokens
- **Embedding cache** — 26K vectors (~120MB) loaded into RAM at startup
## Self-hosting
```bash
cp docker-compose.example.yml docker-compose.yml
# Fill in environment variables
docker-compose up -d --build
```
Requires:
- Filled database ragtg (SQLite with messages and embeddings)
- Voyage API key for semantic search
- Nginx with SSL for HTTPS