
nmn mcp coding prompt
提供适用于 IntelliJ IDEA 的 Java 开发提示模板的 MCP 服务器。
Repository Info
About This Server
提供适用于 IntelliJ IDEA 的 Java 开发提示模板的 MCP 服务器。
Model Context Protocol (MCP) - This server can be integrated with AI applications to provide additional context and capabilities, enabling enhanced AI interactions and functionality.
Documentation
Prompt Templates MCP Server
An MCP (Model Context Protocol) server that provides prompt templates for Java development in IntelliJ IDEA.
This server exposes the templates used in the Zest IntelliJ plugin as standardized prompts that can be used by any MCP-compatible client.
Features
The server provides the following prompt templates as MCP prompts:
- JUnit Test Generation - Create comprehensive JUnit 4 or 5 test suites for Java classes
- TODO Implementation - Generate implementations for TODO comments in Java code
- Agent Prompt Builder - Build structured prompts for AI agents with system instructions, tools, and context
Installation
# Clone the repository
git clone https://github.com/your-username/prompt-templates-mcp.git
cd prompt-templates-mcp
# Install dependencies
npm install
# Build the project
npm run build
Usage with Claude for Desktop
You can configure Claude for Desktop to use this server.
-
Create or edit your Claude Desktop configuration file:
- macOS/Linux:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%AppData%\Claude\claude_desktop_config.json
- macOS/Linux:
-
Add the server configuration:
{
"mcpServers": {
"prompt-templates": {
"command": "node",
"args": [
"/ABSOLUTE/PATH/TO/prompt-templates-mcp/build/index.js"
]
}
}
}
- Restart Claude for Desktop
Available Prompts
1. Generate JUnit Test
Generate comprehensive JUnit test suites for Java classes.
Parameters:
packageName: Package name for the test classclassName: Name of the class to be testedimports: Imports from the original classjunitVersion: JUnit version to use ("JUnit 4" or "JUnit 5")classContext: Context information about the classhasMockito: Whether Mockito is available (optional, default: false)
Example:
/prompt generate_junit_test packageName="com.example.app" className="UserService" imports="import java.util.List;\nimport java.util.ArrayList;" junitVersion="JUnit 5" classContext="public class UserService { ... }" hasMockito=true
2. Implement TODOs
Generate implementations for TODO comments in Java code.
Parameters:
selectedText: Code containing TODOs to implementcodeContext: Additional context about the coderelatedClassContext: Map of related class names to their implementations (optional)
Example:
/prompt implement_todos selectedText="public class UserValidator {\n public boolean isValidEmail(String email) {\n // TODO: Implement email validation\n return false;\n }\n}" codeContext="This class is used to validate user information in the system."
3. Build Agent Prompt
Build a complete prompt for the agent with system instructions, tools, context, and user request.
Parameters:
userRequest: The user's requesttools: List of available tools with examplesconversationHistory: Previous conversation messagescodeContext: Code context informationragKnowledge: Optional knowledge from RAG system (optional)
Example:
/prompt build_agent_prompt userRequest="Help me fix the null pointer exception in my UserService class" tools=[{"name":"read_file","description":"Read file content","category":"File Operations","exampleParams":{"path":"src/main/java/com/example/UserService.java"}}] conversationHistory=["User: Can you help me with my Java code?", "Assistant: Of course! What do you need help with?"] codeContext={"currentFile":"UserService.java","currentProject":"UserManagement"}
Development
# Install dependencies
npm install
# Build the project
npm run build
# Run the server
npm start
# Run the example client
npm run example
Testing
The repository includes a test script to verify the server is working properly:
# On Windows
test-server.bat
# On Linux/macOS
chmod +x test-server.sh
./test-server.sh
License
MIT
Quick Start
Clone the repository
git clone https://github.com/nmnhut-it/nmn-mcp-coding-promptInstall dependencies
cd nmn-mcp-coding-prompt
npm installFollow the documentation
Check the repository's README.md file for specific installation and usage instructions.
Repository Details
Recommended MCP Servers
Discord MCP
Enable AI assistants to seamlessly interact with Discord servers, channels, and messages.
Knit MCP
Connect AI agents to 200+ SaaS applications and automate workflows.
Apify MCP Server
Deploy and interact with Apify actors for web scraping and data extraction.
BrowserStack MCP
BrowserStack MCP Server for automated testing across multiple browsers.
Zapier MCP
A Zapier server that provides automation capabilities for various apps.