simon-mcp-server
v1.1.1
Published
A Model Context Protocol server that provides claude-like command execution capabilities
Maintainers
Readme
Simon MCP Server
A Model Context Protocol (MCP) server that provides claude-like command execution capabilities for development tasks.
Features
- Natural Language Commands: Execute development tasks using natural language descriptions
- Project-Aware: Configurable project path restrictions for security
- Multiple Actions: Support for refactoring, development, analysis, debugging, and more
- Security: Built-in sandboxing and file access controls
- Easy Integration: Simple npm package installation and MCP configuration
Installation
Option 1: Install from npm (Recommended)
# Install globally
npm install -g simon-ai
# Or use with npx (no installation required)
npx simon-aiOption 2: Build from source
- Clone this repository:
git clone <repository-url>
cd simon-mcp- Install dependencies:
npm install- Build the project:
npm run buildMCP Configuration
Add to your MCP client configuration:
{
"mcpServers": {
"simon": {
"command": "npx",
"args": ["-y", "@simonmcp/simon"],
"env": {
"SIMON_PROJECT_PATH": "/path/to/your/project"
}
}
}
}Usage
Available Tools
claude Tool
Execute development commands using natural language with optimized parameter structure:
// Basic usage
claude({
task_description: "写一个Python函数计算圆的面积"
})
// With context and specifications
claude({
task_description: "开发一个贪吃蛇游戏",
context: "这是给中学生用的教学代码,需要简单易懂",
spec: {
language: "JavaScript",
format_requirements: "使用ES6语法和Canvas API",
project_path: "/path/to/project"
}
})
// With additional flags
claude({
task_description: "分析代码质量",
spec: {
project_path: "/path/to/project",
additional_flags: ["--verbose"]
}
})
// Complex example
claude({
task_description: "修复用户登录功能的bug",
context: "用户反馈登录时出现500错误",
spec: {
language: "TypeScript",
format_requirements: "添加类型注释和错误处理",
project_path: "/path/to/auth/module"
}
})Parameter Description
| Field | Type | Required | Description |
|-------|------|----------|-------------|
| task_description | string | ✅ | Clear description of what code you want, e.g., "写一个Python函数计算圆的面积" |
| context | string | ❌ | Additional background information, e.g., "这是给中学生用的教学代码" |
| spec | object | ❌ | Specific requirements: language/format/standards |
| spec.language | string | ❌ | Programming language, e.g., "Python", "JavaScript", "TypeScript" |
| spec.format_requirements | string | ❌ | Format requirements, e.g., "添加类型注释", "使用ES6语法" |
| spec.project_path | string | ❌ | Project path (optional) |
| spec.additional_flags | array | ❌ | Additional flag parameters |
help Tool
Get help information:
// General help
help()
// Specific topics
help({ topic: "commands" })
help({ topic: "flags" })
help({ topic: "examples" })
help({ topic: "config" })Supported Command Types
- Refactor (重构) - Code refactoring and improvement
- Develop (开发) - Create new features or applications
- Analyze (分析) - Project analysis and insights
- Fix (修复) - Bug fixing and debugging
- Test (测试) - Testing and quality assurance
- Document (文档) - Documentation generation
- Optimize (优化) - Performance optimization
- Deploy (部署) - Deployment and distribution
Command Flags
-p- Project mode (work within project context)--project <path>- Specify project path--context <json>- Additional context information--dry-run- Show what would be done without executing--verbose- Enable verbose output
Configuration
Environment Variables
SIMON_PROJECT_PATH- Default project path for operationsSIMON_ALLOWED_PATHS- Comma-separated list of allowed paths
Configuration File
Create a simon-config.json file:
{
"allowedPaths": ["/path/to/project1", "/path/to/project2"],
"allowedOperations": ["read", "write", "create"],
"allowedFileExtensions": [".js", ".ts", ".py", ".md"],
"maxFileSize": 10485760,
"defaultProjectPath": "/default/project/path"
}Security Features
- Path Sandboxing: Operations restricted to configured allowed paths
- File Type Filtering: Only specified file extensions are accessible
- Size Limits: Files larger than configured limit are rejected
- Operation Permissions: Read/write/create operations can be controlled
Examples
Basic Commands
# Refactor current project
claude "对目前项目代码进行重构" -p
# Develop a new game
claude "开发一个贪吃蛇游戏" --project "/path/to/game/project"
# Analyze code quality
claude "分析项目的代码质量和结构" --verbose
# Fix a specific bug
claude "修复用户登录功能的bug" --context '{"module": "auth"}'Integration with MCP Clients
Once configured, you can use natural language commands in your MCP-enabled AI assistant:
- "Please refactor the current project code"
- "Develop a snake game for me"
- "Analyze the project structure and suggest improvements"
- "Help me fix the login bug"
Development
Building from Source
git clone <repository>
cd simon-mcp
npm install
npm run buildRunning in Development
npm run devTesting
# Test with MCP inspector
npx @modelcontextprotocol/inspector node dist/index.jsLicense
MIT
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
