tezos-mcp
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@tezos-mcp How does adaptive issuance work?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
tezos-mcp
RAG-powered MCP server for Tezos protocol specs, TZIPs, and Octez source code.
What It Does
Indexes and searches across:
Octez Protocol - OCaml protocol implementations (
src/proto_*/lib_protocol/)Octez Node - Shell architecture, RPC specs, P2P, storage (
src/,docs/)TZIPs - Tezos Improvement Proposals (FA2, metadata, wallet standards)
Related MCP server: mcp-rag-server
Installation
# From PyPI
pip install tezos-mcp
# From source
pip install -e .
# With Voyage API embeddings (best quality)
pip install -e ".[voyage]"
# With tree-sitter OCaml parsing
pip install -e ".[ocaml]"Quick Start
# Build the index (downloads repos + creates embeddings)
tezos-mcp build
# Search
tezos-mcp search "FA2 token standard"
# Check status
tezos-mcp statusFeatures
Incremental Indexing
Only re-embeds changed files instead of rebuilding the entire index. Reduces update time from minutes to seconds.
# Update repos and incrementally re-index (fast!)
tezos-mcp update
# Incremental index (default behavior)
tezos-mcp index
# Force full rebuild
tezos-mcp index --fullHow it works:
Tracks file hashes and modification times in a manifest
Detects which files changed since last index
Only re-embeds the changed content
Updates LanceDB incrementally (add/delete operations)
Configurable Embedding Models
Choose from multiple embedding models based on your quality/speed tradeoff:
# List available models
tezos-mcp models
# Use a specific model
tezos-mcp index --model codesage/codesage-largeModel | Dims | Quality | Speed | Notes |
| 384 | Fair | Fast | Default, good for quick searches |
| 768 | Good | Medium | Better quality |
| 1024 | Good | Medium | Code-specialized |
| 1024 | Excellent | API | Best quality, requires API key |
Configure in ~/.tezos-mcp/config.yaml:
embedding_model: all-MiniLM-L6-v2
chunk_size: 1000
chunk_overlap: 200
protocol_depth: 3 # Number of past protocols to indexExpert Guidance
Curated knowledge beyond what's in the code:
# Via MCP tool
tez_expert_guidance("baking")
tez_expert_guidance("governance")
tez_expert_guidance("smart_rollups")Topics include: baking, delegation, staking, tenderbake, governance, smart_rollups, dal, michelson, fa2, adaptive_issuance, slashing
CLI Commands
# Full build pipeline
tezos-mcp build # Download + compile + index
tezos-mcp build --full # Force full rebuild
# Individual steps
tezos-mcp download # Clone octez + tzip repos
tezos-mcp compile # Parse OCaml/markdown into JSON
tezos-mcp index # Build vector embeddings
tezos-mcp index --full # Force full rebuild
tezos-mcp index --model MODEL # Use specific embedding model
# Update (git pull + incremental index)
tezos-mcp update
tezos-mcp update --full # Update + force rebuild
# Search
tezos-mcp search "stake delegation"
tezos-mcp search "tenderbake consensus" --protocol paris
tezos-mcp search "FA2 transfer" --limit 10
# Lookup
tezos-mcp constant max_operations_ttl
tezos-mcp function apply_operation
# Info
tezos-mcp status # Index status, manifest info
tezos-mcp models # List embedding models
tezos-mcp serve # Start MCP serverMCP Tools
When running as an MCP server:
Tool | Purpose |
| Semantic search across all indexed content |
| Search TZIP standards (FA2, metadata, wallet specs) |
| Search protocol specs and OCaml source |
| Search Octez node docs and source code |
| Fast OCaml constant lookup |
| Get OCaml function source code |
| Current mainnet protocol (Tallinn) |
| Full amendment history (Athens through Tallinn) |
| Curated guidance on Tezos topics |
Protocol Amendments
Tezos upgrades through on-chain governance. The index covers the full amendment history:
Protocol | Date | Notable Features |
Athens | 2019-05 | First amendment |
Ithaca | 2022-03 | Tenderbake consensus |
Mumbai | 2023-03 | Smart rollups |
Paris | 2024-06 | Adaptive issuance, staking |
Quebec | 2025-02 | Universal baker attestation |
Tallinn | 2026-01 | 6s block time |
Project Structure
src/tezos_mcp/
├── server.py # MCP server (FastMCP)
├── cli.py # CLI commands (Click)
├── config.py # Configuration management
├── models.py # Pydantic input validation
├── protocols.py # Protocol amendment history
├── logging.py # Structured logging
├── indexer/
│ ├── downloader.py # Git clone with sparse checkout
│ ├── compiler.py # Markdown/RST extraction
│ ├── ocaml_compiler.py # OCaml parsing (tree-sitter + regex)
│ ├── chunker.py # Document chunking + chunk IDs
│ ├── embedder.py # Embeddings + LanceDB + incremental
│ └── manifest.py # File tracking for incremental updates
└── expert/
└── guidance.py # Curated expert knowledgeData Location
~/.tezos-mcp/
├── config.yaml # Configuration (optional)
├── manifest.json # Index state tracking
├── repos/
│ ├── tezos/ # Octez protocol + node (sparse checkout)
│ └── tzip/ # TZIP standards (full clone)
├── compiled/ # Extracted JSON specs
│ ├── tzips/
│ └── octez_docs/
└── lancedb/ # Vector indexExpert Guidance Topics
The tez_expert_guidance tool provides curated knowledge on:
Consensus & Baking:
baking- Block production, endorsing, rightsdelegation- Delegating to bakers, rewardsstaking- Direct staking (Paris+), frozen depositstenderbake- Deterministic finality consensusslashing- Double-baking/endorsing penalties
Governance & Standards:
governance- On-chain amendment processfa2- FA2 token standard (TZIP-012)michelson- Smart contract language
Scaling & Data:
smart_rollups- L2 scaling (WASM rollups)dal- Data Availability Layeradaptive_issuance- Dynamic reward adjustment
Development
# Install with dev dependencies
pip install -e ".[dev]"
# Run tests
pytest
# Run tests with coverage
pytest --cov=tezos_mcp
# Lint
ruff check src/Running as MCP Server
# Start the server
tezos-mcp serveAdd to your Claude Code MCP configuration:
{
"mcpServers": {
"tezos-mcp": {
"command": "tezos-mcp",
"args": ["serve"]
}
}
}License
MIT
Available Tools
9 toolstez_analyze_functionTez Analyze FunctionB
Extract an OCaml function implementation from the protocol source.
Inputs: function_name (required), protocol. Returns: result
tez_expert_guidanceTez Expert GuidanceB
Get curated expert knowledge about a Tezos topic.
Available topics: baking, delegation, staking, tenderbake, governance, smart_rollups, dal, michelson, fa2, adaptive_issuance, slashing
Inputs: topic (required). Returns: result
tez_get_current_protocolTez Get Current ProtocolA
Get the current Tezos mainnet protocol name, number, and features.
Inputs: no named parameters. Returns: object
tez_grep_constantTez Grep ConstantA
Look up an OCaml constant definition from the protocol source.
Inputs: constant_name (required), protocol. Returns: result
tez_list_protocolsTez List ProtocolsA
List all Tezos protocol amendments in chronological order.
Inputs: no named parameters. Returns: result
tez_searchTez SearchA
Cross-source semantic search across Tezos documentation, TZIPs, and protocol source.
Inputs: query (required), limit, protocol. Returns: result
tez_search_octezTez Search OctezB
Search Octez node documentation and source code.
Inputs: query (required), limit. Returns: result
tez_search_protocolTez Search ProtocolB
Search protocol specifications and OCaml source code.
Inputs: query (required), limit, protocol. Returns: result
tez_search_tzipTez Search TzipA
Search TZIP standards (token standards, metadata specs, wallet standards).
Inputs: query (required), limit, tzip_number. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 9 tools
Most tools have distinct purposes, though the four search variants (tez_search, tez_search_tzip, tez_search_protocol, tez_search_octet) are closely related and could be confused if users don't read descriptions carefully. However, each targets a specific source, reducing ambiguity.
All tools follow the consistent 'tez_' prefix with a verb_noun pattern (e.g., search, grep, analyze, get, list). This uniformity makes the toolkit predictable and easy to navigate.
With 9 tools, the set is well-scoped for a Tezos protocol assistant. It covers searching, specific lookups, and expert guidance without being overwhelming or sparse.
The tools cover core needs: general and targeted search, constant/function extraction, protocol info, and expert knowledge. Minor gaps like broader CRUD operations or editing are absent, but this fits the read-only analytical intent of the server.
Maintenance
Related MCP Connectors
Capability registry for the agentic economy. Semantic search over verified MCP server listings.
MCP server for querying Forkast documentation
Self-hosted AI workspace: semantic RAG document search, long-term memory, and AI chat via MCP.
Related MCP Servers
- AlicenseAqualityDmaintenanceLocal-first RAG indexing and semantic search MCP server. Enables document retrieval and context-aware queries using local embedding models.38 npmMIT
- AlicenseNot gradedqualityDmaintenanceAn MCP server that indexes documents and serves relevant context to LLMs via Retrieval Augmented Generation (RAG).35 npm36MIT
- FlicenseNot gradedqualityDmaintenanceA RAG service based on FastMCP that enables document indexing and retrieval (keyword/vector search) through the MCP protocol.-
- AlicenseNot gradedqualityDmaintenanceAn MCP server that enables semantic search over a private knowledge base via pgvector, with GitHub OAuth authentication and a RAG pipeline.23 npmMIT