Skip to content

Commit ef65ce1

Browse files
authored
Merge pull request #9 from AztecProtocol/docs/prefer-online-in-config
Add --prefer-online to npx examples in README
2 parents 984be99 + 624fe4a commit ef65ce1

File tree

4 files changed

+16
-16
lines changed

4 files changed

+16
-16
lines changed

README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ An MCP (Model Context Protocol) server that provides local access to Aztec docum
44

55
## Features
66

7-
- **Version Support**: Clone specific Aztec release tags (e.g., `v3.0.0-devnet.6-patch.1`)
7+
- **Version Support**: Clone specific Aztec release tags (e.g., `v4.0.0-devnet.2-patch.1`)
88
- **Local Repository Cloning**: Automatically clones Aztec repositories with sparse checkout for efficiency
99
- **Fast Code Search**: Search Noir contracts and TypeScript files using ripgrep (with fallback)
1010
- **Documentation Search**: Search Aztec documentation by section
@@ -34,9 +34,9 @@ Add to your `.mcp.json`:
3434
```json
3535
{
3636
"mcpServers": {
37-
"aztec-local": {
37+
"aztec-mcp": {
3838
"command": "npx",
39-
"args": ["-y", "@aztec/mcp-server@latest"]
39+
"args": ["--prefer-online", "-y", "@aztec/mcp-server@latest"]
4040
}
4141
}
4242
}
@@ -57,14 +57,14 @@ Clones:
5757

5858
**Parameters:**
5959

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

6464
**Example - Clone specific version:**
6565

6666
```
67-
aztec_sync_repos({ version: "v3.0.0-devnet.6-patch.1" })
67+
aztec_sync_repos({ version: "v4.0.0-devnet.2-patch.1" })
6868
```
6969

7070
### `aztec_status`
@@ -133,9 +133,9 @@ Override with the `AZTEC_MCP_REPOS_DIR` environment variable:
133133
```json
134134
{
135135
"mcpServers": {
136-
"aztec-local": {
136+
"aztec-mcp": {
137137
"command": "npx",
138-
"args": ["-y", "@aztec/mcp-server"],
138+
"args": ["--prefer-online", "-y", "@aztec/mcp-server"],
139139
"env": {
140140
"AZTEC_MCP_REPOS_DIR": "/custom/path"
141141
}
@@ -151,9 +151,9 @@ Set the default Aztec version with the `AZTEC_DEFAULT_VERSION` environment varia
151151
```json
152152
{
153153
"mcpServers": {
154-
"aztec-local": {
154+
"aztec-mcp": {
155155
"command": "npx",
156-
"args": ["-y", "@aztec/mcp-server"],
156+
"args": ["--prefer-online", "-y", "@aztec/mcp-server"],
157157
"env": {
158158
"AZTEC_DEFAULT_VERSION": "v3.0.0-devnet.6-plugin.1"
159159
}

src/index.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ server.setRequestHandler(ListToolsRequestSchema, async () => ({
6767
version: {
6868
type: "string",
6969
description:
70-
"Aztec version tag to clone (e.g., 'v3.0.0-devnet.6-patch.1'). Defaults to latest supported version.",
70+
"Aztec version tag to clone (e.g., 'v4.0.0-devnet.2-patch.1'). Defaults to latest supported version.",
7171
},
7272
force: {
7373
type: "boolean",
@@ -223,7 +223,7 @@ function createSyncLog(): Logger {
223223
level,
224224
logger: "aztec-sync",
225225
data: message,
226-
}).catch(() => {});
226+
}).catch(() => { });
227227
};
228228
}
229229

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

296296
try {
@@ -300,15 +300,15 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
300300
switch (name) {
301301
case "aztec_sync_repos": {
302302
// Wait for any in-flight sync (auto or manual) before starting
303-
while (syncInFlight) await syncInFlight.catch(() => {});
303+
while (syncInFlight) await syncInFlight.catch(() => { });
304304
const log = createSyncLog();
305305
const task = syncRepos({
306306
version: args?.version as string | undefined,
307307
force: args?.force as boolean | undefined,
308308
repos: args?.repos as string[] | undefined,
309309
log,
310310
});
311-
syncInFlight = task.then(() => {}).finally(() => { syncInFlight = null; });
311+
syncInFlight = task.then(() => { }).finally(() => { syncInFlight = null; });
312312
const result = await task;
313313
text = formatSyncResult(result);
314314
break;

src/repos/config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ const BASE_REPOS: Omit<RepoConfig, "tag">[] = [
128128

129129
/**
130130
* Get Aztec repositories configured for a specific version
131-
* @param version - The Aztec version tag (e.g., "v3.0.0-devnet.6-patch.1")
131+
* @param version - The Aztec version tag (e.g., "v4.0.0-devnet.2-patch.1")
132132
*/
133133
export function getAztecRepos(version?: string): RepoConfig[] {
134134
const tag = version || DEFAULT_AZTEC_VERSION;

test.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ async function test() {
2323
// Test 2: Sync repos (this will take a while)
2424
console.log("2. Syncing repositories (this may take a few minutes)...");
2525
const syncResult = await syncRepos({
26-
version: "v3.0.0-devnet.6-patch.1",
26+
version: "v4.0.0-devnet.2-patch.1",
2727
force: true // Force re-clone to get all repos at the tag
2828
});
2929
console.log(` Success: ${syncResult.success}`);

0 commit comments

Comments
 (0)