
pierre-filliolaud/lab_mcp_ai_agent_springboot
Developer toolsЭта страница переведена автоматически. Технические детали смотрите в оригинале. Открыть оригинал
In this lab, you will build a real AI agent not a chatbot. The agent will understand user intent and take real actions on GitHub using MCP.
Обзор
In this lab, you will build a real AI agent not a chatbot. The agent will understand user intent and take real actions on GitHub using MCP. An AI Agent is a system that: • understands user intent, • reasons about what needs to be done, • and takes actions on external systems through controlled tools. 1. understand a natural language request, 2. reason with , 3. calls , 4. automatically create a , 5. be , , and . “Create a task to add OpenTelemetry and export traces via OTLP” All steps in this lab must follow , exactly as in a real engineering team. - - - Each issue must be: - created before coding - implemented on a dedicated branch - linked to commits - closed via a Pull Request - One PR per STEP - PR description must reference the issue - Issue is closed Create the following labels in the repository:
README
Показан фрагмент оригинального README. Открыть оригинал.
🧪 LAB – Building an MCP AI Agent with Claude
Java · Spring Boot · Gradle · LangChain4j · MCP · Claude · Testing · CI/CD · Docker · GitHub
In this lab, you will build a real AI agent not a chatbot. The agent will understand user intent and take real actions on GitHub using MCP.
This project implements an AI Agent. An AI Agent is a system that: • understands user intent, • reasons about what needs to be done, • and takes actions on external systems through controlled tools.
🎯 Global Lab Objective
Build step by step an AI agent able to:
- understand a natural language request,
- reason with Claude (Anthropic),
- calls standardized tools via MCP,
- automatically create a GitHub issue,
- be tested, containerized, and integrated into CI/CD.
🧠 End-to-end Use Case
“Create a task to add OpenTelemetry and export traces via OTLP”
⟶ a well-structured GitHub issue is created automatically.
🏗️ Target Architecture
User
↓ HTTP POST /api/run
AgentController (Spring Boot)
↓
AgentService
↓
LangChain4j Agent (BacklogAgent)
↓ tool call (@Tool)
GitHubMcpTools (Spring Boot)
↓
McpHttpClient
↓ JSON-RPC over HTTP
MCP HTTP Wrapper (Node.js)
↓ STDIO
GitHub MCP Server (official)
↓
GitHub API (Issues)
flowchart LR
%% =========================
%% User / Client
%% =========================
User["👤 User(curl / UI)"]
%% =========================
%% Spring Boot App (Student)
%% =========================
subgraph SB["🔨 Spring Boot Applicationlab_mcp_ai_agent_springboot"]
AgentController["🔨 AgentControllerREST APIPOST /api/run"]
AgentService["🔨 AgentServiceOrchestrates Agent"]
BacklogAgent["🔨 BacklogAgent(LangChain4j AI Service)System + User Prompt"]
LangChainConfig["🔨 LangChainConfigAnthropicChatModelTool Wiring"]
GitHubMcpTools["🔨 GitHubMcpTools@Tool createIssue(...)"]
McpHttpClient["🔨 McpHttpClientJSON-RPC over HTTP"]
end
%% =========================
%% External AI
%% =========================
Claude["📦 Anthropic Claude API(chat + tool-use)"]
%% =========================
%% MCP Layer
%% =========================
subgraph MCP["📦 MCP Layer"]
MCPWrapper["🔨 MCP HTTP Wrapper(Node.js / Express)POST /mcp"]
GitHubMCP["📦 GitHub MCP Server(STDIO, official)"]
end
%% =========================
%% GitHub
%% =========================
GitHub["📦 GitHub API(Issues, Repos)"]
%% =========================
%% Flows
%% =========================
User -->|HTTP POST /api/run| AgentController
AgentController --> AgentService
AgentService --> BacklogAgent
BacklogAgent -->|chat + tool schema| Claude
Claude -->|tool call request| BacklogAgent
Установка
docker run --rm -i -e GITHUB_PERSONAL_ACCESS_TOKEN=$GITHUB_PERSONAL_ACCESS_TOKEN ghcr.io/github/github-mcp-server