Aztec MCP Server
Provides local access to Aztec documentation, examples, and source code via cloned repositories, with optional semantic search for enhanced querying.
README
Aztec MCP Server
An MCP (Model Context Protocol) server that provides local access to Aztec documentation, examples, and source code through cloned repositories. Optionally augments with semantic search over the full Aztec knowledge base when an API key is configured.
Features
- Version Support: Clone specific Aztec release tags (e.g.,
v4.3.0) - Local Repository Cloning: Automatically clones Aztec repositories with sparse checkout for efficiency
- Fast Code Search: Search Noir contracts and TypeScript files using ripgrep (with fallback)
- Documentation Search: Search Aztec documentation locally; with an API key, semantic vector search across the full corpora (framework docs, examples, Noir stdlib, TypeScript SDK, protocol circuits)
- Error Lookup: Static catalog (Solidity / circuit / TX / AVM errors) plus optional semantic fallback for unrecognized errors when an API key is configured
- Example Discovery: List and read Aztec contract examples
- Version-sync Gate: When using the hosted semantic backend, the server detects mismatches between your local clone tag and the indexed corpus and refuses to query across versions unless explicitly overridden
API Key (optional, recommended)
The MCP server runs in two modes:
| Mode | How to enable | What you get |
|---|---|---|
| Local (default) | No setup | Ripgrep search over cloned markdown + code; static error catalog |
| Semantic (recommended) | Set API_KEY env var |
Vector search over all 12 indexed Aztec corpora (developer docs, network docs, Aztec.nr, examples, aztec.js, CLI, TypeScript API, e2e tests, protocol circuits, L1 contracts, Noir docs, Noir stdlib); semantic error fallback; version-sync gate |
Getting a key
- Join the Aztec/Noir Discord: https://discord.gg/xMud5StFyA
- Run
/mcp-keyin any channel — the bot DMs you a personal API key (UUID) ephemerally. - Paste the key into your MCP client config under
env.API_KEY(see Configuration).
Keys are free, persistent (re-running /mcp-key returns the same key), and revocable via /forget-me.
Installation
With npx (recommended)
npx -y @aztec/mcp-server@latest
Always pin
@latest. npx caches packages aggressively — without@latest, you can end up running an old version indefinitely. The@latesttag forces npx to check the registry for the current release every run. The server also self-reports an upgrade-available warning at startup if it detects a newer version on npm (seeaztec_statusoutput).
Global install
npm install -g @aztec/mcp-server@latest
aztec-mcp
To update later: npm install -g @aztec/mcp-server@latest (or just rely on the npx -y @aztec/mcp-server@latest form, which always fetches current).
Configuration
Claude Code Plugin
Add to your .mcp.json. The minimal config is just the command; add env.API_KEY to enable semantic search.
{
"mcpServers": {
"aztec-mcp": {
"command": "npx",
"args": ["-y", "@aztec/mcp-server@latest"],
"env": {
"API_KEY": "<your key from /mcp-key in the Noir Discord>"
}
}
}
}
| Env var | Default | Purpose |
|---|---|---|
API_KEY |
unset | Personal API key from /mcp-key in the Noir Discord (https://discord.gg/xMud5StFyA). Unset → local-only mode. |
API_URL |
https://aztec.adjacentpossible.dev |
DocsGPT backend the semantic search hits. Override to point at a self-hosted instance. |
REQUEST_TIMEOUT |
60000 |
Semantic-search request timeout (ms). |
AZTEC_DEFAULT_VERSION |
v4.3.0 |
Default version tag for aztec_sync_repos. |
AZTEC_MCP_REPOS_DIR |
~/.aztec-mcp/repos/ |
Where local clones live. |
Available Tools
aztec_sync_repos
Clone or update Aztec repositories locally. Run this first to enable other tools.
Clones:
- aztec-packages (docs, aztec-nr, noir-contracts) - sparse checkout
- aztec-examples (full)
- aztec-starter (full)
Parameters:
version(string): Aztec version tag to clone (e.g.,v4.3.0). Defaults to latest supported version.force(boolean): Force re-clone even if repos existrepos(string[]): Specific repos to sync
Example - Clone specific version:
aztec_sync_repos({ version: "v4.3.0" })
aztec_status
Check the status of cloned repositories.
aztec_search_code
Search Aztec contract code and source files. Supports regex patterns.
Parameters:
query(string, required): Search query (supports regex)filePattern(string): File glob pattern (default:*.nr)repo(string): Specific repo to searchmaxResults(number): Maximum results (default: 30)
Example:
aztec_search_code({ query: "PrivateSet", filePattern: "*.nr" })
aztec_search_docs
Search Aztec documentation. Local ripgrep by default; semantic vector search when API_KEY is set.
Parameters:
query(string, required): Documentation search querysection(string): Docs section, applies to local search only (tutorials, concepts, developers, reference)maxResults(number): Maximum results (default: 20 local; 5 semantic, max 20)chunks(number, semantic only): Number of result chunks (1-20). If omitted,maxResultsis used.useLocalFallback(boolean, semantic only): If the semantic backend fails, fall back to local ripgrep. Defaultfalseso backend errors surface clearly.allowVersionMismatch(boolean, semantic only): Override the version-sync gate. Defaultfalse. The gate refuses to search when your localaztec-packagesclone tag differs from the corpus version the backend has indexed.
aztec_list_examples
List available Aztec contract examples.
Parameters:
category(string): Filter by category (token, nft, defi, escrow, crowdfund)
aztec_read_example
Read the source code of an Aztec contract example.
Parameters:
name(string, required): Example contract name
aztec_read_file
Read any file from cloned repositories.
Parameters:
path(string, required): File path relative to repos directory
aztec_lookup_error
Diagnose any Aztec error by message, error code, or hex signature. Returns root cause and suggested fix from a static catalog covering Solidity errors, TX validation errors, circuit codes, AVM errors, and operator FAQ. With API_KEY set, falls back to semantic documentation search when the static catalog has no hit.
Parameters:
query(string, required): Error message, numeric code (e.g.,2002), or hex signature (e.g.,0xa5b2ba17)category(string): Filter (contract,circuit,tx-validation,l1,avm,sequencer,operator,general)maxResults(number): Default 10allowVersionMismatch(boolean, semantic only): Override the version-sync gate for the semantic fallback. Has no effect when the static catalog already matched.
Configuration Options
Storage Location
Repositories are cloned to ~/.aztec-mcp/repos/ by default.
Override with the AZTEC_MCP_REPOS_DIR environment variable:
{
"mcpServers": {
"aztec-mcp": {
"command": "npx",
"args": ["-y", "@aztec/mcp-server@latest"],
"env": {
"AZTEC_MCP_REPOS_DIR": "/custom/path"
}
}
}
}
Default Aztec Version
Set the default Aztec version with the AZTEC_DEFAULT_VERSION environment variable:
{
"mcpServers": {
"aztec-mcp": {
"command": "npx",
"args": ["-y", "@aztec/mcp-server@latest"],
"env": {
"AZTEC_DEFAULT_VERSION": "v3.0.0-devnet.6-plugin.1"
}
}
}
}
Development
# Clone the repo
git clone https://github.com/aztecprotocol/mcp-server
cd mcp-server
# Install dependencies
npm install
# Build
npm run build
# Run locally
node dist/index.js
Requirements
- Node.js 18+
- Git
- ripgrep (optional, for faster searching)
Cloned Repositories
| Repository | Description | Checkout |
|---|---|---|
| aztec-packages | Main monorepo | Sparse: docs, aztec-nr, noir-contracts |
| aztec-examples | Official examples | Full |
| aztec-starter | Starter template | Full |
License
MIT
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。