- MCP Server Factory
MCP Server Factory
Content
MCP Server Factory
A Java-based Model Context Protocol (MCP) server designed to help understand and build other MCP servers.
Project Overview
This project serves as both a learning tool and a guide for building MCP servers. It focuses on providing:
-
Understanding of MCP Components:
- Tools (executable functions that perform actions)
- Resources (data sources that provide information)
- Prompts (structured templates that generate responses)
-
Templates and Best Practices for building MCP servers
Features
-
Tools Section:
explain_concept- Provides detailed explanations of MCP concepts (tool, resource, prompt, server, client)- Task Planner Tools:
code_cleanup_planner- Generates a task plan for code cleanup objectivesfeature_implementation_planner- Generates a task plan for feature implementation objectivesgeneral_task_planner- Generates a task plan for general objectiveslocal_mcp_deployment_planner- Generates a task plan for deploying local MCP servers with critical clean and test steps that abort deployment on failure
-
Resources Section:
mcp://factory/documentation/{topic}- Documentation on MCP topics (getting-started, best-practices, troubleshooting)
-
Prompts Section:
tool_implementation_guide- Step-by-step guide for implementing MCP tools in different languages
Architecture
The MCP Server Factory is built using:
- Java with Spring Framework (not Spring Boot)
- log4j2 for logging implementation
- Maven for build management
Following the design principles:
- KISS (Keep It Simple, Stupid)
- DRY (Don't Repeat Yourself)
- YAGNI (You Aren't Gonna Need It)
- SOLID (Single responsibility, Open-closed, Liskov substitution, Interface segregation, Dependency inversion)
Project Structure
-
src/main/java/user/jakecarr/- Main source code.../config/- Spring configuration.../main/- Classes with main methods.../model/- Domain models and interfaces.../model/impl/- Implementations of MCP components.../service/- Business logic and services
-
docs/api/- API documentationprompts.md- Documentation for supported promptsresources.md- Documentation for supported resourcestools.md- Documentation for supported tools
Code Quality
The codebase follows high-quality standards:
- Well-structured code with clear separation of concerns
- Comprehensive documentation with Javadoc comments for all classes and methods
- Modular design with abstract base classes and interfaces
- Consistent error handling with proper logging
- Maintainable architecture with extracted methods and helper functions
- Clean code practices including:
- Descriptive naming conventions
- Single responsibility principle
- DRY (Don't Repeat Yourself) principle
- Proper encapsulation
Building and Running
Prerequisites
- Java 21 or higher
- Maven 3.6 or higher
- MCP Java SDK 0.8.1 (located at
C:/Users/jayes/vscode/java-sdk-0.8.1/java-sdk-0.8.1.jar)
Building the Project
# Clone the repository
git clone https://github.com/yourusername/mcp-server-factory.git
cd mcp-server-factory
# Build the project
mvn clean package
Running the Server
# Run the server
java -jar target/mcp-server-factory-1.0-SNAPSHOT-jar-with-dependencies.jar
Running the Tests
# Run the tests
mvn test
Development Guidelines
- Core business logic must not depend on Spring
- Spring annotations only in the config package
- No mocks in src/main/java
- No recursion
- Tests should include timeouts
Contributing
- Fork the repository
- Create a feature branch
- Make your changes
- Run the tests
- Submit a pull request
License
This project is licensed under the MIT License - see the LICENSE file for details.
Recommend Servers
TraeBuild with Free GPT-4.1 & Claude 3.7. Fully MCP-Ready.
EdgeOne Pages MCPAn MCP service designed for deploying HTML content to EdgeOne Pages and obtaining an accessible public URL.
MiniMax MCPOfficial MiniMax Model Context Protocol (MCP) server that enables interaction with powerful Text to Speech, image generation and video generation APIs.
DeepChatYour AI Partner on Desktop
Zhipu Web SearchZhipu Web Search MCP Server is a search engine specifically designed for large models. It integrates four search engines, allowing users to flexibly compare and switch between them. Building upon the web crawling and ranking capabilities of traditional search engines, it enhances intent recognition capabilities, returning results more suitable for large model processing (such as webpage titles, URLs, summaries, site names, site icons, etc.). This helps AI applications achieve "dynamic knowledge acquisition" and "precise scenario adaptation" capabilities.
Context7Context7 MCP Server -- Up-to-date code documentation for LLMs and AI code editors
TimeA Model Context Protocol server that provides time and timezone conversion capabilities. This server enables LLMs to get current time information and perform timezone conversions using IANA timezone names, with automatic system timezone detection.
WindsurfThe new purpose-built IDE to harness magic
Jina AI MCP ToolsA Model Context Protocol (MCP) server that integrates with Jina AI Search Foundation APIs.
MCP AdvisorMCP Advisor & Installation - Use the right MCP server for your needs
Baidu Map百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Visual Studio Code - Open Source ("Code - OSS")Visual Studio Code
Serper MCP ServerA Serper MCP Server
Amap Maps高德地图官方 MCP Server
ChatWiseThe second fastest AI chatbot™
Playwright McpPlaywright MCP server
AiimagemultistyleA Model Context Protocol (MCP) server for image generation and manipulation using fal.ai's Stable Diffusion model.
Howtocook Mcp基于Anduin2017 / HowToCook (程序员在家做饭指南)的mcp server,帮你推荐菜谱、规划膳食,解决“今天吃什么“的世纪难题;
Based on Anduin2017/HowToCook (Programmer's Guide to Cooking at Home), MCP Server helps you recommend recipes, plan meals, and solve the century old problem of "what to eat today"
CursorThe AI Code Editor
BlenderBlenderMCP connects Blender to Claude AI through the Model Context Protocol (MCP), allowing Claude to directly interact with and control Blender. This integration enables prompt assisted 3D modeling, scene creation, and manipulation.
Tavily Mcp