Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .mcp.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"type": "stdio",
"command": "node",
"args": [
"dist/index.js"
"/Users/jonathanborduas/code/codex-mcp-server/dist/index.js"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

Revert the hardcoded absolute machine-specific path — this will break the server for everyone else.

/Users/jonathanborduas/code/codex-mcp-server/dist/index.js is specific to one developer's local environment. This path won't exist on any other machine, CI runner, or deployment target, causing the MCP server to fail to start.

This change appears to be an accidental local debugging artifact that should be reverted before merge.

🐛 Proposed fix
-        "/Users/jonathanborduas/code/codex-mcp-server/dist/index.js"
+        "dist/index.js"
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"/Users/jonathanborduas/code/codex-mcp-server/dist/index.js"
"dist/index.js"
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.mcp.json at line 7, Replace the hardcoded absolute path
"/Users/jonathanborduas/code/codex-mcp-server/dist/index.js" in .mcp.json with a
portable path (e.g. "dist/index.js" or "./dist/index.js" or a
configurable/env-driven value) so the server can run on other machines and CI;
locate the string in .mcp.json, remove the machine-specific path entry and
restore the intended relative path or configuration reference used by the
project.

],
"env": {}
}
Expand Down
8 changes: 6 additions & 2 deletions src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,12 @@ export class CodexMcpServer {
// Create progress sender that uses MCP notifications
const createProgressContext = (): ToolHandlerContext => {
let progressCount = 0;
let done = false;
return {
progressToken,
done: () => { done = true; },
sendProgress: async (message: string, progress?: number, total?: number) => {
if (!progressToken) return;
if (!progressToken || done) return;

progressCount++;
try {
Expand Down Expand Up @@ -83,7 +85,9 @@ export class CodexMcpServer {

const handler = toolHandlers[name];
const context = createProgressContext();
return await handler.execute(args, context);
const result = await handler.execute(args, context);
context.done?.();
return result;
} catch (error) {
return {
content: [
Expand Down
1 change: 1 addition & 0 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -144,4 +144,5 @@ export type ProgressToken = string | number;
export interface ToolHandlerContext {
progressToken?: ProgressToken;
sendProgress: (message: string, progress?: number, total?: number) => Promise<void>;
done?: () => void;
}
Loading