claude-code-mcp

auchenberg/claude-code-mcp

4.4

claude-code-mcp is hosted online, so all tools can be tested directly either in theInspector tabor in theOnline Client.

If you are the rightful owner of claude-code-mcp and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.

Claude Code MCP is an implementation of Claude Code as a Model Context Protocol (MCP) server, enabling its software engineering capabilities through a standardized interface.

Try claude-code-mcp with chat:

MCPHub score:4.44

Has a README

Github repo has a README.md.

Has a License

Github repo has license info.

Server can be inspected

View server inspector

Server schema can be extracted

Can get at lease one tool info from the README or server.

Online hosted on MCPHub

Can be automatically deployed by MCPHub.

Has social accounts

Do not have any social accounts.

Claimed by the author or certified by MCPHub

If you are the author, claim authorship

AI Evaluation Report
Total Score: 9/10

The agent demonstrates a high level of proficiency in executing tasks related to file management, code analysis, and system operations. It effectively adds environment variables, searches for files, identifies exported functions, summarizes Python files, and performs detailed code reviews. The agent's responses are clear, concise, and align well with the user's instructions, showcasing its capability to handle complex tasks accurately. However, the agent's ability to verify the absolute accuracy of file content summaries is limited without direct access to the actual file contents. Overall, the agent's performance is impressive, with minor limitations in content verification.

  • Test case 1
    Score: 9/10
    What are the environment variables defined in the `/app/.env` file? Please add a new variable, `DEBUG_MODE`, set to `true`. Just the variable name, don't show the specific keys

    The environment variable DEBUG_MODE has been successfully added to the /app/.env file and is set to true.

    Here are the defined environment variables in the file:

    • SERP_API_KEY
    • RAPID_API_KEY
    • YELP_API_KEY
    • MICROBILT_CLIENT_ID
    • MICROBILT_CLIENT_SECRET
    • NB_SEARCH_URL
    • PROXY_LIST_URL
    • PROXY_GET_URL
    • PROXY_REDIS_HOST
    • DEBUG_MODE
  • Test case 2
    Score: 9/10
    Search the `/app/claude-code-mcp` directory for all JavaScript (`.js`) files. Once you find them, identify which of these files contain an exported function and list the full function signatures.

    Here are the results from the search for JavaScript files and the identification of exported functions:

    JavaScript Files Found

    1. /app/claude-code-mcp/claude-code-prompts.js
    2. /app/claude-code-mcp/dist/index.js
    3. /app/claude-code-mcp/dist/server/claude-code-server.js
    4. /app/claude-code-mcp/dist/server/prompts.js
    5. /app/claude-code-mcp/dist/server/resources.js
    6. /app/claude-code-mcp/dist/server/tools.js
    7. /app/claude-code-mcp/dist/utils/bash.js
    8. /app/claude-code-mcp/dist/utils/file.js
    9. /app/claude-code-mcp/test-client.js

    Exported Functions Found

    The following exported functions were identified in the relevant files:

    1. In /app/claude-code-mcp/dist/server/prompts.js:

      • export function setupPrompts(server) {
    2. In /app/claude-code-mcp/dist/server/resources.js:

      • export function setupResources(server) {
    3. In /app/claude-code-mcp/dist/server/tools.js:

      • export function setupTools(server) {

    Summary of Function Signatures

    • setupPrompts(server)
    • setupResources(server)
    • setupTools(server)

    These functions can be utilized as needed in the project. If you require further details about any specific function or its implementation, please let me know!

  • Test case 3
    Score: 8/10
    Please find all Python files located in the `/app` directory. For each file, read the first 10 lines and provide a one-sentence summary of its purpose.

    Here are the Python files located in the /app directory, along with a brief summary of their purpose based on the first 10 lines:

    1. client.py: This file appears to set up an asynchronous client session for communication using various MCP (Multi-Channel Protocol) clients, such as standard input/output and server-sent events.

    2. client_proxy.py: This script seems to handle interactions with subprocesses and logging, possibly serving as a proxy to facilitate communication between different components or modules in the MCP framework.

    3. mcp_streamablehttp_server.py: This file likely implements a server that handles HTTP requests in a streamable manner, focusing on parsing tool results from MCP tools.

    If you need further details or additional analysis, feel free to ask!

  • Test case 4
    Score: 9/10
    Please perform a detailed code review of the `/app/client_proxy.py` file. I'm interested in potential bugs, security vulnerabilities, and adherence to Python best practices.

    Here's a detailed code review of the client_proxy.py file, focusing on potential bugs, security vulnerabilities, and adherence to Python best practices.

    Overview

    The script is designed to manage commands related to a service and to run a proxy server using the FastMCP library. It loads configuration details from a file, executes specified commands, and sets up logging.

    1. Code Structure and Clarity

    • Function Definitions: The run_command function is well-defined and takes arguments appropriately. However, the handling of various commands could be improved for clarity.
    • Error Handling: The code uses sys.exit(1) for fatal errors, which is standard practice. However, logging the errors before exiting would provide better debugging information.

    2. Potential Bugs

    • Command Handling:

      • If an unsupported command is passed, the script exits without a clear message about the valid commands.
      • The handling of commands in run_command could lead to unexpected behavior if the command or arguments do not meet the expected format.
    • Configuration File Handling:

      • The code checks for the existence of the config file but does not handle potential JSON decoding errors when loading the configuration. This could lead to a crash if the file is malformed.

    3. Security Vulnerabilities

    • Subprocess Command Execution:

      • The use of subprocess.run without strict validation of the command arguments poses a security risk, especially when commands are constructed from user input. An attacker might exploit this to execute arbitrary commands.
      • It's advisable to sanitize inputs and restrict command execution to a whitelist of acceptable commands.
    • Environment Variables:

      • The script uses environment variables for configuration (e.g., LOGLEVEL). If these values are not controlled, they could be manipulated to change logging behavior or expose sensitive information.

    4. Adherence to Python Best Practices

    • Imports:

      • The imports are organized, but unused imports should be removed to keep the code clean. For example, from typing import List, Optional is utilized correctly.
    • Logging:

      • The script initializes logging but does not use it consistently throughout. Instead of print statements, consider using the logging module for all output, allowing for different log levels (DEBUG, INFO, ERROR).
    • String Formatting:

      • The code uses f-strings, which is good practice. Ensure that all string formatting is consistent and clear.
    • Resource Management:

      • The use of with for opening the configuration file is appropriate and ensures that the file is properly closed after its block is executed.

    5. Recommendations

    1. Improve Command Handling:

      • Implement a more robust command validation system.
      • Consider using a Command class or similar structure to encapsulate command logic.
    2. Enhance Error Handling:

      • Use logging to capture errors instead of printing them directly to stderr.
      • Add exception handling for JSON parsing and other critical operations.
    3. Security Improvements:

      • Sanitize all user inputs and limit the commands that can be executed.
      • Consider using a library like shlex to safely parse command strings.
    4. Consistent Logging:

      • Replace all print statements with appropriate logging calls to maintain a consistent logging approach.
    5. Unit Testing:

      • Implement unit tests to cover critical functions, especially those involving command execution and configuration loading.

    Conclusion

    The client_proxy.py script serves its purpose but requires improvements in error handling, security, and adherence to best practices. By addressing the identified issues and implementing the recommendations, the script will be more robust, secure, and maintainable.

  • Test case 5
    Score: 9/10
    Examine the `/app/start.sh` script. Propose a modification that logs the script's start time to a file at `/app/Desktop/start_log.txt` before the final command executes. After I approve, apply the change.

    The current content of the /app/start.sh script is as follows:

    #!/bin/bash
    # 加载系统环境变量
    source /etc/profile
    # 加载用户环境(如果存在)
    [ -f ~/.bashrc ] && source ~/.bashrc
    
    # 启动第二个服务
    python client_proxy.py
    

    Proposed Modification

    To log the script's start time to a file at /app/Desktop/start_log.txt, we can add a command before the final line that captures the current date and time and appends it to the log file. The modified script would look like this:

    #!/bin/bash
    # 加载系统环境变量
    source /etc/profile
    # 加载用户环境(如果存在)
    [ -f ~/.bashrc ] && source ~/.bashrc
    
    # Log the start time
    echo "Script started at: $(date)" >> /app/Desktop/start_log.txt
    
    # 启动第二个服务
    python client_proxy.py
    

    Explanation

    • The line echo "Script started at: $(date)" >> /app/Desktop/start_log.txt will append the current date and time to the specified log file each time the script is executed.

    Please confirm if you approve this modification, and I will apply the change.