@justanothermldude/mcp-exec 1.7.9 → 1.7.11
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.
- package/README.md +21 -21
- package/dist/index.js +2 -2
- package/dist/tools/list-servers.js +2 -2
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -156,12 +156,12 @@ const tool: ToolDefinition = {
|
|
|
156
156
|
},
|
|
157
157
|
};
|
|
158
158
|
|
|
159
|
-
const wrapper = generateToolWrapper(tool, 'filesystem');
|
|
159
|
+
const wrapper = generateToolWrapper(tool, 'example-filesystem');
|
|
160
160
|
// Generates TypeScript function that calls bridge endpoint
|
|
161
161
|
|
|
162
162
|
// Generate module for all server tools
|
|
163
163
|
const tools: ToolDefinition[] = [/* ... */];
|
|
164
|
-
const module = generateServerModule(tools, 'filesystem');
|
|
164
|
+
const module = generateServerModule(tools, 'example-filesystem');
|
|
165
165
|
// Generates complete TypeScript module with all tool wrappers
|
|
166
166
|
```
|
|
167
167
|
|
|
@@ -183,7 +183,7 @@ export async function read_file(input: ReadFileInput): Promise<unknown> {
|
|
|
183
183
|
method: 'POST',
|
|
184
184
|
headers: { 'Content-Type': 'application/json' },
|
|
185
185
|
body: JSON.stringify({
|
|
186
|
-
server_name: 'filesystem',
|
|
186
|
+
server_name: 'example-filesystem',
|
|
187
187
|
tool_name: 'read_file',
|
|
188
188
|
arguments: input,
|
|
189
189
|
}),
|
|
@@ -304,7 +304,7 @@ const result = await fetch('http://localhost:3000/call', {
|
|
|
304
304
|
method: 'POST',
|
|
305
305
|
headers: { 'Content-Type': 'application/json' },
|
|
306
306
|
body: JSON.stringify({
|
|
307
|
-
server: 'filesystem',
|
|
307
|
+
server: 'example-filesystem',
|
|
308
308
|
tool: 'read_file',
|
|
309
309
|
args: { path: '/tmp/test.txt' },
|
|
310
310
|
}),
|
|
@@ -318,7 +318,7 @@ Or use generated wrappers:
|
|
|
318
318
|
|
|
319
319
|
```typescript
|
|
320
320
|
// Import generated wrappers
|
|
321
|
-
import { read_file, write_file } from './filesystem-wrappers';
|
|
321
|
+
import { read_file, write_file } from './example-filesystem-wrappers';
|
|
322
322
|
|
|
323
323
|
// Type-safe tool calls
|
|
324
324
|
const content = await read_file({ path: '/tmp/test.txt' });
|
|
@@ -336,7 +336,7 @@ mcp-exec maintains a disk-cached tool catalog at `~/.meta-mcp/tool-catalog.json`
|
|
|
336
336
|
2. **Every session after:** On startup, mcp-exec reads the catalog and embeds the full API reference in the `execute_code_with_wrappers` tool description. The agent sees all tool names and parameter signatures before writing code:
|
|
337
337
|
```
|
|
338
338
|
Tool API Reference:
|
|
339
|
-
|
|
339
|
+
example-server: tool_one({args, config?}), tool_two({args, config?}), ...
|
|
340
340
|
```
|
|
341
341
|
|
|
342
342
|
3. **Self-maintaining:**
|
|
@@ -370,11 +370,11 @@ Server and tool names support flexible, case-agnostic access via Proxy-based fuz
|
|
|
370
370
|
All of these access patterns resolve to the same server:
|
|
371
371
|
|
|
372
372
|
```typescript
|
|
373
|
-
// Original server name: "
|
|
374
|
-
mcp['
|
|
375
|
-
mcp.
|
|
376
|
-
mcp.
|
|
377
|
-
mcp.
|
|
373
|
+
// Original server name: "example-jira-server"
|
|
374
|
+
mcp['example-jira-server'] // Bracket notation with original name
|
|
375
|
+
mcp.exampleJiraServer // camelCase
|
|
376
|
+
mcp.example_jira_server // snake_case
|
|
377
|
+
mcp.examplejiraserver // Lowercase without separators
|
|
378
378
|
```
|
|
379
379
|
|
|
380
380
|
### Tool Name Resolution
|
|
@@ -382,13 +382,13 @@ mcp.corpjira // Lowercase without separators
|
|
|
382
382
|
Similarly, tool names within a server support fuzzy matching:
|
|
383
383
|
|
|
384
384
|
```typescript
|
|
385
|
-
// Original tool name: "
|
|
386
|
-
const server = mcp['
|
|
385
|
+
// Original tool name: "search_issues"
|
|
386
|
+
const server = mcp['example-jira-server'];
|
|
387
387
|
|
|
388
|
-
server.
|
|
389
|
-
server.
|
|
390
|
-
server.
|
|
391
|
-
server['search-
|
|
388
|
+
server.search_issues // Original snake_case
|
|
389
|
+
server.searchIssues // camelCase
|
|
390
|
+
server.searchissues // Lowercase
|
|
391
|
+
server['search-issues'] // kebab-case via bracket notation
|
|
392
392
|
```
|
|
393
393
|
|
|
394
394
|
### How It Works
|
|
@@ -403,16 +403,16 @@ The resolution uses a two-step approach:
|
|
|
403
403
|
When a property doesn't match any available option, a `TypeError` is thrown with helpful suggestions:
|
|
404
404
|
|
|
405
405
|
```typescript
|
|
406
|
-
const server = mcp['
|
|
406
|
+
const server = mcp['example-jira-server'];
|
|
407
407
|
server.nonExistentTool;
|
|
408
|
-
// TypeError: Property "nonExistentTool" not found on
|
|
409
|
-
// Available:
|
|
408
|
+
// TypeError: Property "nonExistentTool" not found on example-jira-server.
|
|
409
|
+
// Available: search_issues, create_issue, get_issue, ...
|
|
410
410
|
```
|
|
411
411
|
|
|
412
412
|
```typescript
|
|
413
413
|
mcp.unknownServer;
|
|
414
414
|
// TypeError: Property "unknownServer" not found on mcp.
|
|
415
|
-
// Available:
|
|
415
|
+
// Available: example-jira-server, example-source, example-filesystem, ...
|
|
416
416
|
```
|
|
417
417
|
|
|
418
418
|
This makes it easy to discover available tools and servers when debugging or exploring the API.
|
package/dist/index.js
CHANGED
|
@@ -77,7 +77,7 @@ function createListServersHandler() {
|
|
|
77
77
|
const escapedTags = escapeMarkdownCell(tagsStr);
|
|
78
78
|
return `| \`${escapedName}\` | ${escapedDesc} | ${escapedTags} |`;
|
|
79
79
|
});
|
|
80
|
-
const table = "## Available MCP Servers\n\n| Name | Description | Tags |\n|------|-------------|------|\n" + rows.join("\n") + '\n\nTo use a server, pass its exact name in the `wrappers` array of `execute_code_with_wrappers`.\nExample: `wrappers: ["
|
|
80
|
+
const table = "## Available MCP Servers\n\n| Name | Description | Tags |\n|------|-------------|------|\n" + rows.join("\n") + '\n\nTo use a server, pass its exact name in the `wrappers` array of `execute_code_with_wrappers`.\nExample: `wrappers: ["example-server"]`\n\nTo see tools on a server: `get_mcp_tool_schema({ server: "example-server" })`';
|
|
81
81
|
return {
|
|
82
82
|
content: [{ type: "text", text: table }],
|
|
83
83
|
isError: false
|
|
@@ -2003,7 +2003,7 @@ __name(createMcpExecServer, "createMcpExecServer");
|
|
|
2003
2003
|
// dist/index.js
|
|
2004
2004
|
import { ServerPool, createConnection, getServerConfig as getServerConfig3, loadServerManifest as loadServerManifest2, cleanupOrphanedProcesses } from "@justanothermldude/mcp-exec-core";
|
|
2005
2005
|
var APP_NAME = "mcp-exec";
|
|
2006
|
-
var VERSION2 = "1.7.
|
|
2006
|
+
var VERSION2 = "1.7.11";
|
|
2007
2007
|
var defaultExecutor = null;
|
|
2008
2008
|
function getDefaultExecutor() {
|
|
2009
2009
|
if (!defaultExecutor) {
|
|
@@ -101,8 +101,8 @@ export function createListServersHandler() {
|
|
|
101
101
|
rows.join('\n') +
|
|
102
102
|
'\n\n' +
|
|
103
103
|
'To use a server, pass its exact name in the `wrappers` array of `execute_code_with_wrappers`.\n' +
|
|
104
|
-
'Example: `wrappers: ["
|
|
105
|
-
'To see tools on a server: `get_mcp_tool_schema({ server: "
|
|
104
|
+
'Example: `wrappers: ["example-server"]`\n\n' +
|
|
105
|
+
'To see tools on a server: `get_mcp_tool_schema({ server: "example-server" })`';
|
|
106
106
|
return {
|
|
107
107
|
content: [{ type: 'text', text: table }],
|
|
108
108
|
isError: false,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@justanothermldude/mcp-exec",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.11",
|
|
4
4
|
"description": "MCP execution utilities for sandboxed code execution with OS-level isolation",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"@anthropic-ai/sandbox-runtime": "^0.0.19",
|
|
24
|
-
"@justanothermldude/mcp-exec-core": "^0.1.
|
|
24
|
+
"@justanothermldude/mcp-exec-core": "^0.1.11",
|
|
25
25
|
"@modelcontextprotocol/sdk": "^1.25.3",
|
|
26
26
|
"esbuild": "^0.25.12",
|
|
27
27
|
"get-port": "^7.1.0"
|