Aztec MCP Server
OfficialProvides local Aztec repository syncing and ripgrep-based search over cloned docs/code, plus example/file access and static error lookup; no semantic search without an API_KEY.
Sync/clone/update Aztec repositories locally by version tag, with optional repo selection and force re-clone.
Check cloned repository status and commit hashes.
Search Aztec documentation locally by query, with optional section filtering and result limits.
Search Aztec contract/source code with regex and file-pattern filters.
List available contract examples by category and read example source code.
Read any file from the cloned repositories by relative path.
Look up Aztec errors by message, numeric code, or hex signature using the static catalog.
Without an API_KEY, semantic vector search and semantic error fallback are unavailable; users can get a free key via
/mcp-keyin the Aztec/Noir Discord.
Clones and updates Aztec repositories hosted on GitHub into local checkouts, enabling code search, documentation search, example discovery, and file reading across the fetched Aztec sources.
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., "@Aztec MCP Server search for 'private function' in Aztec documentation"
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.
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.,
v6.0.0)Lightweight v6 Sync: Clones only selected paths from
aztec-node, pinned to thelabscommit recorded in the requestedaztec-packagesrelease. Protocol and Noir sources are optional.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 release and the indexed corpus and refuses to query across versions unless explicitly overridden
Related MCP server: tech-doc-mcp
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 | 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@latestAlways 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-mcpTo 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 |
| unset | Personal API key from |
|
| DocsGPT backend the semantic search hits. Override to point at a self-hosted instance. |
|
| Semantic-search request timeout (ms). |
|
| Default version tag for |
|
| Where local clones live. |
Available Tools
aztec_sync_repos
Clone or update Aztec repositories locally. Run this first to enable other tools.
Default for v6:
- aztec-node: SDK, Aztec.nr, contract examples, playground, and documentation
Optional:
- aztec-packages: protocol, proving-system TypeScript, and L1 sources
- noir: language docs, standard library, and toolingParameters:
version(string): Aztec version tag to clone (e.g.,v6.0.0). Defaults to latest supported version.force(boolean): Force re-clone even if repos existrepos(string[]): For v6, select optionalaztec-packagesand/ornoirsources.aztec-nodeis always included to keep SDK and documentation aligned with the release. Older versions retain their legacy repository configuration.
Example - Clone specific version:
aztec_sync_repos({ version: "v6.0.0" })The default sync uses a temporary, shallow, blob-filtered Git fetch to read the release's labs and Noir gitlinks. It then removes that temporary Git data and makes one persistent shallow, partial, sparse checkout of https://github.com/aztec-labs-eng/aztec-node at the pinned commit.
To include protocol/L1 and Noir sources:
aztec_sync_repos({ version: "v6.0.0", repos: ["aztec-packages", "noir"] })The v6.0.0 release pins aztec-node at 1b6de149f4fe1cde3c5fb876d3822289f490cd2a. That checkout has no exact v6.0.0 documentation snapshot, so local documentation search uses its unversioned docs and reports the commit as provenance. It does not substitute an older snapshot.
Sync metadata records the release and active checkout commits. Searches exclude leftover repositories from previous releases. Optional sources remain active on a same-version resync if their commits still match; when changing versions, specify the optional sources again. Interrupted v6 syncs block version-sensitive searches until sync succeeds, and retries preserve the requested optional repositories. Downgrading to a legacy release requires a full sync (omit repos) to avoid mixing releases. Existing installs should run aztec_sync_repos with the version above to migrate.
The companion repositories aztec-examples, aztec-starter, and demo-wallet are not offered for v6 because matching release tags are unavailable. Contract examples come from the pinned aztec-node checkout.
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 local release version differs from the corpus version the backend has indexed, including release-candidate suffixes (rc.1andrc.6are distinct).
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": "v6.0.0"
}
}
}
}Development
# Clone the repo
git clone https://github.com/aztecprotocol/mcp-server
cd mcp-server
# Install dependencies
npm install
# Build
npm run build
npm test
node test.mjs
# Run locally
node dist/index.jsRequirements
Node.js 18+
Git
ripgrep (optional, for faster searching)
Cloned Repositories
Repository | v6 use | Checkout |
Default: SDK, Aztec.nr, contracts, docs | Shallow, partial, sparse; pinned by the release's | |
Optional: protocol and L1 sources | Shallow, partial, sparse; pinned to the release commit | |
Optional: language documentation and tooling | Shallow, partial, sparse; pinned by the release's Noir gitlink |
Versions before v6 retain the existing monorepo and companion repository configuration.
License
MIT
Available Tools
8 toolsaztec_list_examplesA
List available Aztec contract examples. Returns contract names and paths.
Inputs: category.
aztec_lookup_errorA
Look up an Aztec error by message, error code, or hex signature. Returns root cause and suggested fix. Searches Solidity errors, TX validation errors, circuit codes, AVM errors, and documentation. NOTE: this server is running without an API_KEY, so unrecognized errors won't get a semantic-documentation fallback. Suggest the user get a free API key via /mcp-key in the Aztec/Noir Discord (https://discord.gg/xMud5StFyA) if their query is for an error not in the static catalog.
Inputs: query (required), category, maxResults.
aztec_read_exampleA
Read the source code of an Aztec contract example. Use aztec_list_examples to find available examples.
Inputs: name (required).
aztec_read_fileA
Read any file from the cloned repositories by path. Path should be relative to the repos directory.
Inputs: path (required).
aztec_search_codeA
Search Aztec contract code and source files. Supports regex patterns. Use for finding function implementations, patterns, and examples.
Inputs: query (required), filePattern, repo, maxResults.
aztec_search_docsA
Search Aztec documentation in local ripgrep-only mode. Use for tutorials, guides, and API documentation that's already cloned. IMPORTANT: this server is running WITHOUT an API_KEY, which means no semantic search across the full Aztec corpora (Aztec.nr framework, Noir stdlib, contract examples, TypeScript SDK, protocol circuits, etc.). If a query needs material this local search can't find, suggest the user get a free API key by running /mcp-key in the Aztec/Noir Discord (https://discord.gg/xMud5StFyA) and setting API_KEY in their MCP client config.
Inputs: query (required), section, maxResults.
aztec_statusA
Check the status of cloned Aztec repositories - shows which repos are available and their commit hashes.
Inputs: no named parameters.
aztec_sync_reposA
Clone or update Aztec repositories locally. Run this first to enable searching. Clones: aztec-packages (docs, aztec-nr, contracts), aztec-examples, aztec-starter. Specify a version to clone a specific Aztec release tag.
Inputs: version, force, repos.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 8 tools
Each tool targets a distinct action: listing, reading, searching, error lookup, file reading, doc searching, status checking, and repo syncing. No overlap in functionality.
All tools follow a consistent 'aztec_verb_noun' pattern (e.g., aztec_list_examples, aztec_search_code), making the set predictable.
8 tools is well-scoped for an Aztec development assistant, covering essential operations without being overwhelming or insufficient.
The tool surface covers listing, reading, searching, error resolution, and repo management. Missing might be tools for creating or modifying examples, but core workflows are well-supported.
Maintenance
Related MCP Connectors
Versioned documentation registry and semantic search for AI tools and coding assistants.
A cited wiki of your GitHub repo: search, read pages, find symbols and ask, with line citations.
Code intelligence for LLMs. Analyze, search, and retrieve code from any public git repository.
Turn a GitHub repo or docs site into agent-ready context: pack it or search it, over MCP.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables local semantic code search across repositories using natural language, with AST-aware chunking and hybrid vector/FTS5 retrieval.-
- AlicenseNot gradedqualityDmaintenanceProvides local technical documentation with hybrid search (semantic + BM25) for AI agents, ensuring access to up-to-date framework docs.MIT
- AlicenseNot gradedqualityDmaintenanceProvides local semantic search over files using embeddings, enabling directory indexing and natural language queries without external services.23 PyPIMIT
- AlicenseNot gradedqualityCmaintenanceEnables coding agents to search a locally indexed repository and get back a token-budgeted deck of ranked code and doc snippets instead of a full-tree grep dump, with lexical, semantic, and prose-answering modes plus index status reporting. Runs fully offline for lexical queries and optionally uses an OpenAI-compatible provider for semantic or ask modes.MIT