@aiready/mcp-server 0.2.10 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,16 +1,17 @@
1
-
2
- > @aiready/mcp-server@0.2.8 build /Users/pengcao/projects/aiready/packages/mcp-server
3
- > tsup src/index.ts --format esm --clean --dts
4
-
5
- CLI Building entry: src/index.ts
6
- CLI Using tsconfig: tsconfig.json
7
- CLI tsup v8.5.1
8
- CLI Using tsup config: /Users/pengcao/projects/aiready/packages/mcp-server/tsup.config.ts
9
- CLI Target: node20
10
- CLI Cleaning output folder
11
- ESM Build start
12
- ESM dist/index.js 7.52 KB
13
- ESM ⚡️ Build success in 10ms
14
- DTS Build start
15
- DTS ⚡️ Build success in 1358ms
16
- DTS dist/index.d.ts 461.00 B
1
+
2
+ 
3
+ > @aiready/mcp-server@0.3.0 build /Users/pengcao/projects/aiready/packages/mcp-server
4
+ > tsup src/index.ts --format esm --clean --dts
5
+
6
+ CLI Building entry: src/index.ts
7
+ CLI Using tsconfig: tsconfig.json
8
+ CLI tsup v8.5.1
9
+ CLI Using tsup config: /Users/pengcao/projects/aiready/packages/mcp-server/tsup.config.ts
10
+ CLI Target: node20
11
+ CLI Cleaning output folder
12
+ ESM Build start
13
+ ESM dist/index.js 8.93 KB
14
+ ESM ⚡️ Build success in 42ms
15
+ DTS Build start
16
+ DTS ⚡️ Build success in 4156ms
17
+ DTS dist/index.d.ts 482.00 B
@@ -1,6 +1,6 @@
1
1
 
2
2
  
3
- > @aiready/mcp-server@0.2.10 format-check /Users/pengcao/projects/aiready/packages/mcp-server
3
+ > @aiready/mcp-server@0.4.0 format-check /Users/pengcao/projects/aiready/packages/mcp-server
4
4
  > prettier --check . --ignore-path ../../.prettierignore
5
5
 
6
6
  Checking formatting...
@@ -1,5 +1,5 @@
1
1
 
2
2
  
3
- > @aiready/mcp-server@0.2.10 lint /Users/pengcao/projects/aiready/packages/mcp-server
3
+ > @aiready/mcp-server@0.4.0 lint /Users/pengcao/projects/aiready/packages/mcp-server
4
4
  > eslint src
5
5
 
@@ -1,22 +1,20 @@
1
-
2
- 
3
- > @aiready/mcp-server@0.2.7 test /Users/pengcao/projects/aiready/packages/mcp-server
4
- > vitest run
5
-
6
- [?25l
7
-  RUN  v4.0.18 /Users/pengcao/projects/aiready/packages/mcp-server
8
-
9
- AIReady MCP Server started
10
- [MCP] Dynamically loading @aiready/pattern-detect for tool pattern-detect
11
- [MCP] Executing pattern-detect on /Users/pengcao/projects/aiready/packages/core
12
- [MCP] Dynamically loading @aiready/non-existent-tool for tool non-existent-tool
13
- [MCP] Failed to load tool package @aiready/non-existent-tool: Cannot find package '@aiready/non-existent-tool' imported from /Users/pengcao/projects/aiready/packages/mcp-server/dist/index.js
14
- ✓ src/__tests__/server.test.ts (5 tests) 902ms
15
- ✓ should execute pattern-detect and return results  472ms
16
-
17
-  Test Files  1 passed (1)
18
-  Tests  5 passed (5)
19
-  Start at  00:14:12
20
-  Duration  1.20s (transform 68ms, setup 0ms, import 112ms, tests 902ms, environment 0ms)
21
-
22
- [?25h
1
+
2
+ > @aiready/mcp-server@0.2.10 test /Users/pengcao/projects/aiready/packages/mcp-server
3
+ > vitest run
4
+
5
+
6
+  RUN  v4.0.18 /Users/pengcao/projects/aiready/packages/mcp-server
7
+
8
+ AIReady MCP Server started
9
+ [MCP] Dynamically loading @aiready/pattern-detect for tool pattern-detect
10
+ [MCP] Executing pattern-detect on /Users/pengcao/projects/aiready/packages/core
11
+ [MCP] Dynamically loading @aiready/non-existent-tool for tool non-existent-tool
12
+ [MCP] Failed to load tool package @aiready/non-existent-tool: Cannot find package '@aiready/non-existent-tool' imported from /Users/pengcao/projects/aiready/packages/mcp-server/dist/index.js
13
+ ✓ src/__tests__/server.test.ts (5 tests) 1147ms
14
+ ✓ should execute pattern-detect and return results  783ms
15
+
16
+  Test Files  1 passed (1)
17
+  Tests  5 passed (5)
18
+  Start at  14:45:23
19
+  Duration  1.44s (transform 45ms, setup 0ms, import 89ms, tests 1.15s, environment 0ms)
20
+
@@ -1,5 +1,5 @@
1
1
 
2
2
  
3
- > @aiready/mcp-server@0.2.10 type-check /Users/pengcao/projects/aiready/packages/mcp-server
3
+ > @aiready/mcp-server@0.4.0 type-check /Users/pengcao/projects/aiready/packages/mcp-server
4
4
  > tsc --noEmit
5
5
 
package/README.md CHANGED
@@ -48,7 +48,7 @@ To use the AIReady MCP server in the Claude Desktop app, add the following confi
48
48
  If you prefer running MCP servers in isolated environments, you can use our Docker image:
49
49
 
50
50
  ```bash
51
- docker run -i --rm ghcr.io/caopengau/aiready-mcp-server
51
+ docker run -i --rm ghcr.io/getaiready/aiready-mcp-server
52
52
  ```
53
53
 
54
54
  _(Note: Docker image distribution is currently being set up. Use the command above once published.)_
package/dist/index.js CHANGED
@@ -10,7 +10,10 @@ import {
10
10
  import { ToolRegistry, ToolName } from "@aiready/core";
11
11
  import { z } from "zod";
12
12
  var AnalysisArgsSchema = z.object({
13
- path: z.string().describe("Path to the directory to analyze")
13
+ path: z.string().describe("Path to the directory to analyze"),
14
+ summary_only: z.boolean().optional().describe(
15
+ "If true, returns only the summary and skips the detailed issue list. Best for large projects to save context."
16
+ )
14
17
  });
15
18
  var RemediationArgsSchema = z.object({
16
19
  issue_id: z.string().describe("The unique ID of the issue to fix"),
@@ -137,6 +140,10 @@ ${data.rationale}`
137
140
  path: {
138
141
  type: "string",
139
142
  description: "Path to the directory to analyze"
143
+ },
144
+ summary_only: {
145
+ type: "boolean",
146
+ description: "If true, returns only the summary and skips the detailed issue list. Best for large projects to save context."
140
147
  }
141
148
  },
142
149
  required: ["path"]
@@ -173,15 +180,19 @@ ${data.rationale}`
173
180
  if (name === "get_remediation_diff") {
174
181
  const parsedArgs2 = RemediationArgsSchema.safeParse(args);
175
182
  if (!parsedArgs2.success) {
176
- throw new Error(`Invalid arguments for ${name}: ${parsedArgs2.error.message}`);
183
+ throw new Error(
184
+ `Invalid arguments for ${name}: ${parsedArgs2.error.message}`
185
+ );
177
186
  }
178
187
  return await this.handleRemediation(parsedArgs2.data);
179
188
  }
180
189
  const parsedArgs = AnalysisArgsSchema.safeParse(args);
181
190
  if (!parsedArgs.success) {
182
- throw new Error(`Invalid arguments for ${name}: ${parsedArgs.error.message}`);
191
+ throw new Error(
192
+ `Invalid arguments for ${name}: ${parsedArgs.error.message}`
193
+ );
183
194
  }
184
- const { path: rootDir } = parsedArgs.data;
195
+ const { path: rootDir, summary_only } = parsedArgs.data;
185
196
  let provider = ToolRegistry.find(name);
186
197
  if (!provider) {
187
198
  const packageName = TOOL_PACKAGE_MAP[name] ?? (name.startsWith("@aiready/") ? name : `@aiready/${name}`);
@@ -206,15 +217,22 @@ ${data.rationale}`
206
217
  if (!provider) {
207
218
  throw new Error(`Tool ${name} not found after attempting to load`);
208
219
  }
209
- console.error(`[MCP] Executing ${name} on ${rootDir}`);
220
+ console.error(
221
+ `[MCP] Executing ${name} on ${rootDir}${summary_only ? " (summary only)" : ""}`
222
+ );
210
223
  const results = await provider.analyze({
211
224
  rootDir
212
225
  });
226
+ const responseData = summary_only ? {
227
+ summary: results.summary,
228
+ metadata: results.metadata,
229
+ notice: "Detailed issues were omitted (summary_only: true). Run without summary_only for full details."
230
+ } : results;
213
231
  return {
214
232
  content: [
215
233
  {
216
234
  type: "text",
217
- text: JSON.stringify(results, null, 2)
235
+ text: JSON.stringify(responseData, null, 2)
218
236
  }
219
237
  ]
220
238
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aiready/mcp-server",
3
- "version": "0.2.10",
3
+ "version": "0.5.0",
4
4
  "description": "The AIReady Model Context Protocol (MCP) Server for Agentic Readiness. Optimize codebases for AI agents like Cursor, Windsurf, and Claude directly via MCP.",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -13,16 +13,16 @@
13
13
  "@modelcontextprotocol/sdk": "^1.0.0",
14
14
  "chalk": "^5.3.0",
15
15
  "zod": "^4.3.6",
16
- "@aiready/agent-grounding": "0.14.13",
17
- "@aiready/ai-signal-clarity": "0.14.15",
18
- "@aiready/consistency": "0.21.13",
19
- "@aiready/context-analyzer": "0.22.13",
20
- "@aiready/core": "0.24.14",
21
- "@aiready/pattern-detect": "0.17.13",
22
- "@aiready/testability": "0.7.14",
23
- "@aiready/doc-drift": "0.14.13",
24
- "@aiready/change-amplification": "0.14.13",
25
- "@aiready/deps": "0.14.13"
16
+ "@aiready/agent-grounding": "0.14.15",
17
+ "@aiready/ai-signal-clarity": "0.14.17",
18
+ "@aiready/consistency": "0.21.15",
19
+ "@aiready/core": "0.24.16",
20
+ "@aiready/deps": "0.14.15",
21
+ "@aiready/change-amplification": "0.14.15",
22
+ "@aiready/context-analyzer": "0.22.15",
23
+ "@aiready/doc-drift": "0.14.15",
24
+ "@aiready/testability": "0.7.16",
25
+ "@aiready/pattern-detect": "0.17.15"
26
26
  },
27
27
  "devDependencies": {
28
28
  "@types/node": "^24.0.0",
@@ -47,7 +47,7 @@ describe('AIReady MCP Server Integration', () => {
47
47
  expect(toolNames).toContain('naming-consistency');
48
48
  });
49
49
 
50
- it('should expose correct input schema for tools', async () => {
50
+ it('should expose correct input schema for tools including summary_only', async () => {
51
51
  const result = await client.listTools();
52
52
 
53
53
  const patternDetect = result.tools.find((t) => t.name === 'pattern-detect');
@@ -55,11 +55,31 @@ describe('AIReady MCP Server Integration', () => {
55
55
  type: 'object',
56
56
  properties: {
57
57
  path: { type: 'string' },
58
+ summary_only: { type: 'boolean' },
58
59
  },
59
60
  required: ['path'],
60
61
  });
61
62
  });
62
63
 
64
+ it('should execute pattern-detect with summary_only: true and return only summary', async () => {
65
+ const result = await client.callTool({
66
+ name: 'pattern-detect',
67
+ arguments: {
68
+ path: path.resolve(__dirname, '../../../core'),
69
+ summary_only: true,
70
+ },
71
+ });
72
+ const typedResult = result as ToolCallResponse;
73
+
74
+ expect(typedResult.content).toBeDefined();
75
+ const data = JSON.parse((typedResult.content[0] as any).text);
76
+
77
+ expect(data).toHaveProperty('summary');
78
+ expect(data).toHaveProperty('metadata');
79
+ expect(data).toHaveProperty('notice');
80
+ expect(data).not.toHaveProperty('results');
81
+ }, 20000);
82
+
63
83
  it('should execute pattern-detect and return results', async () => {
64
84
  const result = await client.callTool({
65
85
  name: 'pattern-detect',
package/src/index.ts CHANGED
@@ -12,6 +12,12 @@ import { z } from 'zod';
12
12
  */
13
13
  const AnalysisArgsSchema = z.object({
14
14
  path: z.string().describe('Path to the directory to analyze'),
15
+ summary_only: z
16
+ .boolean()
17
+ .optional()
18
+ .describe(
19
+ 'If true, returns only the summary and skips the detailed issue list. Best for large projects to save context.'
20
+ ),
15
21
  });
16
22
 
17
23
  const RemediationArgsSchema = z.object({
@@ -162,6 +168,11 @@ export class AIReadyMcpServer {
162
168
  type: 'string',
163
169
  description: 'Path to the directory to analyze',
164
170
  },
171
+ summary_only: {
172
+ type: 'boolean',
173
+ description:
174
+ 'If true, returns only the summary and skips the detailed issue list. Best for large projects to save context.',
175
+ },
165
176
  },
166
177
  required: ['path'],
167
178
  },
@@ -215,7 +226,7 @@ export class AIReadyMcpServer {
215
226
  `Invalid arguments for ${name}: ${parsedArgs.error.message}`
216
227
  );
217
228
  }
218
- const { path: rootDir } = parsedArgs.data;
229
+ const { path: rootDir, summary_only } = parsedArgs.data;
219
230
 
220
231
  let provider = ToolRegistry.find(name);
221
232
 
@@ -251,18 +262,31 @@ export class AIReadyMcpServer {
251
262
  throw new Error(`Tool ${name} not found after attempting to load`);
252
263
  }
253
264
 
254
- console.error(`[MCP] Executing ${name} on ${rootDir}`);
265
+ console.error(
266
+ `[MCP] Executing ${name} on ${rootDir}${
267
+ summary_only ? ' (summary only)' : ''
268
+ }`
269
+ );
255
270
 
256
271
  const results = await provider.analyze({
257
272
  rootDir,
258
273
  });
259
274
 
260
275
  // Format results for the agent
276
+ const responseData = summary_only
277
+ ? {
278
+ summary: results.summary,
279
+ metadata: results.metadata,
280
+ notice:
281
+ 'Detailed issues were omitted (summary_only: true). Run without summary_only for full details.',
282
+ }
283
+ : results;
284
+
261
285
  return {
262
286
  content: [
263
287
  {
264
288
  type: 'text',
265
- text: JSON.stringify(results, null, 2),
289
+ text: JSON.stringify(responseData, null, 2),
266
290
  },
267
291
  ],
268
292
  };