Java / Spring Boot Stack for Claude Code
Configuration
{
"mcpServers": {
"postgres-mcp": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-postgres",
"postgresql://localhost/mydb"
],
"env": {
"POSTGRES_CONNECTION_STRING": "YOUR_POSTGRES_CONNECTION_STRING"
}
},
"docker-mcp": {
"command": "npx",
"args": [
"-y",
"docker-mcp"
]
},
"github-mcp": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-github"
],
"env": {
"GITHUB_PERSONAL_ACCESS_TOKEN": "YOUR_GITHUB_PERSONAL_ACCESS_TOKEN"
}
},
"sentry-mcp": {
"command": "npx",
"args": [
"-y",
"sentry-mcp"
],
"env": {
"SENTRY_AUTH_TOKEN": "YOUR_SENTRY_AUTH_TOKEN"
}
},
"context7-mcp": {
"command": "npx",
"args": [
"-y",
"@upstash/context7-mcp"
]
}
}
}CLI Commands
Alternatively, add each server via the Claude Code CLI:
claude mcp add postgres-mcp -e POSTGRES_CONNECTION_STRING=YOUR_POSTGRES_CONNECTION_STRING -- npx -y @modelcontextprotocol/server-postgres postgresql://localhost/mydb
claude mcp add docker-mcp -- npx -y docker-mcp
claude mcp add github-mcp -e GITHUB_PERSONAL_ACCESS_TOKEN=YOUR_GITHUB_PERSONAL_ACCESS_TOKEN -- npx -y @modelcontextprotocol/server-github
claude mcp add sentry-mcp -e SENTRY_AUTH_TOKEN=YOUR_SENTRY_AUTH_TOKEN -- npx -y sentry-mcp
claude mcp add context7-mcp -- npx -y @upstash/context7-mcpWhere to save
Paste the config above into:
~/.claude.jsonEnvironment Variables
Replace the YOUR_ placeholders with your actual values.
POSTGRES_CONNECTION_STRINGrequiredPostgreSQL connection string (e.g. postgresql://user:pass@localhost:5432/mydb)
Used by: PostgreSQL MCP
GITHUB_PERSONAL_ACCESS_TOKENrequiredGitHub personal access token
Used by: GitHub MCP
SENTRY_AUTH_TOKENrequiredSentry auth token
Used by: Sentry MCP
What’s in this stack
Query and interact with PostgreSQL databases, inspect schemas, and run SQL directly from your AI editor.
Spring Boot's go-to database. Query schemas, inspect data, and debug JPA mappings without switching to a SQL client.
Manage Docker containers, images, volumes, and networks. Run, stop, inspect, and monitor containers from your AI editor.
Java apps need containerization for consistent builds. Manage your Docker Compose stack and multi-stage builds inline.
Access the GitHub API to manage repositories, issues, pull requests, branches, and workflows directly from your AI editor.
Enterprise Java projects live on rigorous code review. Manage PRs, branch protections, and CI checks from your editor.
Query Sentry for error tracking, performance monitoring, and issue management directly from your AI editor.
Java stack traces are notoriously verbose. Let your AI assistant parse Sentry errors and pinpoint the actual issue.
Pull up-to-date documentation and code examples for any library directly into your prompt context using the Context7 API.
Spring Boot's annotation-heavy API changes between versions. Current docs prevent your AI from generating deprecated patterns.