Codestyle

v1.0.0Developer Toolsstable

MCP Codestyle Server 是一个基于 Spring AI 实现的 Model Context Protocol (MCP) 服务器,为 IDE 和 AI 代理提供代码模板搜索和检索工具。该服务从本地缓存查找模板,并在缺失时自动从远程仓库下载元数据和文件进行修复。

mcp-codestylemcpai-integration
Share:
52
Stars
0
Downloads
0
Weekly
0/5

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

Search and retrieve code templates from local cache and remote repositories. Get IDE and AI agent access to reusable code patterns.
itxaiohanglover

Maintainer

LicenseMIT
Languagejava
Versionv1.0.0
UpdatedApr 25, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx mcp-codestyle

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

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
1

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-server
2

Build the JAR with Maven

Package the application into a runnable JAR file. Skip tests for a faster initial build.

mvn clean package -DskipTests
3

Locate 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-*.jar
4

Configure 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.

5

Verify the server starts

Restart your MCP client. The codestyle server should appear in the tool list with tools like codestyleSearch, getTemplateByPath, and analyzeProject.

6

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/cache

Codestyle 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.

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.

Quick Config Preview

{ "mcpServers": { "mcp-codestyle": { "command": "npx", "args": ["-y", "mcp-codestyle"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

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.

33,000+ ServersFree & Open SourceStep-by-Step Guides