Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ An MCP (Model Context Protocol) server that provides local access to Aztec docum

## Features

- **Version Support**: Clone specific Aztec release tags (e.g., `v3.0.0-devnet.6-patch.1`)
- **Version Support**: Clone specific Aztec release tags (e.g., `v4.0.0-devnet.2-patch.1`)
- **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 by section
Expand Down Expand Up @@ -34,9 +34,9 @@ Add to your `.mcp.json`:
```json
{
"mcpServers": {
"aztec-local": {
"aztec-mcp": {
"command": "npx",
"args": ["-y", "@aztec/mcp-server@latest"]
"args": ["--prefer-online", "-y", "@aztec/mcp-server@latest"]
}
}
}
Expand All @@ -57,14 +57,14 @@ Clones:

**Parameters:**

- `version` (string): Aztec version tag to clone (e.g., `v3.0.0-devnet.6-patch.1`). Defaults to latest supported version.
- `version` (string): Aztec version tag to clone (e.g., `v4.0.0-devnet.2-patch.1`). Defaults to latest supported version.
- `force` (boolean): Force re-clone even if repos exist
- `repos` (string[]): Specific repos to sync

**Example - Clone specific version:**

```
aztec_sync_repos({ version: "v3.0.0-devnet.6-patch.1" })
aztec_sync_repos({ version: "v4.0.0-devnet.2-patch.1" })
```

### `aztec_status`
Expand Down Expand Up @@ -133,9 +133,9 @@ Override with the `AZTEC_MCP_REPOS_DIR` environment variable:
```json
{
"mcpServers": {
"aztec-local": {
"aztec-mcp": {
"command": "npx",
"args": ["-y", "@aztec/mcp-server"],
"args": ["--prefer-online", "-y", "@aztec/mcp-server"],
"env": {
"AZTEC_MCP_REPOS_DIR": "/custom/path"
}
Expand All @@ -151,9 +151,9 @@ Set the default Aztec version with the `AZTEC_DEFAULT_VERSION` environment varia
```json
{
"mcpServers": {
"aztec-local": {
"aztec-mcp": {
"command": "npx",
"args": ["-y", "@aztec/mcp-server"],
"args": ["--prefer-online", "-y", "@aztec/mcp-server"],
"env": {
"AZTEC_DEFAULT_VERSION": "v3.0.0-devnet.6-plugin.1"
}
Expand Down
10 changes: 5 additions & 5 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ server.setRequestHandler(ListToolsRequestSchema, async () => ({
version: {
type: "string",
description:
"Aztec version tag to clone (e.g., 'v3.0.0-devnet.6-patch.1'). Defaults to latest supported version.",
"Aztec version tag to clone (e.g., 'v4.0.0-devnet.2-patch.1'). Defaults to latest supported version.",
},
force: {
type: "boolean",
Expand Down Expand Up @@ -223,7 +223,7 @@ function createSyncLog(): Logger {
level,
logger: "aztec-sync",
data: message,
}).catch(() => {});
}).catch(() => { });
};
}

Expand Down Expand Up @@ -290,7 +290,7 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
// in-flight sync to finish so read-only tools don't race against filesystem mutations.
if (name !== "aztec_sync_repos") {
ensureAutoResync();
if (syncInFlight) await syncInFlight.catch(() => {});
if (syncInFlight) await syncInFlight.catch(() => { });
}

try {
Expand All @@ -300,15 +300,15 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
switch (name) {
case "aztec_sync_repos": {
// Wait for any in-flight sync (auto or manual) before starting
while (syncInFlight) await syncInFlight.catch(() => {});
while (syncInFlight) await syncInFlight.catch(() => { });
const log = createSyncLog();
const task = syncRepos({
version: args?.version as string | undefined,
force: args?.force as boolean | undefined,
repos: args?.repos as string[] | undefined,
log,
});
syncInFlight = task.then(() => {}).finally(() => { syncInFlight = null; });
syncInFlight = task.then(() => { }).finally(() => { syncInFlight = null; });
const result = await task;
text = formatSyncResult(result);
break;
Expand Down
2 changes: 1 addition & 1 deletion src/repos/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ const BASE_REPOS: Omit<RepoConfig, "tag">[] = [

/**
* Get Aztec repositories configured for a specific version
* @param version - The Aztec version tag (e.g., "v3.0.0-devnet.6-patch.1")
* @param version - The Aztec version tag (e.g., "v4.0.0-devnet.2-patch.1")
*/
export function getAztecRepos(version?: string): RepoConfig[] {
const tag = version || DEFAULT_AZTEC_VERSION;
Expand Down
2 changes: 1 addition & 1 deletion test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ async function test() {
// Test 2: Sync repos (this will take a while)
console.log("2. Syncing repositories (this may take a few minutes)...");
const syncResult = await syncRepos({
version: "v3.0.0-devnet.6-patch.1",
version: "v4.0.0-devnet.2-patch.1",
force: true // Force re-clone to get all repos at the tag
});
console.log(` Success: ${syncResult.success}`);
Expand Down