Skip to content

Commit 307bafd

Browse files
authored
Merge pull request #2 from yepcode/feature/YEP-2900
Rename skipRunCodeCleanup as runCodeCleanup
2 parents fc42e61 + 86c89d0 commit 307bafd

6 files changed

Lines changed: 17 additions & 16 deletions

File tree

.tool-versions

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
nodejs 22.13.1

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ Options can be passed as a comma-separated list in the `YEPCODE_MCP_OPTIONS` env
158158
{
159159
"mcpServers": {
160160
"yepcode-mcp-server": {
161-
"url": "https://cloud.yepcode.io/mcp/sk-c2E....RD/sse?mcpOptions=disableRunCodeTool,skipRunCodeCleanup"
161+
"url": "https://cloud.yepcode.io/mcp/sk-c2E....RD/sse?mcpOptions=disableRunCodeTool,runCodeCleanup"
162162
}
163163
}
164164
}
@@ -171,7 +171,7 @@ Options can be passed as a comma-separated list in the `YEPCODE_MCP_OPTIONS` env
171171
"args": ["-y", "@yepcode/mcp-server"],
172172
"env": {
173173
"YEPCODE_API_TOKEN": "your_api_token_here",
174-
"YEPCODE_MCP_OPTIONS": "disableRunCodeTool,skipRunCodeCleanup"
174+
"YEPCODE_MCP_OPTIONS": "disableRunCodeTool,runCodeCleanup"
175175
}
176176
}
177177
}

package-lock.json

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,11 @@
4646
"dev": "node --loader ts-node/esm src/index.ts",
4747
"build": "tsc && node -e \"require('fs').chmodSync('dist/index.js', '755')\"",
4848
"type-check": "tsc --noEmit",
49-
"inspector": "npx @modelcontextprotocol/inspector dist/index.js"
49+
"inspector": "npx @modelcontextprotocol/inspector node --env-file=.env dist/index.js"
5050
},
5151
"dependencies": {
5252
"@modelcontextprotocol/sdk": "^1.12.1",
53-
"@yepcode/run": "^1.3.0",
53+
"@yepcode/run": "^1.4.1",
5454
"dotenv": "^16.4.7",
5555
"zod": "^3.24.2"
5656
},

src/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,15 @@ const logger = new Logger("StdioServer", { logsToStderr: true });
99

1010
const main = async (): Promise<void> => {
1111
let disableRunCodeTool = false;
12-
let skipRunCodeCleanup = false;
12+
let runCodeCleanup = false;
1313
if (process.env.YEPCODE_MCP_OPTIONS) {
1414
const mcpOptions = process.env.YEPCODE_MCP_OPTIONS.split(",");
1515
disableRunCodeTool = mcpOptions.includes("disableRunCodeTool");
16-
skipRunCodeCleanup = mcpOptions.includes("skipRunCodeCleanup");
16+
runCodeCleanup = mcpOptions.includes("runCodeCleanup");
1717
}
1818
const server = new YepCodeMcpServer(
1919
{},
20-
{ logsToStderr: true, disableRunCodeTool, skipRunCodeCleanup }
20+
{ logsToStderr: true, disableRunCodeTool, runCodeCleanup }
2121
);
2222
try {
2323
const transport = new StdioServerTransport();

src/server.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,17 +44,17 @@ class YepCodeMcpServer extends Server {
4444
private yepCodeApi: YepCodeApi;
4545
private logger: Logger;
4646
private disableRunCodeTool: boolean;
47-
private skipRunCodeCleanup: boolean;
47+
private runCodeCleanup: boolean;
4848
constructor(
4949
config: YepCodeApiConfig,
5050
{
5151
logsToStderr = false,
5252
disableRunCodeTool = false,
53-
skipRunCodeCleanup = false,
53+
runCodeCleanup = false,
5454
}: {
5555
logsToStderr?: boolean;
5656
disableRunCodeTool?: boolean;
57-
skipRunCodeCleanup?: boolean;
57+
runCodeCleanup?: boolean;
5858
} = {}
5959
) {
6060
super(
@@ -72,7 +72,7 @@ class YepCodeMcpServer extends Server {
7272
);
7373

7474
this.disableRunCodeTool = disableRunCodeTool;
75-
this.skipRunCodeCleanup = skipRunCodeCleanup;
75+
this.runCodeCleanup = runCodeCleanup;
7676
this.setupHandlers();
7777
this.setupErrorHandling();
7878

@@ -351,7 +351,7 @@ Tip: First try to find a tool that matches your task, but if not available, try
351351
});
352352

353353
const execution = await this.yepCodeRun.run(code, {
354-
removeOnDone: !this.skipRunCodeCleanup,
354+
removeOnDone: this.runCodeCleanup,
355355
...options,
356356
initiatedBy: "@yepcode/mcp-server",
357357
onLog: (log) => {

0 commit comments

Comments
 (0)