Claude Code Prompt Engineer
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Claude Code Prompt Engineeroptimize my Python script for better performance"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Claude Code Prompt Engineer MCP Server
An advanced Model Context Protocol (MCP) server that intelligently engineers and optimizes prompts for Claude Code, with interactive refinement capabilities and automatic optimization.
Features
π Intelligent Prompt Engineering
Automatically detects programming language and task type
Optimizes prompts specifically for Claude Code's capabilities
Leverages knowledge of Claude Code's tools and workflows
π€ Interactive Refinement
Q&A-based prompt clarification system
Context-aware question generation
Session-based refinement process
β‘ Automatic Optimization
Language-specific prompt enhancement
Task complexity detection
Claude Code capability awareness
No external API dependencies - works entirely with built-in capabilities
Related MCP server: Promptheus
Installation & Setup
1. Install Dependencies
npm install2. Configure Claude Code
Create or update your .mcp.json configuration file:
{
"mcpServers": {
"prompt-engineer": {
"command": "node",
"args": ["/absolute/path/to/cc_peng_mcp/index.ts"],
"env": {}
}
}
}3. Restart Claude Code
# Exit current session and start new one
claude4. Verify Installation
/mcpYou should see prompt-engineer listed as connected.
Usage with Claude Code
π― Auto-Optimization (Primary Usage)
Simply use the tools directly - no setup required:
Use the auto_optimize tool to analyze: "fix my React app performance issues"Interactive Mode for Complex Requests
Use the engineer_prompt tool with interactive=true for: "create a new authentication system"Direct Prompt Engineering
Use the engineer_prompt tool with prompt="optimize my database queries" and language="python"Available Tools
auto_optimize β Primary Tool
Automatically detects and optimizes natural language text:
text(required): Your natural language text/requestcontext(optional): Additional project contextinteractive(optional): Force interactive questioning
engineer_prompt
Manual prompt engineering with specific parameters:
prompt(required): The raw user prompt that needs engineeringlanguage(optional): Programming language (auto-detected if not provided)context(optional): Additional project contextinteractive(optional): Enable Q&A refinement process
answer_questions
Used to provide answers during interactive sessions:
sessionId(required): Session ID from interactive modeanswers(required): Array of answers to the questions
How It Works
1. Natural Language Detection
The system automatically identifies when your text is natural language that needs optimization by detecting:
Request patterns: "help me", "can you", "i need", "i want"
Problem descriptions: "issue", "bug", "not working", "broken"
Task indicators: "create", "build", "fix", "optimize"
Questions: "how do", "what is", "why is"
Conversational markers: "i'm", "i think", "not sure"
2. Built-in Intelligence
No API calls required - uses pattern matching and rule-based optimization
Language detection via regex patterns for 10+ programming languages
Task type detection (debug, test, refactor, explain, architecture)
Complexity analysis based on text length and technical indicators
3. Claude Code Optimization
Prompts are optimized knowing Claude Code's capabilities:
File system operations (Read, Write, Edit)
Code search (Grep, Glob patterns)
Git operations and workflow management
Todo list management for complex tasks
Browser automation via Playwright MCP
GitHub integration
4. Interactive Refinement
When needed, the system:
Generates clarifying questions based on your prompt
Creates a session to track the conversation
Refines the prompt based on your answers
Delivers a highly optimized final prompt
Example Workflows
π― Auto-Optimization Example
Input:
"my website is slow and users are complaining"Auto-Optimized Output:
**Task:** Debug and fix the following issue:
my website is slow and users are complaining
**Requirements:**
- Use file search tools (Grep/Glob) to locate relevant code
- Read and analyze the problematic files
- Identify the root cause and implement a fix
- Test the solution if possible
**Ready to proceed with this task?**π€ Interactive Mode Example
Input: "make my app better"
Questions Generated:
What specific aspect needs improvement (performance, readability, maintainability)?
What technology stack or programming language are you using?
Are there any constraints or requirements I should know about?
After Answers: Creates detailed, structured prompt with your specific requirements.
Benefits
β
No Setup Required: Works immediately after MCP configuration
β
No API Keys: Uses only built-in Claude Code capabilities
β
Context Aware: Understands your project and requirements
β
Interactive: Asks clarifying questions when needed
β
Systematic: Structures complex requests properly
β
Fast: No external API calls for instant optimization
Requirements
Node.js 16+
TypeScript support (tsx recommended)
Claude Code CLI
No external API keys required
Technical Details
Supported Languages
JavaScript/Node.js, TypeScript, Python, Java, C++, Rust, Go, PHP, Ruby, C#/.NET
Task Types
Debug: Bug fixing and error resolution
Test: Unit testing and test creation
Refactor: Code improvement and restructuring
Explain: Code explanation and documentation
Architecture: System design and patterns
Code: General coding tasks (default)
Architecture
Pure pattern matching - no machine learning models
Rule-based optimization - deterministic and fast
Session management - for interactive conversations
Built-in language detection - regex-based patterns
License
MIT License - feel free to modify and distribute.
Installation Guide
See INSTALL.md for detailed installation instructions, troubleshooting, and advanced configuration options.
Available Tools
4 toolsanswer_questionsC
Provide answers to clarifying questions and continue the prompt engineering process.
| Name | Required | Description | Default |
|---|---|---|---|
| sessionId | Yes | The session ID for this prompt engineering session | |
| answers | Yes | Answers to the previously asked questions |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions providing answers and continuing a process, but lacks details on permissions, side effects, response format, or session management. This is inadequate for a tool with two required parameters and no output schema, leaving key behavioral traits unspecified.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, efficient sentence that states the tool's function without unnecessary words. It is appropriately sized and front-loaded, though it could be more structured by explicitly separating purpose from guidelines.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's complexity with two required parameters, no annotations, and no output schema, the description is incomplete. It fails to explain return values, error handling, or how it integrates with sibling tools, leaving significant gaps for an AI agent to understand its full context and usage.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the schema already documents both parameters (sessionId and answers). The description adds no additional meaning beyond implying that answers are for clarifying questions in a prompt engineering context, which is minimal value. Baseline 3 is appropriate as the schema does the heavy lifting.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states the tool 'provide answers to clarifying questions and continue the prompt engineering process,' which gives a vague purpose but doesn't specify what resource or action it performs beyond general continuation. It doesn't clearly distinguish from sibling tools like 'ask_clarification' or 'engineer_prompt,' leaving ambiguity about its specific role in the workflow.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No explicit guidance on when to use this tool versus alternatives is provided. The description implies usage in a prompt engineering session with clarifying questions, but it doesn't specify prerequisites, exclusions, or how it differs from siblings like 'ask_clarification' or 'auto_optimize,' offering minimal direction for selection.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
ask_clarificationC
Ask clarifying questions to better understand user requirements and refine the prompt engineering process.
| Name | Required | Description | Default |
|---|---|---|---|
| sessionId | Yes | The session ID for this prompt engineering session | |
| questions | Yes | List of clarifying questions to ask the user |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool asks questions to understand requirements, but doesn't reveal key traits: e.g., whether this is an interactive process with the user, how responses are handled, if there are rate limits, or what the expected outcome is. For a tool with no annotation coverage, this leaves significant gaps in understanding its behavior.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, efficient sentence that states the purpose clearly without unnecessary words. It's appropriately sized for a simple tool, but could be slightly improved by front-loading more specific context or usage hints to enhance clarity immediately.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's complexity (involving user interaction and prompt refinement), lack of annotations, and no output schema, the description is incomplete. It doesn't cover behavioral aspects, usage context, or expected outcomes, making it inadequate for an AI agent to fully understand how to invoke and interpret this tool effectively.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the schema already documents both parameters ('sessionId' and 'questions') with descriptions. The description adds no additional meaning beyond what the schema providesβit doesn't explain the format of questions, how they relate to the session, or any constraints. Baseline 3 is appropriate when the schema does the heavy lifting.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: 'Ask clarifying questions to better understand user requirements and refine the prompt engineering process.' It specifies the verb ('ask') and the resource ('clarifying questions'), and it connects to the broader context of prompt engineering. However, it doesn't explicitly differentiate from sibling tools like 'answer_questions' or 'engineer_prompt', which might also involve user interaction or prompt refinement, so it doesn't reach the highest score.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives. It mentions 'refine the prompt engineering process,' but doesn't specify scenarios, prerequisites, or exclusions. For example, it doesn't indicate if this should be used before 'engineer_prompt' or as an alternative to 'auto_optimize,' leaving the agent without clear usage instructions.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
auto_optimizeB
Automatically detects and optimizes natural language text for Claude Code. Use this when the user is writing conversational text that should be translated into an optimized prompt.
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | The natural language text to analyze and potentially optimize | |
| context | No | Any additional context about the current project or situation | |
| interactive | No | Whether to enable interactive questioning if the prompt is unclear or needs more info (default: auto-detect based on complexity) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. While it mentions the tool 'automatically detects and optimizes,' it doesn't describe what optimization entails, whether it modifies the input text, what the output format is, or any limitations like rate limits or authentication requirements. This leaves significant behavioral aspects unclear.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is extremely concise and well-structured with just two sentences. The first sentence states the purpose, and the second provides usage guidance. Every word earns its place with no wasted text or redundancy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the complexity of an optimization tool with no annotations and no output schema, the description is insufficiently complete. It doesn't explain what 'optimized for Claude Code' means, what the output looks like, or any behavioral characteristics. For a tool that presumably transforms text, more context about the transformation process and results is needed.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has 100% description coverage, so the schema already documents all three parameters thoroughly. The description doesn't add any additional meaning or context about the parameters beyond what's in the schema, which is acceptable but not exceptional given the high schema coverage.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: 'Automatically detects and optimizes natural language text for Claude Code.' It specifies both the action (detects and optimizes) and the resource (natural language text), though it doesn't explicitly differentiate from sibling tools like 'engineer_prompt' which might have overlapping functionality.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides clear usage context: 'Use this when the user is writing conversational text that should be translated into an optimized prompt.' This gives specific guidance on when to use the tool, though it doesn't explicitly mention when NOT to use it or name alternatives among the sibling tools.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
engineer_promptB
Intelligently engineers and optimizes prompts for Claude Code, with interactive refinement and automatic optimization for maximum effectiveness.
| Name | Required | Description | Default |
|---|---|---|---|
| prompt | Yes | The raw user prompt that needs engineering | |
| language | No | The programming language (optional, will be detected if not provided) | |
| context | No | Additional context about the codebase or project (optional) | |
| interactive | No | Whether to enable interactive Q&A refinement (default: false) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden. It mentions 'interactive refinement' and 'automatic optimization,' which gives some behavioral context, but lacks details on how the optimization works, what 'maximum effectiveness' entails, potential rate limits, authentication needs, or output format. For a tool with no annotations, this leaves significant gaps in understanding its behavior.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, efficient sentence that front-loads the core purpose. It avoids redundancy and wastes no words, making it easy to parse. However, it could be slightly more structured by separating key features for clarity.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given no annotations, no output schema, and 4 parameters with full schema coverage, the description is minimally adequate. It covers the tool's purpose and hints at behavior but lacks details on output, optimization specifics, and error handling. For a tool with interactive and optimization features, more context would be beneficial to ensure complete understanding.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the schema already documents all parameters thoroughly. The description adds no additional meaning beyond what's in the schema (e.g., it doesn't explain how 'interactive' refinement works in practice). With high schema coverage, the baseline is 3, as the description doesn't compensate with extra insights.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: 'Intelligently engineers and optimizes prompts for Claude Code' with specific verbs ('engineers', 'optimizes') and resource ('prompts'). It distinguishes from sibling tools like 'answer_questions' and 'ask_clarification' by focusing on prompt engineering rather than direct Q&A. However, it doesn't explicitly differentiate from 'auto_optimize', which might have overlapping functionality.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage through phrases like 'interactive refinement' and 'automatic optimization for maximum effectiveness,' suggesting when interactive mode might be beneficial. However, it doesn't explicitly state when to use this tool versus alternatives like 'auto_optimize' or provide clear exclusions. The guidance is present but not comprehensive.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
4 tool updates
- First observed
answer_questions - First observed
ask_clarification - First observed
auto_optimize - First observed
engineer_prompt
TDQS
There is some overlap between tools, particularly 'auto_optimize' and 'engineer_prompt' both involving prompt optimization, which could cause confusion. However, 'answer_questions' and 'ask_clarification' are clearly distinct, and descriptions help differentiate the optimization tools by specifying different use cases (natural language text vs. general prompt engineering).
The tools follow a consistent verb_noun pattern throughout (e.g., answer_questions, ask_clarification, auto_optimize, engineer_prompt), with all using snake_case. There is a minor deviation in that 'auto_optimize' and 'engineer_prompt' are more descriptive phrases rather than simple verb_noun combos, but the overall naming is predictable and readable.
With 4 tools, this is a well-scoped set for a Claude Code prompt engineering server. Each tool appears to serve a distinct purpose in the workflow (clarifying, optimizing, engineering), and the count is neither too thin nor too heavy, fitting the domain appropriately.
The tool surface covers key aspects of prompt engineering: gathering requirements (ask_clarification), providing feedback (answer_questions), and optimization (auto_optimize and engineer_prompt). A minor gap might be the lack of a tool for testing or evaluating prompts, but the core workflow is well-covered, and agents can likely work around this.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Source-checked CLI guides and model-aware planning for Claude Code, Codex, and Grok Build.
Turn PRDs and product ideas into structured specs so coding agents build your intent, not theirs.
Turns rough requests into sharp Role/Task/Context/Format prompts. Thai and English.
Live SEO workflow tools for Claude Code, Codex, and AI agents.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnhances and cleans raw prompts using AI to make them more clear, actionable, and effective. Provides quality assessment, suggestions, and supports both general and code-specific optimization modes.1MIT
- AlicenseNot gradedqualityCmaintenanceRefines and optimizes prompts for LLMs through adaptive questioning and intelligent clarification workflows. Supports multiple AI providers (Google, OpenAI, Anthropic, Groq, Qwen) with interactive prompt enhancement and targeted modifications.17MIT
- AlicenseBqualityDmaintenanceRewrites coding prompts for optimal results with AI IDEs like Cursor by using Claude to add structure, context, and language-specific considerations to user prompts.113MIT
- FlicenseNot gradedqualityDmaintenanceProvides AI-powered selection and generation of specialized system prompts from a database of over 66 templates for Claude Code. It uses semantic search to find the best matching template and can adapt it to fit specific user tasks and contexts.-
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/gr3enarr0w/cc_peng_mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server