feat: integrate MCP directly into Architect Engine with dynamic plugin-aware tools #29
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Implements Model Context Protocol (MCP) support directly within the Architect Engine, enabling AI agents to interact with Architect capabilities through dynamically generated, plugin-aware tools.
Implementation
MCP as Engine Component (not standalone server)
architect-engine/engine/src/main/kotlin/.../mcp/McpProtocol.ktMcpToolService.ktMcpApiController.ktat/api/mcpMcpStdioLauncher.ktfor Claude Desktop integrationDynamic & Plugin-Aware Tool Generation
architect_{project}_{task}Static Tools:
architect_list_projects- List all registered projectsarchitect_register_project- Register new projectsDynamic Tools (per registered project):
architect_{project}_list_tasks- List tasks for a specific projectarchitect_{project}_{task}- Execute specific tasks with optional argumentsExample: Project "myapp" with tasks "build" and "test" generates:
architect_myapp_list_tasksarchitect_myapp_buildarchitect_myapp_testTwo Integration Modes:
/api/mcpwhen engine runs normally{ "mcpServers": { "architect": { "command": "sh", "args": [ "-c", "cd /path/to/architect/architect-engine/engine && ./gradlew runMcpStdio" ] } } }Benefits
Files Added/Modified
architect-engine/engine/src/main/kotlin/.../mcp/protocol/McpProtocol.kt- MCP protocol data classesarchitect-engine/engine/src/main/kotlin/.../mcp/service/McpToolService.kt- Dynamic tool generation (240 LOC)architect-engine/engine/src/main/kotlin/.../mcp/interfaces/McpApiController.kt- HTTP endpointarchitect-engine/engine/src/main/kotlin/.../mcp/McpStdioLauncher.kt- Stdio mode launcher (140 LOC)architect-engine/engine/MCP.md- Comprehensive documentationarchitect-engine/engine/build.gradle.kts- AddedrunMcpStdiotaskREADME.md- Updated with MCP integration detailsarchitect-engine/README.md- Added MCP component referenceOriginal prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.