feat(mcp): implement MCP server integration for Codex CLI

- Added a new CodexConfigManager to manage TOML configuration for MCP server settings.
- Introduced MCP server IPC handlers in main.js to facilitate feature status updates.
- Enhanced CodexExecutor and FeatureExecutor to configure and utilize MCP server settings.
- Created a standalone MCP server script for JSON-RPC communication with Codex CLI.
- Updated model-provider to pass MCP server configuration to the executor.

These changes enable seamless integration of the MCP server with Codex CLI, improving feature management and execution capabilities.
This commit is contained in:
Kacper
2025-12-10 10:56:47 +01:00
parent 379e5fc727
commit 18604078a6
7 changed files with 767 additions and 2 deletions

View File

@@ -397,6 +397,7 @@ class FeatureExecutor {
// Use Codex provider for OpenAI models
console.log(`[FeatureExecutor] Using Codex provider for model: ${modelString}`);
// Pass MCP server config to Codex provider so it can configure Codex CLI TOML
currentQuery = provider.executeQuery({
prompt,
model: modelString,
@@ -404,6 +405,9 @@ class FeatureExecutor {
systemPrompt: promptBuilder.getCodingPrompt(),
maxTurns: 20, // Codex CLI typically uses fewer turns
allowedTools: options.allowedTools,
mcpServers: {
"automaker-tools": featureToolsServer
},
abortController: abortController,
env: {
OPENAI_API_KEY: process.env.OPENAI_API_KEY