Codestyle
MCP Codestyle Server 是一个基于 Spring AI 实现的 Model Context Protocol (MCP) 服务器,为 IDE 和 AI 代理提供代码模板搜索和检索工具。该服务从本地缓存查找模板,并在缺失时自动从远程仓库下载元数据和文件进行修复。
What is Codestyle?
Codestyle is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to mcp codestyle server 是一个基于 spring ai 实现的 model context protocol (mcp) 服务器,为 ide 和 ai 代理提供代码模板搜索和检索工具。该服务从本地缓存查找模板,并在缺失时自动从远程仓库下载元数据和文件进行修复。
MCP Codestyle Server 是一个基于 Spring AI 实现的 Model Context Protocol (MCP) 服务器,为 IDE 和 AI 代理提供代码模板搜索和检索工具。该服务从本地缓存查找模板,并在缺失时自动从远程仓库下载元数据和文件进行修复。
This server falls under the Developer Tools category on MCPgee, the world's largest MCP server directory with 33,000+ servers.
Features
- MCP Codestyle Server 是一个基于 Spring AI 实现的 Model Context Proto
Use Cases
Maintainer
Works with
Installation
Manual Installation
npx mcp-codestyleConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
How to Set Up and Use Codestyle
MCP Codestyle Server (码蜂) is a Java-based Model Context Protocol server built on Spring AI that provides IDE and AI agents with code template search, retrieval, project analysis, and skeleton extraction tools. It uses Apache Lucene with Chinese tokenization for full-text search over a local template cache, and can fall back to a remote Open API for extended template libraries. Developers use it to let AI coding assistants like Claude, Cursor, and Cherry Studio instantly find and apply reusable code templates — from CRUD controllers to Spring Boot service layers — without leaving the chat interface.
Prerequisites
- Java 17 or higher
- Maven 3.9 or higher
- An MCP-compatible client: Cherry Studio, Cursor, Claude Desktop, or TRAE
- Git for cloning the repository
Clone the repository
Clone the mcp-codestyle-server repository to your local machine.
git clone https://github.com/itxaiohanglover/mcp-codestyle-server.git
cd mcp-codestyle-serverBuild the JAR with Maven
Package the application into a runnable JAR file. Skip tests for a faster initial build.
mvn clean package -DskipTestsLocate the built JAR
After building, the JAR file will be in the target directory. Note its full path for the MCP configuration.
ls target/codestyle-server-*.jarConfigure your MCP client
Add the server to your MCP client configuration pointing to the built JAR. The server runs in stdio mode with Spring Boot's web server disabled.
Verify the server starts
Restart your MCP client. The codestyle server should appear in the tool list with tools like codestyleSearch, getTemplateByPath, and analyzeProject.
Configure remote template source (optional)
To enable the remote Open API for extended template libraries, set the CODESTYLE_REMOTE_ENABLED environment variable and provide a base URL with access credentials.
CODESTYLE_REMOTE_ENABLED=true
CODESTYLE_CACHE_PATH=/path/to/local/cacheCodestyle Examples
Client configuration
Add this to your claude_desktop_config.json or MCP client settings to run the Codestyle MCP server. Replace the JAR path with your actual build output path.
{
"mcpServers": {
"codestyle": {
"command": "java",
"args": [
"-Dspring.ai.mcp.server.stdio=true",
"-Dspring.main.web-application-type=none",
"-Dlogging.pattern.console=",
"-Dfile.encoding=UTF-8",
"-jar",
"/path/to/mcp-codestyle-server/target/codestyle-server-1.0.jar"
]
}
}
}Prompts to try
Use these prompts in your AI assistant after connecting the Codestyle MCP server.
- "Search for CRUD templates using codestyleSearch"
- "Find a Spring Boot controller template for user management"
- "Get the template at path continew/CRUD/1.0.0/backend/src/main/java/com/air/controller/Controller.ftl"
- "Analyze the project structure at /path/to/my/project"
- "Extract the skeleton of the UserService class for code review"Troubleshooting Codestyle
Java process exits immediately when launched by the MCP client
Ensure the JAR path in your MCP config is the full absolute path to the built JAR file in the target directory. Verify Java 17+ is on PATH by running 'java -version' in your terminal. The -Dlogging.pattern.console= flag suppresses Spring Boot console logs that can interfere with stdio MCP communication.
codestyleSearch returns no results
On first run, the server downloads template metadata from the remote repository and builds the Lucene index in the local cache directory (default: ./mcp-cache). This may take a moment. If results are still empty, check that CODESTYLE_CACHE_PATH is writable and the cache directory was created.
Only code analysis tools appear, not template tools
Check if codestyle.tool-group is set to 'analyze' in your configuration (via -Dcodestyle.tool-group=analyze JVM arg). Remove this argument or set it to 'all' to expose all tools including template search and management.
Frequently Asked Questions about Codestyle
What is Codestyle?
Codestyle is a Model Context Protocol (MCP) server that mcp codestyle server 是一个基于 spring ai 实现的 model context protocol (mcp) 服务器,为 ide 和 ai 代理提供代码模板搜索和检索工具。该服务从本地缓存查找模板,并在缺失时自动从远程仓库下载元数据和文件进行修复。 It connects AI assistants to external tools and data sources through a standardized interface.
How do I install Codestyle?
Follow the installation instructions on the Codestyle GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.
Which AI clients work with Codestyle?
Codestyle works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.
Is Codestyle free to use?
Yes, Codestyle is open source and available under the MIT license. You can use it freely in both personal and commercial projects.
Codestyle Alternatives — Similar Developer Tools Servers
Looking for alternatives to Codestyle? Here are other popular developer tools servers you can use with Claude, Cursor, and VS Code.
Ecc
★ 188.2kThe agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.
Javaguide
★ 155.8kJava 面试 & 后端通用面试指南,覆盖计算机基础、数据库、分布式、高并发、系统设计与 AI 应用开发
Gemini CLI
★ 104.5kA secure MCP server that wraps the Google Gemini CLI, allowing clients to query Gemini models using local OAuth sessions without requiring an API key. It provides tools for model interaction and diagnostics with built-in protection against command in
Awesome MCP Servers
★ 87.3k⭐ Curated list of Model Context Protocol (MCP) servers - tools that extend Claude Desktop, Cursor, Windsurf, and other MCP clients with custom capabilities.
MCP Servers
★ 86.0kModel Context Protocol Servers
CC Switch
★ 77.5kA cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Gemini CLI & Hermes Agent. Only official website: ccswitch.io
Browse More Developer Tools MCP Servers
Explore all developer tools servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.
Set Up Codestyle in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
Ready to use Codestyle?
Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.