execute_code
Run code locally in Python, JavaScript, Ruby, PHP, Go, or Rust using this tool. Displays code for review, requires confirmation, and executes within a specified timeout in the current working directory.
Instructions
Execute arbitrary code in various programming languages on the user's local machine within the current working directory. Supported languages: python, javascript, ruby, php, go, rust. Always review the code carefully before execution to prevent unintended consequences. You MUST explicitly show the user the code that will be executed and get his confirmation before using this tool. Examples: - Python: code='print(sum(range(10)))'. - JavaScript: code='console.log(Array.from({length: 5}, (_, i) => i*2))'. - Ruby: code='puts (1..5).reduce(:+)'.
Input Schema
Name | Required | Description | Default |
---|---|---|---|
code | Yes | Code to execute on the user's local machine in the current working directory | |
language | Yes | Programming language to use | |
timeout | No | Maximum execution time in seconds |
Input Schema (JSON Schema)
You must be authenticated.
Other Tools from AiDD MCP Server
- create_directory
- delete_file
- directory_tree
- edit_file
- execute_code
- execute_shell_script
- get_allowed_directory
- get_file_info
- get_system_info
- git_add
- git_checkout
- git_commit
- git_create_branch
- git_diff
- git_diff_staged
- git_diff_unstaged
- git_init
- git_log
- git_reset
- git_show
- git_status
- list_directory
- move_file
- read_file
- read_multiple_files
- search_files
- tree_sitter_map
- update_allowed_directory
- write_file
Related Tools
- @302ai/302_sandbox_mcp
- @Monsoft-Solutions/model-context-protocols
- @formulahendry/mcp-server-code-runner
- @PhialsBasement/MCP-Puppeteer-Linux
- @nicholmikey/chrome-tools-MCP