MCP Help Request Server
Captures comprehensive context about development issues and facilitates human assistance through structured API-based help requests.
README
MCP Help Request Server
A Model Context Protocol (MCP) server that provides tools for capturing comprehensive context about development issues and facilitating human assistance through structured API-based help requests.
Overview
This server provides tools that allow AI assistants to capture detailed context about coding issues, workspace state, and user conversations, then facilitate human support through automated session management and API integration.
Features
- Comprehensive Context Capture: Automatically captures workspace state, file contents, error diagnostics, and conversation history
- Structured Help Requests: Uses Zod schemas to ensure consistent and complete help request data
- Session Management: Creates unique session IDs and logs for tracking help requests
- API-Based Integration: Sends help requests to external APIs for human assistance coordination
- Ticket-Based Integration: Creates structured support tickets through API integration
- Modular Architecture: Clean separation of concerns with organized directory structure
Architecture
index.js # Main entry point
src/
├── api/ # API integration layer
│ ├── index.js # API exports
│ └── helpRequestAPI.js # Help request API client for ticket creation
├── config/ # Configuration files
│ └── logger.js # Winston logger configuration
├── constants/ # Application constants
│ └── index.js # Shared constants and configuration values
├── schemas/ # Zod validation schemas
│ └── helpRequest.js # Help request schema definitions
├── tools/ # MCP tool implementations
│ ├── index.js # Tool exports
│ ├── helpRequest.js # Main help request tool
│ └── getHelpSession.js # Session retrieval tool
├── utils/ # Utility functions
│ └── workspace.js # Workspace analysis utilities
└── server.js # Main server setup and configuration
logs/ # Log files and session data
sessions/ # Session storage
consent-records/ # Privacy consent records
Installation
- Clone the repository
- Install dependencies:
npm install
Usage
Starting the Server
npm run start
The server runs using the FastMCP framework with stdio transport.
Available Tools
1. request_help
Captures comprehensive context about a development issue and creates a support session.
Parameters:
session(required): Session information with unique ID and timestampconversation(required): Recent conversation messages leading to the help requestissue(required): Description of the problem that needs assistanceworkspace(optional): Information about the user's workspace/projectdiagnostics(optional): Error messages, warnings, or logssolutionsAttempted(optional): Previous attempts to solve the issueenvironment(optional): System environment detailsdependencies(optional): Project dependenciesversionControl(optional): Git/version control informationperformance(optional): Performance metrics
Returns:
- Success message with ticket ID and status
- Session ID for reference
- Priority level assigned to ticket
- Context summary
- Next steps for the user
2. get_help_session
Retrieves the context data for a specific help session.
Parameters:
sessionId(required): The session ID to retrieve
Returns:
- Session data in JSON format
- Success/failure status
Configuration
Environment Variables
API_ENDPOINT: Ticket API endpoint (default: http://localhost:3000/api/tickets)API_SERVICE_KEY: Service key for API authentication (default: your_mcp_service_key_here)PORT: Server port (default: 8080)
Logger Configuration
The logger is configured in src/config/logger.js and creates:
- Error logs:
logs/error.log - Combined logs:
logs/combined.log - Console output for development
Constants
Application constants are defined in src/constants/index.js:
- Server configuration
- API configuration options
- File processing limits
- Directory ignore patterns
- Log levels
Development
Project Structure
The codebase follows a modular architecture:
- API: External API integration for ticket creation
- Config: Centralized configuration management
- Schemas: Zod validation schemas for type safety
- Tools: MCP tool implementations
- Utils: Reusable utility functions
- Constants: Shared application constants
API Configuration
The server integrates with a ticket API system. Configure the API endpoint and service key:
API_ENDPOINT=http://localhost:3000/api/tickets
API_SERVICE_KEY=your_service_key_here
Adding New Tools
- Create a new tool file in
src/tools/ - Export the tool from
src/tools/index.js - Add the tool to the server in
src/server.js
Schema Validation
All tool parameters are validated using Zod schemas defined in src/schemas/. This ensures:
- Type safety
- Consistent data structure
- Clear documentation of expected inputs
Dependencies
- fastmcp: MCP server framework
- winston: Logging
- fs-extra: Enhanced file system operations
- uuid: UUID generation
- glob: File pattern matching
- dotenv: Environment variable management
Logging
The server uses Winston for structured logging:
- All help requests are logged with session IDs
- Error conditions are captured with stack traces
- Session data is stored in individual JSON files
- Console output for development monitoring
Session Management
Each help request creates:
- Unique session ID (UUID)
- Timestamped session log file
- Comprehensive context capture
- API response with ticket ID and status
Error Handling
The server includes comprehensive error handling:
- Graceful degradation when workspace access fails
- Detailed error logging with context
- User-friendly error messages
- Session recovery capabilities
- API failure handling with fallback responses
Privacy and Consent
The server includes built-in privacy protection:
- User consent collection for data sharing
- Consent record storage
- Privacy-aware data handling
License
ISC License
Contributing
- Follow the existing code structure
- Add appropriate error handling
- Include logging for debugging
- Update documentation for new features
- Ensure schema validation for new parameters
- Test API integration with proper authentication
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。