mcp -factory
MCP server from jayessdeesea/mcp-server-factory
claude mcp add --transport stdio jayessdeesea-mcp-server-factory java -jar target/mcp-server-factory-1.0-SNAPSHOT-jar-with-dependencies.jar \ --env JAVA_SDK_JAR_PATH="Path to MCP Java SDK JAR (e.g., C:/Users/youruser/vscode/java-sdk-0.8.1/java-sdk-0.8.1.jar)"
How to use
The MCP Server Factory is a Java-based, non-Spring-Boot MCP server designed to help you understand and build other MCP servers. It exposes a structured model of MCP components—Tools, Resources, and Prompts—along with templates and best practices for implementing MCP servers in Java. When you run the server, you can explore documentation endpoints and use the included tools to reason about MCP concepts, plan tasks, and generate guidance for implementing features or deployments. The project emphasizes clean architecture, SOLID principles, and modular design, making it a practical learning and reference implementation for MCP servers.
To use the server, start the Java process as described in the installation notes. Once running, you can interact with the server through the provided codebase and documentation under docs/api/, which includes prompts.md, resources.md, and tools.md. The Tools section includes explain_concept and several task planner tools for code cleanup, feature implementation, general objectives, and local deployment planning. The Resources section provides documentation endpoints such as mcp://factory/documentation/{topic}, and the Prompts section includes a tool_implementation_guide that outlines how to implement MCP tools across languages. Use these components to explore MCP concepts, draft task plans, and understand best practices for building scalable MCP servers in Java.
How to install
Prerequisites:
- Java 21 or higher
- Maven 3.6 or higher
- MCP Java SDK 0.8.1 (example path: C:/Users/youruser/vscode/java-sdk-0.8.1/java-sdk-0.8.1.jar)
-
Clone the repository git clone https://github.com/yourusername/mcp-server-factory.git cd mcp-server-factory
-
Build the project mvn clean package
-
Run the server java -jar target/mcp-server-factory-1.0-SNAPSHOT-jar-with-dependencies.jar
-
Verify the server is running
- Check the console logs for startup messages indicating the server is listening on the configured port.
- Optionally run tests: mvn test
Notes:
- The project is built with Maven and uses a Java SDK jar located as described in the prereqs. Ensure the JAVA_SDK_JAR_PATH environment variable points to the correct jdk/jar before running.
- If you modify code, rebuild with mvn clean package to refresh the artifact used by the run command.
Additional notes
Tips and common considerations:
- Environment variables: The Java SDK JAR path should be set (e.g., JAVA_SDK_JAR_PATH) to ensure the MCP SDK is available to the server at runtime.
- Documentation-first approach: The project ships with docs/api/prompts.md, docs/api/resources.md, and docs/api/tools.md. Use these as references when implementing new tools, resources, or prompts.
- Design principles: Follow KISS, DRY, YAGNI, and SOLID. Keep tool implementations modular and avoid tight coupling to Spring in core logic.
- Testing: Ensure tests have timeouts and avoid recursive patterns in the core logic. Run mvn test to validate changes.
- Extensibility: The architecture supports adding new Tools, Resources, and Prompts under the addressed package structure (src/main/java/user/jakecarr/...).