Agent skill · Backend & API

java-mcp-server-generator

Generate a complete Model Context Protocol server project in Java using the official MCP Java SDK with reactive streams and optional Spring Boot integration.

GitHub68,948★ · +463/wk · 2 repos on radarProfile →
copilotMIT
Install
npx skills add github/awesome-copilot --skill java-mcp-server-generator --agent copilot

Same command for any agent — swap --agent for claude-code, codex, cursor.

Facts
Files in the skill folder: 1
SKILL.md size: 22 KB
Bundled scripts: none
Path: skills/java-mcp-server-generator/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 37,432 · +281 this week
Language: Python

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

Review
written from the skill's own SKILL.md · Aug 5, 2026

What it does

Generates a full MCP server project structure for Java, including main application, configuration, tool and resource handlers, prompts, tests, and build files. It creates a McpServerApplication with server setup, registers ToolHandlers, ResourceHandlers, and PromptHandlers, and provides templates for ToolDefinitions, ToolHandlers, ResourceDefinitions, ResourceHandlers, and McpServer components. It supports both Maven and Gradle builds and includes example tool and resource definitions, along with sample server transport via StdioServerTransport.

How it works

  • Produces a project skeleton named my-mcp-server/ with either pom.xml or build.gradle.kts, source directories, and a test directory.
  • Provides Maven pom.xml template including MCP SDK dependency, logging, and testing configuration, plus a Maven Shade Plugin setup to define the main class.
  • Provides Gradle build script with MCP SDK, logging, testing dependencies, and an application mainClass.
  • Generates McpServerApplication.java that builds the server via McpServerBuilder, enables tools/resources/prompts, registers handlers, and starts a StdioServerTransport.
  • Includes ToolDefinitions and ToolHandlers to expose tools like greet and calculate with basic validation and responses.
  • Includes ResourceDefinitions and ResourceHandlers for listing, reading, subscribing/unsubscribing resources with simple in-memory state.
  • Includes PromptDefinitions (truncated in excerpt) to define prompts to be wired into the server.
  • Uses the provided templates to wire components together and run the MCP server in a self-contained project.
From the SKILL.md

# Java MCP Server Generator Generate a complete, production-ready MCP server in Java using the official Java SDK with Maven or Gradle. ## Project Generation When asked to create a Java MCP server, generate a complete project with this structure: ``` my-mcp-server/ ├── pom.xml (or build.gradle.kts) ├── src/ │ ├── main/ │ │ ├── java/ │ │ │ └── com/example/mcp/ │ │ │ ├── McpServerApplication.java │ │ │ ├── config/ │ │ │ │ └── ServerConfiguration.java │ │ │ ├── tools/ │ │ │ │ ├── ToolDefinitions.java │ │ │ │ └── ToolHandlers.java │ │ │ ├── resources/ │ │ │ │ ├── ResourceDefinitions.java │ │ │ │ └── ResourceHandlers.java │ │ │ └── prompts/ │ │ │ ├── PromptDefinitions.java │ │ │ └── PromptHandlers.java │ │ └── resources/ │ │ └── application.properties (if using Spring) │ └── test/ │ └── java/ │ └── com/example/mcp/ │ └── McpServerTest.java └── README.md ``` ## Maven pom.xml Template ```xml <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>com.example</gr

What's inside
Steps it walks through
  1. Project Generation
  2. Maven pom.xml Template
  3. Gradle build.gradle.kts Template
  4. McpServerApplication.java Template
  5. ToolDefinitions.java Template
  6. ToolHandlers.java Template
  7. ResourceDefinitions.java Template
  8. ResourceHandlers.java Template
  9. PromptDefinitions.java Template
  10. PromptHandlers.java Template
  11. McpServerTest.java Template
  12. README.md Template
  13. Generation Instructions
More from awesome-copilot
All skills →
About this skill
What does the java-mcp-server-generator skill do?

Generate a complete Model Context Protocol server project in Java using the official MCP Java SDK with reactive streams and optional Spring Boot integration.

How do I install it?

Run `npx skills add github/awesome-copilot --skill java-mcp-server-generator --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From github/awesome-copilot, a repository with 37,432 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going