Skip to content

feat(mcp-proxy): implement F099 MCP proxy stdio subprocess for tool interception#355

Merged
pocky merged 1 commit into
mainfrom
feature/F099-mcp-proxy--interception-et-contrle-des-t
May 26, 2026
Merged

feat(mcp-proxy): implement F099 MCP proxy stdio subprocess for tool interception#355
pocky merged 1 commit into
mainfrom
feature/F099-mcp-proxy--interception-et-contrle-des-t

Conversation

@pocky
Copy link
Copy Markdown
Contributor

@pocky pocky commented May 26, 2026

Summary

  • Implement F099: MCP proxy stdio subprocess that intercepts and controls tool calls between AWF agents and MCP servers, enabling workflow-level tool filtering, routing, and auditing
  • Add awf mcp serve command that spawns a stdio MCP server wrapping AWF plugins, letting any MCP-capable agent (Claude, Gemini, Codex, Copilot, OpenAI-compatible) use AWF tools via standard protocol
  • Introduce a full builtin tool suite (bash, glob, grep, read, write, edit) exposed through the MCP proxy layer, with per-step mcp_proxy configuration controlling which tools are available and how operations are routed
  • Lay down the supporting infrastructure: pkg/mcpserver JSON-RPC server, internal/application/tools routing/proxy service, internal/infrastructure/tools plugin adapter and schema mapper, plus comprehensive test coverage across all layers

Changes

Domain

  • internal/domain/workflow/mcp_proxy.go: New MCPProxy entity defining proxy configuration (enabled flag, allowed tools, plugin bindings, operation routing)
  • internal/domain/workflow/mcp_proxy_test.go: Unit tests for MCPProxy entity
  • internal/domain/workflow/step.go: Add MCPProxy field to Step entity
  • internal/domain/workflow/step_mcp_proxy_validation_test.go: Validation tests for mcp_proxy step config
  • internal/domain/workflow/validation_errors.go: New validation error codes for mcp_proxy configuration
  • internal/domain/workflow/validation_errors_test.go: Tests for new error codes
  • internal/domain/workflow/workflow.go: Wire mcp_proxy validation into workflow-level validation
  • internal/domain/ports/tool_provider.go: New ToolProvider port interface
  • internal/domain/ports/tool_provider_test.go: Tests for ToolProvider port
  • internal/domain/ports/cli_executor.go: Extend CLIExecutor port with MCP proxy capability
  • internal/domain/ports/cli_executor_test.go: Update tests for extended executor
  • internal/domain/errors/codes.go: New error codes for tool proxy and MCP operations
  • internal/domain/errors/codes_test.go: Tests for new error codes

Application

  • internal/application/execution_tool_proxy.go: New ExecutionToolProxy coordinating tool interception during step execution
  • internal/application/execution_tool_proxy_test.go: Unit tests for tool proxy coordination
  • internal/application/execution_service_settoolproxy_test.go: Tests for SetToolProxy wiring on ExecutionService
  • internal/application/execution_service.go: Wire tool proxy into step execution lifecycle
  • internal/application/execution_setup.go: Initialize and configure tool proxy during execution setup
  • internal/application/conversation_manager.go: Pass tool proxy context into conversation execution
  • internal/application/service.go: Expose SetToolProxy and tool proxy lifecycle on ApplicationService
  • internal/application/tools/proxy_service.go: New ProxyService managing tool routing decisions
  • internal/application/tools/proxy_service_test.go: Tests for ProxyService routing logic
  • internal/application/tools/router.go: New Router dispatching tool calls to correct provider or builtin
  • internal/application/tools/router_test.go: Tests for Router dispatch
  • internal/application/tools/config.go: Tool proxy configuration types
  • internal/application/tools/doc.go: Package documentation
  • internal/application/tools/architecture_test.go: Architecture conformance tests

Infrastructure — Agents (MCP wiring per provider)

  • internal/infrastructure/agents/base_cli_provider.go: Add MCP proxy subprocess launch and stdio handshake to base provider
  • internal/infrastructure/agents/base_cli_provider_conversation_mcp_test.go: Tests for base provider MCP conversation mode
  • internal/infrastructure/agents/claude_provider.go: Wire --mcp-config flag with proxy server address for Claude
  • internal/infrastructure/agents/claude_provider_mcp_test.go: Claude MCP flag assembly tests
  • internal/infrastructure/agents/gemini_provider.go: Wire MCP proxy config for Gemini
  • internal/infrastructure/agents/gemini_provider_mcp_test.go: Gemini MCP tests
  • internal/infrastructure/agents/codex_provider.go: Wire MCP proxy for Codex with warning for unsupported stdio
  • internal/infrastructure/agents/codex_provider_mcp_test.go: Codex MCP warning tests
  • internal/infrastructure/agents/copilot_provider.go: Wire MCP proxy config for Copilot
  • internal/infrastructure/agents/copilot_provider_mcp_test.go: Copilot MCP tests
  • internal/infrastructure/agents/openai_compatible_provider.go: Full MCP tool call support for OpenAI-compatible providers via API-level tool injection
  • internal/infrastructure/agents/openai_compatible_provider_mcp_test.go: OpenAI-compatible MCP tests
  • internal/infrastructure/agents/openai_compatible_tools.go: Tool schema serialization for OpenAI tool_calls protocol
  • internal/infrastructure/agents/openai_compatible_tools_test.go: Schema serialization tests
  • internal/infrastructure/agents/opencode_provider.go: Wire MCP proxy for Opencode via workspace config
  • internal/infrastructure/agents/opencode_provider_mcp_test.go: Opencode MCP tests
  • internal/infrastructure/agents/opencode_provider_unit_test.go: Refactor unit tests after workspace config extraction
  • internal/infrastructure/agents/opencode_workspace_config.go: Extract Opencode workspace config generation (MCP server entries)
  • internal/infrastructure/agents/opencode_workspace_config_test.go: Workspace config generation tests
  • internal/infrastructure/agents/opencode_workspace_config_windows.go: Windows-compatible workspace config path resolution
  • internal/infrastructure/agents/mcp_proxy_name.go: Deterministic proxy server name generation
  • internal/infrastructure/agents/mcp_proxy_name_test.go: Tests for proxy name generation
  • internal/infrastructure/agents/mcp_proxy_purge.go: Cleanup logic for stale proxy config files after execution
  • internal/infrastructure/agents/mcp_proxy_purge_test.go: Purge lifecycle tests
  • internal/infrastructure/agents/cli_executor.go: Extend CLIExecutor to spawn and track proxy subprocess
  • internal/infrastructure/agents/cli_executor_test.go: CLIExecutor proxy subprocess tests
  • internal/infrastructure/agents/options.go: Add ToolProxy option to agent option set
  • internal/infrastructure/agents/provider_options_test.go: Tests for tool proxy option wiring
  • internal/infrastructure/agents/registry.go: Register tool proxy capability flag on agents
  • internal/infrastructure/agents/registry_test.go: Update registry tests for new capability

Infrastructure — Tools

  • internal/infrastructure/tools/builtins/bash.go: Builtin bash tool implementation
  • internal/infrastructure/tools/builtins/bash_test.go: Bash tool tests
  • internal/infrastructure/tools/builtins/edit.go: Builtin edit tool implementation
  • internal/infrastructure/tools/builtins/edit_test.go: Edit tool tests
  • internal/infrastructure/tools/builtins/glob.go: Builtin glob tool implementation
  • internal/infrastructure/tools/builtins/glob_test.go: Glob tool tests
  • internal/infrastructure/tools/builtins/grep.go: Builtin grep tool implementation
  • internal/infrastructure/tools/builtins/grep_test.go: Grep tool tests
  • internal/infrastructure/tools/builtins/read.go: Builtin read tool implementation
  • internal/infrastructure/tools/builtins/read_test.go: Read tool tests
  • internal/infrastructure/tools/builtins/write.go: Builtin write tool implementation
  • internal/infrastructure/tools/builtins/write_test.go: Write tool tests
  • internal/infrastructure/tools/builtins/provider.go: BuiltinProvider registering all builtin tools
  • internal/infrastructure/tools/builtins/provider_test.go: BuiltinProvider tests
  • internal/infrastructure/tools/plugin_adapter.go: Adapter bridging plugin RPC tools into ToolProvider interface
  • internal/infrastructure/tools/plugin_adapter_test.go: Plugin adapter tests
  • internal/infrastructure/tools/schema_mapper.go: Map AWF tool schemas to MCP JSON Schema format
  • internal/infrastructure/tools/schema_mapper_test.go: Schema mapper tests
  • internal/infrastructure/tools/doc.go: Package documentation

Infrastructure — Other

  • internal/infrastructure/repository/yaml_mapper.go: Parse mcp_proxy YAML stanza into domain entity
  • internal/infrastructure/repository/yaml_mapper_mcp_proxy_test.go: YAML mapper tests for mcp_proxy
  • internal/infrastructure/repository/yaml_repository.go: Register mcp_proxy types in repository
  • internal/infrastructure/repository/yaml_repository_test.go: Repository loading tests
  • internal/infrastructure/repository/yaml_types.go: Add YAMLMCPProxy and related YAML struct types
  • internal/infrastructure/errors/hint_generators_test.go: Update hint generator tests for new error codes
  • internal/infrastructure/notify/desktop.go: Minor desktop notification update
  • internal/infrastructure/pluginmgr/rpc_manager.go: Expose plugin tool schemas over RPC for proxy adapter
  • internal/infrastructure/pluginmgr/rpc_manager_test.go: Update RPC manager tests
  • internal/infrastructure/pluginmgr/stream_manager_test.go: Update stream manager tests

CLI Interface

  • internal/interfaces/cli/mcp_serve.go: New awf mcp serve command — starts stdio MCP server wrapping configured plugins
  • internal/interfaces/cli/mcp_serve_test.go: Tests for mcp serve command lifecycle
  • internal/interfaces/cli/mcp_serve_helpers_test.go: Test helpers for mcp serve
  • internal/interfaces/cli/mcp_serve_plugin_test.go: Plugin bridge integration tests for mcp serve
  • internal/interfaces/cli/validate_mcp_proxy_test.go: Validation command tests for mcp_proxy step config
  • internal/interfaces/cli/root.go: Register mcp serve subcommand
  • internal/interfaces/cli/run.go: Pass tool proxy config into run execution path
  • internal/interfaces/cli/run_help.go: Update help text
  • internal/interfaces/cli/run_notify_config_test.go: Add notify config test
  • internal/interfaces/cli/run_pack_wiring_test.go: Update pack wiring test
  • internal/interfaces/cli/resume.go: Pass tool proxy into resume execution path
  • internal/interfaces/cli/validate.go: Validate mcp_proxy config in validate command
  • internal/interfaces/cli/ui/output.go: Add tool call display events to output renderer
  • internal/interfaces/cli/history_internal_test.go: Minor fix
  • internal/interfaces/cli/list_internal_test.go: Minor fix

Public Package — MCP Server

  • pkg/mcpserver/server.go: JSON-RPC 2.0 stdio MCP server implementation
  • pkg/mcpserver/server_test.go: Comprehensive server tests
  • pkg/mcpserver/protocol.go: MCP protocol message types and JSON-RPC framing
  • pkg/mcpserver/protocol_test.go: Protocol serialization tests
  • pkg/mcpserver/types.go: Shared MCP type definitions
  • pkg/mcpserver/doc.go: Package documentation
  • pkg/mcpserver/architecture_test.go: Architecture conformance tests

Public Package — Plugin SDK

  • pkg/plugin/sdk/grpc_plugin.go: Extend plugin SDK with tool schema advertisement over gRPC
  • pkg/plugin/sdk/grpc_plugin_test.go: gRPC plugin SDK tests
  • pkg/plugin/sdk/sdk.go: Expose tool provider interface from SDK
  • pkg/plugin/sdk/doc.go: SDK package documentation

Examples & Fixtures

  • examples/plugins/awf-plugin-echo/main.go: Update echo plugin to implement tool provider interface
  • examples/plugins/awf-plugin-echo/main_test.go: Echo plugin tests
  • tests/fixtures/mcp_proxy/mcp-proxy-*.yaml: Validation test fixtures for valid and invalid mcp_proxy configs
  • tests/integration/mcp/end_to_end_claude_test.go: End-to-end Claude + MCP proxy test
  • tests/integration/mcp/mcp_jsonrpc_e2e_test.go: JSON-RPC protocol end-to-end tests
  • tests/integration/mcp/plugin_bridge_test.go: Plugin bridge integration tests
  • tests/integration/mcp/subprocess_lifecycle_test.go: Proxy subprocess lifecycle tests

Mocks & Test Utilities

  • internal/testutil/mocks/mocks.go: Add mocks for ToolProvider, ProxyService, and MCPServer interfaces

Docs & Config

  • docs/ADR/017-mcp-proxy-stdio-subprocess-for-tool-interception.md: ADR documenting the stdio subprocess design decision
  • docs/user-guide/mcp-proxy.md: New user guide for mcp_proxy step configuration
  • docs/user-guide/agent-steps.md: Document mcp_proxy field in agent steps
  • docs/user-guide/plugins.md: Document plugin tool provider capability
  • docs/user-guide/workflow-syntax.md: Add mcp_proxy to workflow syntax reference
  • docs/development/creating-agent-provider.md: Add MCP proxy integration section for provider authors
  • docs/reference/error-codes.md: Document new tool proxy and MCP error codes
  • docs/README.md: Link new mcp-proxy guide
  • README.md: Mention MCP proxy capability in feature list
  • CLAUDE.md: Add architecture rules for MCP proxy patterns
  • .go-arch-lint.yml: Register new packages and their dependency rules
  • .gitignore: Ignore generated proxy config temp files
  • .zpm/kb/default/journal.wal: ZPM knowledge base journal
  • .zpm/mounts.json: ZPM mount configuration

Test plan

  • make build succeeds and awf mcp serve --help displays the new subcommand
  • awf validate rejects invalid mcp_proxy step configs (unknown plugin, name collision, unsupported Codex warning) using fixtures in tests/fixtures/mcp_proxy/
  • make test passes with zero failures; make test-race reports no data races in proxy subprocess and MCP server code
  • Integration: run tests/integration/mcp/subprocess_lifecycle_test.go to verify proxy subprocess starts, handles JSON-RPC tool calls, and shuts down cleanly

Closes #353


Generated with awf commit workflow

…nterception

- `.gitignore`: Add MCP proxy runtime artifacts
- `.go-arch-lint.yml`: Register new tools packages and dependency rules
- `.zpm/kb/default/journal.wal`: Add ZPM knowledge base journal
- `.zpm/mounts.json`: Add ZPM mount configuration
- `CLAUDE.md`: Add doc.go and architecture rules for new packages
- `README.md`: Add MCP proxy feature reference
- `docs/ADR/017-mcp-proxy-stdio-subprocess-for-tool-interception.md`: Add ADR for stdio subprocess design decision
- `docs/README.md`: Link new MCP proxy guide
- `docs/development/creating-agent-provider.md`: Document MCP proxy integration for providers
- `docs/reference/error-codes.md`: Add MCP proxy error codes
- `docs/user-guide/agent-steps.md`: Document mcp_proxy step type
- `docs/user-guide/mcp-proxy.md`: Add complete MCP proxy user guide
- `docs/user-guide/plugins.md`: Document tool exposure via MCP proxy
- `docs/user-guide/workflow-syntax.md`: Add mcp_proxy YAML syntax reference
- `examples/plugins/awf-plugin-echo/main.go`: Add tool handler to echo plugin example
- `examples/plugins/awf-plugin-echo/main_test.go`: Add tool handler tests for echo plugin
- `internal/application/conversation_manager.go`: Wire tool proxy into conversation lifecycle
- `internal/application/execution_service.go`: Integrate tool proxy startup/teardown in execution
- `internal/application/execution_service_settoolproxy_test.go`: Test SetToolProxy wiring
- `internal/application/execution_setup.go`: Initialize tool proxy during execution setup
- `internal/application/execution_tool_proxy.go`: Add tool proxy lifecycle management
- `internal/application/execution_tool_proxy_test.go`: Test tool proxy lifecycle
- `internal/application/service.go`: Expose SetToolProxy on application service
- `internal/application/tools/architecture_test.go`: Enforce tools package architecture constraints
- `internal/application/tools/config.go`: Add tool proxy configuration types
- `internal/application/tools/doc.go`: Document application tools package architecture
- `internal/application/tools/proxy_service.go`: Implement tool proxy service orchestration
- `internal/application/tools/proxy_service_test.go`: Test proxy service routing and lifecycle
- `internal/application/tools/router.go`: Implement tool call routing to plugins and builtins
- `internal/application/tools/router_test.go`: Test tool router dispatch logic
- `internal/domain/errors/codes.go`: Add MCP proxy error codes
- `internal/domain/errors/codes_test.go`: Test new MCP proxy error codes
- `internal/domain/ports/cli_executor.go`: Add MCPProxy field to CLIExecutor options
- `internal/domain/ports/cli_executor_test.go`: Test MCPProxy field on executor options
- `internal/domain/ports/tool_provider.go`: Add ToolProvider port interface
- `internal/domain/ports/tool_provider_test.go`: Test ToolProvider interface contract
- `internal/domain/workflow/mcp_proxy.go`: Add MCPProxy domain entity
- `internal/domain/workflow/mcp_proxy_test.go`: Test MCPProxy entity validation
- `internal/domain/workflow/step.go`: Add MCPProxy field to Step entity
- `internal/domain/workflow/step_mcp_proxy_validation_test.go`: Test step mcp_proxy validation
- `internal/domain/workflow/validation_errors.go`: Add MCP proxy validation error types
- `internal/domain/workflow/validation_errors_test.go`: Test MCP proxy validation errors
- `internal/domain/workflow/workflow.go`: Validate mcp_proxy steps in workflow validation
- `internal/infrastructure/agents/base_cli_provider.go`: Wire MCP proxy args into all CLI providers
- `internal/infrastructure/agents/base_cli_provider_conversation_mcp_test.go`: Test MCP wiring in base provider
- `internal/infrastructure/agents/claude_provider.go`: Add --mcp-config flag support for MCP proxy
- `internal/infrastructure/agents/claude_provider_mcp_test.go`: Test Claude provider MCP proxy integration
- `internal/infrastructure/agents/cli_executor.go`: Launch MCP proxy subprocess before agent execution
- `internal/infrastructure/agents/cli_executor_test.go`: Test subprocess launch and teardown
- `internal/infrastructure/agents/codex_provider.go`: Add MCP proxy support for Codex with warning
- `internal/infrastructure/agents/codex_provider_mcp_test.go`: Test Codex MCP proxy warning behavior
- `internal/infrastructure/agents/copilot_provider.go`: Add MCP proxy flag injection for Copilot
- `internal/infrastructure/agents/copilot_provider_mcp_test.go`: Test Copilot MCP proxy injection
- `internal/infrastructure/agents/gemini_provider.go`: Add --mcp-config support for Gemini provider
- `internal/infrastructure/agents/gemini_provider_mcp_test.go`: Test Gemini MCP proxy integration
- `internal/infrastructure/agents/mcp_proxy_name.go`: Generate deterministic MCP proxy server names
- `internal/infrastructure/agents/mcp_proxy_name_test.go`: Test proxy name generation
- `internal/infrastructure/agents/mcp_proxy_purge.go`: Purge stale MCP proxy processes on startup
- `internal/infrastructure/agents/mcp_proxy_purge_test.go`: Test stale proxy purge logic
- `internal/infrastructure/agents/openai_compatible_provider.go`: Add MCP tool call interception for OpenAI-compatible providers
- `internal/infrastructure/agents/openai_compatible_provider_mcp_test.go`: Test OpenAI-compatible MCP interception
- `internal/infrastructure/agents/openai_compatible_tools.go`: Implement tool call assembly from chunked stream deltas
- `internal/infrastructure/agents/openai_compatible_tools_test.go`: Test tool call delta accumulation
- `internal/infrastructure/agents/opencode_provider.go`: Inject MCP proxy into opencode workspace config
- `internal/infrastructure/agents/opencode_provider_mcp_test.go`: Test opencode MCP proxy injection
- `internal/infrastructure/agents/opencode_provider_unit_test.go`: Update unit tests for opencode refactor
- `internal/infrastructure/agents/opencode_workspace_config.go`: Generate opencode workspace JSON with MCP servers
- `internal/infrastructure/agents/opencode_workspace_config_test.go`: Test workspace config generation
- `internal/infrastructure/agents/opencode_workspace_config_windows.go`: Windows-specific workspace config path
- `internal/infrastructure/agents/options.go`: Add MCPProxyAddr provider option
- `internal/infrastructure/agents/provider_options_test.go`: Test MCPProxyAddr option
- `internal/infrastructure/agents/registry.go`: Register tool proxy in agent registry
- `internal/infrastructure/agents/registry_test.go`: Test registry tool proxy wiring
- `internal/infrastructure/errors/hint_generators_test.go`: Add MCP proxy hint generator tests
- `internal/infrastructure/notify/desktop.go`: Handle MCP proxy notifications
- `internal/infrastructure/pluginmgr/rpc_manager.go`: Expose plugin tools via RPC manager
- `internal/infrastructure/pluginmgr/rpc_manager_test.go`: Test RPC tool exposure
- `internal/infrastructure/pluginmgr/stream_manager_test.go`: Update stream manager tests
- `internal/infrastructure/repository/yaml_mapper.go`: Map mcp_proxy YAML fields to domain entities
- `internal/infrastructure/repository/yaml_mapper_mcp_proxy_test.go`: Test mcp_proxy YAML mapping
- `internal/infrastructure/repository/yaml_repository.go`: Load mcp_proxy steps from YAML repository
- `internal/infrastructure/repository/yaml_repository_test.go`: Test mcp_proxy step loading
- `internal/infrastructure/repository/yaml_types.go`: Add MCPProxy YAML types
- `internal/infrastructure/tools/builtins/bash.go`: Implement bash builtin tool handler
- `internal/infrastructure/tools/builtins/bash_test.go`: Test bash builtin handler
- `internal/infrastructure/tools/builtins/edit.go`: Implement edit builtin tool handler
- `internal/infrastructure/tools/builtins/edit_test.go`: Test edit builtin handler
- `internal/infrastructure/tools/builtins/glob.go`: Implement glob builtin tool handler
- `internal/infrastructure/tools/builtins/glob_test.go`: Test glob builtin handler
- `internal/infrastructure/tools/builtins/grep.go`: Implement grep builtin tool handler
- `internal/infrastructure/tools/builtins/grep_test.go`: Test grep builtin handler
- `internal/infrastructure/tools/builtins/provider.go`: Register all builtin tool handlers
- `internal/infrastructure/tools/builtins/provider_test.go`: Test builtin provider registration
- `internal/infrastructure/tools/builtins/read.go`: Implement read builtin tool handler
- `internal/infrastructure/tools/builtins/read_test.go`: Test read builtin handler
- `internal/infrastructure/tools/builtins/write.go`: Implement write builtin tool handler
- `internal/infrastructure/tools/builtins/write_test.go`: Test write builtin handler
- `internal/infrastructure/tools/doc.go`: Document infrastructure tools package
- `internal/infrastructure/tools/plugin_adapter.go`: Adapt plugin RPC tools to ToolProvider interface
- `internal/infrastructure/tools/plugin_adapter_test.go`: Test plugin adapter tool translation
- `internal/infrastructure/tools/schema_mapper.go`: Map tool schemas between MCP and plugin formats
- `internal/infrastructure/tools/schema_mapper_test.go`: Test schema mapping
- `internal/interfaces/cli/history_internal_test.go`: Remove obsolete test imports
- `internal/interfaces/cli/list_internal_test.go`: Update list tests for registry changes
- `internal/interfaces/cli/mcp_serve.go`: Add `awf mcp serve` command for stdio MCP server
- `internal/interfaces/cli/mcp_serve_helpers_test.go`: Test mcp serve command helpers
- `internal/interfaces/cli/mcp_serve_plugin_test.go`: Test mcp serve plugin bridge
- `internal/interfaces/cli/mcp_serve_test.go`: Test mcp serve command lifecycle
- `internal/interfaces/cli/resume.go`: Pass tool proxy through resume execution path
- `internal/interfaces/cli/root.go`: Register mcp serve subcommand
- `internal/interfaces/cli/run.go`: Wire tool proxy into run command execution
- `internal/interfaces/cli/run_help.go`: Document mcp_proxy step in run help text
- `internal/interfaces/cli/run_notify_config_test.go`: Add notify config tests for mcp_proxy
- `internal/interfaces/cli/run_pack_wiring_test.go`: Update pack wiring tests
- `internal/interfaces/cli/ui/output.go`: Render mcp_proxy step progress in UI
- `internal/interfaces/cli/validate.go`: Validate mcp_proxy steps in validate command
- `internal/interfaces/cli/validate_mcp_proxy_test.go`: Test mcp_proxy step validation via CLI
- `internal/testutil/mocks/mocks.go`: Add MockToolProvider and MockMCPServer mocks
- `pkg/mcpserver/architecture_test.go`: Enforce mcpserver package architecture
- `pkg/mcpserver/doc.go`: Document MCP server package protocol and design
- `pkg/mcpserver/protocol.go`: Implement JSON-RPC 2.0 MCP protocol types
- `pkg/mcpserver/protocol_test.go`: Test MCP protocol serialization
- `pkg/mcpserver/server.go`: Implement stdio MCP server with tool dispatch
- `pkg/mcpserver/server_test.go`: Test MCP server tool registration and dispatch
- `pkg/mcpserver/types.go`: Define MCP server public types
- `pkg/plugin/sdk/doc.go`: Expand SDK doc with tool handler documentation
- `pkg/plugin/sdk/grpc_plugin.go`: Add RegisterToolHandler to plugin SDK
- `pkg/plugin/sdk/grpc_plugin_test.go`: Test RegisterToolHandler lifecycle
- `pkg/plugin/sdk/sdk.go`: Export tool handler types from SDK
- `tests/fixtures/mcp_proxy/` (9 files): Add YAML fixtures for mcp_proxy validation scenarios
- `tests/integration/mcp/end_to_end_claude_test.go`: Add end-to-end Claude MCP proxy integration test
- `tests/integration/mcp/mcp_jsonrpc_e2e_test.go`: Add JSON-RPC end-to-end MCP protocol test
- `tests/integration/mcp/plugin_bridge_test.go`: Add plugin-to-MCP bridge integration test
- `tests/integration/mcp/subprocess_lifecycle_test.go`: Add subprocess lifecycle integration test

Closes #353
@pocky pocky marked this pull request as ready for review May 26, 2026 22:41
@pocky pocky merged commit 9eef2d1 into main May 26, 2026
5 checks passed
@pocky pocky deleted the feature/F099-mcp-proxy--interception-et-contrle-des-t branch May 26, 2026 22:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

F099: MCP Proxy — Interception et contrôle des tool calls

1 participant