A production-ready Model Context Protocol (MCP) Server built with Java 21, Spring Boot, and the MCP Java SDK.
The server enables AI assistants such as Claude Code CLI, Claude Desktop, and Open WebUI to understand and explain software artifacts including BPMN processes, Java source code, Groovy scripts, JavaScript files, and documents (PDF, DOCX, TXT).
The MCP server provides AI-powered explanations for both technical and non-technical audiences.
Supported inputs include:
- Activiti BPMN XML
- Java Source Code
- Groovy Scripts
- JavaScript Files
- PDF Documents
- Microsoft Word (DOCX)
- Text Files
For every supported input, the MCP server can generate:
- Technical Explanation
- Non-Technical Explanation
- Executive Summary
- Context
- Business Purpose
- Recommendations
- Claude Code CLI
- Claude Desktop
- Open WebUI
- Any MCP Compatible Client
| Technology | Version |
|---|---|
| Java | 21 |
| Spring Boot | 3.5+ |
| Spring AI | Latest |
| MCP Java SDK | Latest |
| Streamable HTTP | MCP Standard |
| Jackson | Latest |
| Maven | Latest |
- Activiti BPMN Parser
- JavaParser
- Groovy AST
- Esprima (JavaScript Parser)
- Apache PDFBox
- Apache POI
+----------------------+
| Claude Desktop |
| Claude Code CLI |
| Open WebUI |
+----------+-----------+
|
Streamable HTTP
|
+---------------------------------------------------------------+
| Spring Boot MCP Server |
|---------------------------------------------------------------|
| |
| MCP Server |
| |
| • Tools |
| • Resources |
| • Prompts |
| • Elicitation |
| |
|---------------------------------------------------------------|
| Business Services |
| |
| BPMN Analyzer |
| Java Analyzer |
| Groovy Analyzer |
| JavaScript Analyzer |
| Document Analyzer |
| AI Prompt Builder |
| Summary Generator |
| Context Generator |
|---------------------------------------------------------------|
| Parsing Layer |
| |
| Activiti BPMN |
| JavaParser |
| Groovy AST |
| Esprima |
| Apache PDFBox |
| Apache POI |
|---------------------------------------------------------------|
| AI Layer |
| |
| Claude |
| OpenAI |
| Gemini |
| Ollama |
| Azure OpenAI |
+---------------------------------------------------------------+
mcp-ai-explainer
├── src
│ ├── main
│ │ ├── java
│ │ │
│ │ ├── config
│ │ ├── controller
│ │ ├── ai
│ │ ├── parser
│ │ │ ├── bpmn
│ │ │ ├── java
│ │ │ ├── groovy
│ │ │ ├── javascript
│ │ │ ├── pdf
│ │ │ ├── docx
│ │ │ └── txt
│ │ │
│ │ ├── service
│ │ ├── model
│ │ ├── util
│ │ │
│ │ └── mcp
│ │ ├── tools
│ │ ├── resources
│ │ ├── prompts
│ │ └── elicitation
│ │
│ └── resources
│
├── docs
├── README.md
└── pom.xml
- Activiti BPMN XML
- Technical Explanation
- Non-Technical Explanation
- Business Flow
- Process Summary
- Actors
- Tasks
- Gateways
- Service Tasks
- Business Rules
- Recommendations
- Java Class
- Technical Explanation
- Non-Technical Explanation
- Class Summary
- Package Information
- Dependencies
- Methods
- Design Patterns
- Business Logic
- Recommendations
- Groovy Script
- Technical Explanation
- Non-Technical Explanation
- Flow Summary
- DSL Explanation
- Closures
- Variables
- Recommendations
- JavaScript File
- Technical Explanation
- Non-Technical Explanation
- Functions
- Modules
- Async Flow
- API Calls
- Recommendations
- DOCX
- TXT
- Executive Summary
- Technical Summary
- Non-Technical Summary
- Context
- Key Topics
- Important Sections
- Recommendations
resource://parser/bpmn
resource://parser/java
resource://parser/groovy
resource://parser/javascript
resource://parser/pdf
resource://parser/docx
resource://parser/text
resource://analysis/latest
resource://analysis/history
technical-explanation
non-technical-explanation
summary
context
business-process
developer-documentation
executive-summary
The MCP server automatically asks clarifying questions when additional context is required.
Example:
You uploaded a BPMN file.
Which explanation would you like?
1. Technical
2. Business
3. Both
Another example:
You uploaded Java source code.
Select explanation depth.
1. High Level
2. Detailed
3. Line by Line
Read BPMN
│
Validate XML
│
Parse BPMN
│
Extract Workflow
│
Generate Process Model
│
LLM
│
Technical Explanation
│
Business Explanation
Read Java File
│
JavaParser
│
Generate AST
│
Dependency Analysis
│
Method Analysis
│
LLM
│
Technical Explanation
│
Business Explanation
Read Script
│
Groovy AST
│
Extract DSL
│
LLM
│
Explanation
Read JavaScript
│
Esprima
│
AST
│
Module Analysis
│
LLM
│
Explanation
Read File
│
PDFBox / Apache POI
│
Extract Text
│
Chunk Content
│
Generate Summary
│
Generate Context
│
LLM
│
Technical Explanation
│
Business Explanation
Extracts:
- Start Events
- End Events
- User Tasks
- Service Tasks
- Script Tasks
- Gateways
- Events
- Sequence Flows
- Variables
- Forms
- Listeners
- Business Rules
Extracts:
- Package
- Imports
- Classes
- Interfaces
- Enums
- Fields
- Constructors
- Methods
- Annotations
- Generics
- Dependencies
- JavaDocs
Extracts:
- Methods
- Closures
- DSL
- Variables
- Classes
- Flow
Extracts:
- Functions
- Classes
- Arrow Functions
- Modules
- Promises
- Async/Await
- Imports
- Exports
Extracts:
- Paragraphs
- Headings
- Tables
- Images
- Metadata
Extracts:
- Paragraphs
- Tables
- Lists
- Headers
- Footers
POST /mcp
GET /mcp
DELETE /mcp
You are a senior software architect.
Explain the supplied artifact.
Include:
- Architecture
- Flow
- Business Logic
- Dependencies
- Design Patterns
- Recommendations
You are a business analyst.
Explain the artifact in simple language.
Avoid technical jargon.
Use business terminology and real-world examples.
Provide step-by-step explanations.
{
"technical": {
"summary": "...",
"architecture": "...",
"flow": "...",
"dependencies": [],
"businessLogic": "...",
"recommendations": []
},
"nonTechnical": {
"summary": "...",
"businessPurpose": "...",
"story": "...",
"stepByStep": [],
"recommendations": []
}
}- Spring Boot
- Spring AI
- Spring AI MCP Server
- MCP Java SDK
- JavaParser
- Groovy
- Apache PDFBox
- Apache POI
- Jackson
- SLF4J
- Spring Validation
- Spring Boot MCP Server
- Streamable HTTP
- MCP Tools
- MCP Resources
- MCP Prompts
- MCP Elicitation
- BPMN Support
- Java Support
- Groovy Support
- JavaScript Support
- PDF Support
- DOCX Support
- TXT Support
- Multi-LLM Support
- Prompt Templates
- AI Memory
- Vector Database
- RAG
- Semantic Search
- Caching
- GitHub Integration
- GitLab Integration
- Jira Integration
- Confluence Integration
- Repository Analysis
- Merge Request Analysis
- Pull Request Analysis
- Code Generation
- BPMN to Java
- BPMN to Spring Boot
- Documentation Generator
- Mermaid Diagram Generator
- PlantUML Generator
- Sequence Diagram Generator
- Test Case Generator
- Security Review
- Performance Review
- Kubernetes Deployment
The goal of this project is to build a reusable, enterprise-grade AI-powered MCP server capable of understanding source code, business processes, scripts, and documents. By leveraging modern parsing libraries, large language models, and the Model Context Protocol, the server provides rich explanations tailored to both technical and non-technical audiences. Its modular architecture enables seamless integration with developer tools, AI assistants, enterprise knowledge platforms, and future automation workflows, making it a scalable foundation for intelligent software engineering and business process analysis.
To be compatible with MCP-enabled clients, your server must implement the following capabilities:
- ✅ Implement the Model Context Protocol (MCP)
- ✅ Support one or both transport mechanisms:
- STDIO Transport
- Streamable HTTP Transport
- ✅ Register Tools
- ✅ Register Resources
- ✅ Register Prompts
- ✅ Return MCP-compliant JSON-RPC responses
- ✅ Handle:
- Initialization
- Capability negotiation
- Tool invocation
- Resource requests
- Prompt requests
- Error handling
- Session lifecycle
Configure your MCP server in the Claude Desktop MCP configuration file.
The exact configuration file location depends on:
- Operating System
- Claude Desktop version
{
"mcpServers": {
"java-mcp": {
"command": "java",
"args": [
"-jar",
"/path/to/mcp-server.jar"
]
}
}
}{
"mcpServers": {
"java-mcp": {
"url": "http://localhost:8080/mcp"
}
}
}Claude Code CLI can connect to the same MCP server.
Depending on the supported transport, configure it to use either:
- Local executable (STDIO)
- Streamable HTTP endpoint
Typical workflow:
Claude Code CLI
│
▼
MCP Server
│
▼
Registered Tools
VS Code MCP extensions generally support the following connection methods:
VS Code
│
▼
STDIO
│
▼
Java MCP Server
VS Code
│
▼
HTTP
│
▼
http://localhost:8080/mcp
Support depends on the installed extension.
Windsurf can integrate with MCP servers using either:
- Local MCP process (STDIO)
- Streamable HTTP endpoint
Configuration depends on the Windsurf version being used.
Open WebUI can communicate with external MCP servers.
Typical configuration includes:
- MCP Server URL
- Authentication (optional)
- Available Tools
- Available Resources
- Available Prompts
Example:
| Setting | Value |
|---|---|
| MCP Server URL | http://localhost:8080/mcp |
| Authentication | Optional |
| Transport | Streamable HTTP |
| Protocol | MCP |
Claude Desktop
│
Claude Code CLI
│
VS Code
│
Windsurf
│
Open WebUI
│
▼
┌───────────────────────────────┐
│ Java MCP Server │
│-------------------------------│
│ • MCP Protocol │
│ • Streamable HTTP │
│ • STDIO │
│ • Tool Registry │
│ • Resource Registry │
│ • Prompt Registry │
│ • Elicitation │
└───────────────────────────────┘
│
▼
Parser Services
├── BPMN Parser
├── Java Parser
├── Groovy Parser
├── JavaScript Parser
└── Document Parser
│
▼
AI Provider Layer
├── OpenAI
├── Claude
├── Gemini
├── Ollama
└── Azure OpenAI