Skip to content

Commit 029a426

Browse files
✨ feat(mcp): add MCP server
1 parent 3d20ce3 commit 029a426

4 files changed

Lines changed: 34 additions & 5 deletions

File tree

.claude/tasks/0001_introduce_mcp_server.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,9 @@ The MCP server will expose the rich domain model through standardized MCP resour
4040
## Phase 2: Implementation TODOs
4141

4242
### 🏗️ Core Infrastructure (Foundation)
43-
- [ ] Add Spring AI MCP Server dependencies
44-
- [ ] Configure MCP server in Spring Boot application
45-
- [ ] Create base MCP configuration classes in `shared/mcp/`
43+
- [x] Add Spring AI MCP Server dependencies
44+
- [x] Configure MCP server in Spring Boot application
45+
- [x] Create base MCP configuration classes in `shared/mcp/`
4646
- [ ] Implement authentication/authorization for MCP
4747

4848
### 🚀 Phase 1: Proof of Concept (Start Here)
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
package com.dddheroes.heroesofddd.shared.mcp.configuration;
2+
3+
import org.springframework.ai.mcp.server.annotation.McpTool;
4+
import org.springframework.stereotype.Component;
5+
6+
import java.time.LocalDateTime;
7+
import java.util.Map;
8+
9+
@Component
10+
public class McpHealthCheck {
11+
12+
@McpTool(name = "health_check", description = "Verifies that the MCP server is running and operational")
13+
public Map<String, Object> healthCheck() {
14+
return Map.of(
15+
"status", "healthy",
16+
"server", "Heroes of DDD MCP Server",
17+
"timestamp", LocalDateTime.now().toString(),
18+
"message", "MCP server is running successfully!"
19+
);
20+
}
21+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
package com.dddheroes.heroesofddd.shared.mcp.configuration;
2+
3+
import org.springframework.ai.mcp.server.annotation.EnableMcpServer;
4+
import org.springframework.context.annotation.Configuration;
5+
6+
@Configuration
7+
@EnableMcpServer
8+
public class McpServerConfiguration {
9+
}

src/main/resources/application.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,13 @@ spring:
1111
name: "Heroes of Might & Magic III - DDD/Event Sourcing Server"
1212
version: "1.0.0"
1313
type: SYNC
14-
transport: WEBMVC
1514
instructions: "MCP server for Heroes of Might & Magic III domain built with DDD, Event Sourcing, and Axon Framework. Provides domain operations, game management tools, and educational DDD resources."
1615
sse-message-endpoint: /mcp/messages
1716
capabilities:
1817
tool: true
1918
resource: true
2019
prompt: true
21-
completion: false
20+
completion: true
2221
datasource:
2322
url: jdbc:postgresql://localhost:6446/heroes_of_ddd_development
2423
username: heroes_of_ddd_db_user

0 commit comments

Comments
 (0)