spring:
application:
name: jakarta-migration-mcp
# Database and JPA - DISABLED (not needed for MCP server)
# The MCP server doesn't require a database
# CRITICAL: Excluding all database-related auto-configurations to prevent startup failures
# when no database is available. This is essential for MCP server operation.
autoconfigure:
exclude:
- org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration
- org.springframework.boot.autoconfigure.jdbc.JdbcTemplateAutoConfiguration
- org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration
- org.springframework.boot.autoconfigure.liquibase.LiquibaseAutoConfiguration
- org.springframework.boot.autoconfigure.transaction.TransactionAutoConfiguration
- org.springframework.boot.autoconfigure.data.jpa.JpaRepositoriesAutoConfiguration
- org.springframework.boot.autoconfigure.data.redis.RedisAutoConfiguration
- org.springframework.boot.autoconfigure.data.redis.RedisRepositoriesAutoConfiguration
# Actuator Configuration
management:
endpoints:
web:
exposure:
include: health,info,metrics
endpoint:
health:
show-details: always
# Application Configuration
# This is a template - replace with your own application configuration
app:
example:
task:
interval-ms: 300000 # 5 minutes
# Jakarta Migration Feature Flags Configuration
# This package is distributed only as an npm package; no payment or external licensing.
jakarta:
migration:
feature-flags:
enabled: true
# Default tier: PREMIUM so all features are available (no payment/licensing)
default-tier: PREMIUM
# Per-feature overrides (optional)
features: {}
# Spring AI MCP Server Configuration
ai:
mcp:
server:
name: jakarta-migration-mcp
version: 1.0.0-SNAPSHOT
# Server description for GetInstructions/ListOfferings actions
# This helps Cursor understand what the server does
description: "Jakarta Migration MCP Server - Tools for analyzing and migrating Java applications from Java EE 8 (javax.*) to Jakarta EE 9+ (jakarta.*). Provides dependency analysis, blocker detection, version recommendations, migration planning, and runtime verification."
# Transport mode: stdio (default, for local), sse (deprecated), or streamable-http (recommended for HTTP)
# Note: SSE is deprecated in MCP spec 2025-03-26 in favor of Streamable HTTP
transport: ${MCP_TRANSPORT:stdio}
enabled: true
# CRITICAL: Use SYNC type for synchronous methods that return String/POJOs
# If you use ASYNC, methods must return Mono/Flux (reactive types)
# This is the #1 reason @McpTool annotations fail to register
type: SYNC
# Enable annotation scanner to automatically register @McpTool annotated methods
annotation-scanner:
enabled: true
# NOTE: Capabilities configuration may not be supported in Spring AI MCP 1.1.2
# The timeout issue with GetInstructions/ListOfferings persists even with stability fixes
# This appears to be an ongoing bug in Spring AI MCP that requires a framework fix
# SSE configuration (only used when transport=sse)
sse:
port: ${MCP_SSE_PORT:8080}
path: ${MCP_SSE_PATH:/mcp/sse}
# Logging Configuration
# CRITICAL: root level must be WARN to keep STDOUT clean for MCP JSON stream
# System.out.println and log messages to STDOUT corrupt the MCP JSON stream
logging:
level:
root: WARN # Keep STDOUT clean for MCP JSON stream
adrianmikula.jakartamigration: DEBUG # Debug logging for our application
org.springframework.ai.mcp: DEBUG # Enable MCP debug logging
pattern:
console: "%d{yyyy-MM-dd HH:mm:ss} - %msg%n"