@aiready/mcp-server 0.2.6 → 0.2.8

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,6 +1,6 @@
1
1
 
2
2
  
3
- > @aiready/mcp-server@0.2.6 build /Users/pengcao/projects/aiready/packages/mcp-server
3
+ > @aiready/mcp-server@0.2.8 build /Users/pengcao/projects/aiready/packages/mcp-server
4
4
  > tsup src/index.ts --format esm --clean --dts
5
5
 
6
6
  CLI Building entry: src/index.ts
@@ -10,8 +10,8 @@
10
10
  CLI Target: node20
11
11
  CLI Cleaning output folder
12
12
  ESM Build start
13
- ESM dist/index.js 7.22 KB
14
- ESM ⚡️ Build success in 12ms
13
+ ESM dist/index.js 7.52 KB
14
+ ESM ⚡️ Build success in 18ms
15
15
  DTS Build start
16
- DTS ⚡️ Build success in 1269ms
16
+ DTS ⚡️ Build success in 1999ms
17
17
  DTS dist/index.d.ts 461.00 B
@@ -0,0 +1,7 @@
1
+
2
+ 
3
+ > @aiready/mcp-server@0.2.8 format-check /Users/pengcao/projects/aiready/packages/mcp-server
4
+ > prettier --check . --ignore-path ../../.prettierignore
5
+
6
+ Checking formatting...
7
+ .env.smithery.well-known/mcp/server-card.jsonpackage.jsonREADME.mdsmithery.yamlsrc/__tests__/server.test.tssrc/index.tstest-mcp.tstsconfig.jsontsup.config.tsAll matched files use Prettier code style!
@@ -1,4 +1,5 @@
1
-
2
- > @aiready/mcp-server@0.1.19 lint /Users/pengcao/projects/aiready/packages/mcp-server
3
- > eslint src
4
-
1
+
2
+ 
3
+ > @aiready/mcp-server@0.2.8 lint /Users/pengcao/projects/aiready/packages/mcp-server
4
+ > eslint src
5
+
@@ -1,6 +1,6 @@
1
1
 
2
2
  
3
- > @aiready/mcp-server@0.2.5 test /Users/pengcao/projects/aiready/packages/mcp-server
3
+ > @aiready/mcp-server@0.2.7 test /Users/pengcao/projects/aiready/packages/mcp-server
4
4
  > vitest run
5
5
 
6
6
  [?25l
@@ -11,12 +11,12 @@ AIReady MCP Server started
11
11
  [MCP] Executing pattern-detect on /Users/pengcao/projects/aiready/packages/core
12
12
  [MCP] Dynamically loading @aiready/non-existent-tool for tool non-existent-tool
13
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) 1987ms
15
- ✓ should execute pattern-detect and return results  1353ms
14
+ ✓ src/__tests__/server.test.ts (5 tests) 902ms
15
+ ✓ should execute pattern-detect and return results  472ms
16
16
 
17
17
   Test Files  1 passed (1)
18
18
   Tests  5 passed (5)
19
-  Start at  22:07:58
20
-  Duration  2.34s (transform 174ms, setup 0ms, import 216ms, tests 1.99s, environment 0ms)
19
+  Start at  00:14:12
20
+  Duration  1.20s (transform 68ms, setup 0ms, import 112ms, tests 902ms, environment 0ms)
21
21
 
22
22
  [?25h
@@ -0,0 +1,5 @@
1
+
2
+ 
3
+ > @aiready/mcp-server@0.2.8 type-check /Users/pengcao/projects/aiready/packages/mcp-server
4
+ > tsc --noEmit
5
+
package/dist/index.js CHANGED
@@ -92,11 +92,12 @@ ${data.rationale}`
92
92
  ]
93
93
  };
94
94
  } catch (error) {
95
+ const errorMessage = error instanceof Error ? error.message : String(error);
95
96
  return {
96
97
  content: [
97
98
  {
98
99
  type: "text",
99
- text: `Failed to get remediation: ${error.message}. Please visit the dashboard to fix manually.`
100
+ text: `Failed to get remediation: ${errorMessage}. Please visit the dashboard to fix manually.`
100
101
  }
101
102
  ],
102
103
  isError: true
@@ -161,7 +162,9 @@ ${data.rationale}`
161
162
  const { name, arguments: args } = request.params;
162
163
  try {
163
164
  if (name === "get_remediation_diff") {
164
- return await this.handleRemediation(args);
165
+ return await this.handleRemediation(
166
+ args
167
+ );
165
168
  }
166
169
  let provider = ToolRegistry.find(name);
167
170
  if (!provider) {
@@ -173,11 +176,12 @@ ${data.rationale}`
173
176
  await import(packageName);
174
177
  provider = ToolRegistry.find(name);
175
178
  } catch (importError) {
179
+ const importErrorMessage = importError instanceof Error ? importError.message : String(importError);
176
180
  console.error(
177
- `[MCP] Failed to load tool package ${packageName}: ${importError.message}`
181
+ `[MCP] Failed to load tool package ${packageName}: ${importErrorMessage}`
178
182
  );
179
183
  const error = new Error(
180
- `Tool ${name} not found and failed to load package ${packageName}: ${importError.message}`
184
+ `Tool ${name} not found and failed to load package ${packageName}: ${importErrorMessage}`
181
185
  );
182
186
  error.cause = importError;
183
187
  throw error;
@@ -202,11 +206,12 @@ ${data.rationale}`
202
206
  ]
203
207
  };
204
208
  } catch (error) {
209
+ const errorMessage = error instanceof Error ? error.message : String(error);
205
210
  return {
206
211
  content: [
207
212
  {
208
213
  type: "text",
209
- text: `Error: ${error.message}`
214
+ text: `Error: ${errorMessage}`
210
215
  }
211
216
  ],
212
217
  isError: true
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aiready/mcp-server",
3
- "version": "0.2.6",
3
+ "version": "0.2.8",
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,10 +13,10 @@
13
13
  "@modelcontextprotocol/sdk": "^1.0.0",
14
14
  "chalk": "^5.3.0",
15
15
  "zod": "^4.3.6",
16
- "@aiready/consistency": "0.21.7",
17
- "@aiready/context-analyzer": "0.22.7",
18
- "@aiready/core": "0.24.7",
19
- "@aiready/pattern-detect": "0.17.7"
16
+ "@aiready/consistency": "0.21.9",
17
+ "@aiready/core": "0.24.9",
18
+ "@aiready/context-analyzer": "0.22.9",
19
+ "@aiready/pattern-detect": "0.17.9"
20
20
  },
21
21
  "devDependencies": {
22
22
  "@types/node": "^24.0.0",
@@ -47,6 +47,8 @@
47
47
  "test": "vitest run",
48
48
  "lint": "eslint src",
49
49
  "clean": "rm -rf dist",
50
- "start": "node dist/index.js"
50
+ "start": "node dist/index.js",
51
+ "type-check": "tsc --noEmit",
52
+ "format-check": "prettier --check . --ignore-path ../../.prettierignore"
51
53
  }
52
54
  }
package/src/index.ts CHANGED
@@ -108,12 +108,14 @@ export class AIReadyMcpServer {
108
108
  },
109
109
  ],
110
110
  };
111
- } catch (error: any) {
111
+ } catch (error: unknown) {
112
+ const errorMessage =
113
+ error instanceof Error ? error.message : String(error);
112
114
  return {
113
115
  content: [
114
116
  {
115
117
  type: 'text',
116
- text: `Failed to get remediation: ${error.message}. Please visit the dashboard to fix manually.`,
118
+ text: `Failed to get remediation: ${errorMessage}. Please visit the dashboard to fix manually.`,
117
119
  },
118
120
  ],
119
121
  isError: true,
@@ -188,7 +190,13 @@ export class AIReadyMcpServer {
188
190
 
189
191
  try {
190
192
  if (name === 'get_remediation_diff') {
191
- return await this.handleRemediation(args as any);
193
+ return await this.handleRemediation(
194
+ args as {
195
+ issue_id: string;
196
+ file_path: string;
197
+ context: string;
198
+ }
199
+ );
192
200
  }
193
201
 
194
202
  let provider = ToolRegistry.find(name);
@@ -205,12 +213,16 @@ export class AIReadyMcpServer {
205
213
  );
206
214
  await import(packageName);
207
215
  provider = ToolRegistry.find(name);
208
- } catch (importError: any) {
216
+ } catch (importError: unknown) {
217
+ const importErrorMessage =
218
+ importError instanceof Error
219
+ ? importError.message
220
+ : String(importError);
209
221
  console.error(
210
- `[MCP] Failed to load tool package ${packageName}: ${importError.message}`
222
+ `[MCP] Failed to load tool package ${packageName}: ${importErrorMessage}`
211
223
  );
212
224
  const error = new Error(
213
- `Tool ${name} not found and failed to load package ${packageName}: ${importError.message}`
225
+ `Tool ${name} not found and failed to load package ${packageName}: ${importErrorMessage}`
214
226
  );
215
227
  (error as { cause?: unknown }).cause = importError;
216
228
  throw error;
@@ -240,12 +252,14 @@ export class AIReadyMcpServer {
240
252
  },
241
253
  ],
242
254
  };
243
- } catch (error: any) {
255
+ } catch (error: unknown) {
256
+ const errorMessage =
257
+ error instanceof Error ? error.message : String(error);
244
258
  return {
245
259
  content: [
246
260
  {
247
261
  type: 'text',
248
- text: `Error: ${error.message}`,
262
+ text: `Error: ${errorMessage}`,
249
263
  },
250
264
  ],
251
265
  isError: true,