gdb
MCP server from ayushtiwari110/gdb-MCP-Server
claude mcp add --transport stdio ayushtiwari110-gdb-mcp-server node server.js \ --env HOST="0.0.0.0" \ --env PORT="3000"
How to use
This MCP server provides an HTTP-based interface to execute C++ code using OnlineGDB's online compiler. It exposes an HTTP MCP endpoint at POST /mcp and a REST API with /tools/list and /health, along with a web interface at /. You can interact with it by initializing the MCP connection, listing available tools, and invoking specific tools such as execute_cpp_code, submit_solution, optimize_code, and generate_test_cases. The agent can run C++ code, supply custom input, test complete solutions across multiple test cases, analyze performance, and report detailed compilation and runtime errors. Typical workflows include quickly prototyping a solution with execute_cpp_code, validating it with submit_solution against several test cases, and iterating with optimize_code to improve efficiency.
To use the tools, send a request to the /mcp endpoint with the appropriate method (e.g., execute_cpp_code, submit_solution, etc.) and provide the required arguments as shown in the examples in the README. The server is configured to listen on port 3000 by default, but you can adjust the PORT environment variable when starting the server. The available tools are designed to help an agent analyze problems, run code, and verify results end-to-end in a single HTTP workflow.
How to install
Prerequisites:
- Node.js and npm installed on your system
- Basic familiarity with running commands in a terminal
Installation steps:
-
Clone the repository (or download the package): git clone <repository-url> cd onlinegdb-mcp-server
-
Install dependencies: npm install
-
Build the project (if required by the project setup): npm run build
-
Start the MCP server: npm start
Notes:
- The server relies on Puppeteer for browser automation. On Linux/macOS, you may need to install system dependencies as described in the README (Chromium and related libraries).
- If you need to run on a different port, set the PORT environment variable, e.g., PORT=3001 npm start
Additional notes
Tips and common considerations:
- Ensure system dependencies for Puppeteer are installed (especially on Linux). The README lists commands for Ubuntu/Debian, macOS with Homebrew, and Windows where Chromium is downloaded automatically by Puppeteer.
- If the server fails to start due to port conflicts, set a different port with PORT=<port> npm start.
- The HTTP transport is the recommended integration path for MCP clients to interact with this server; the documentation includes sample requests for tools/list and initialize calls.
- For long-running executions, adjust timeLimit in execute_cpp_code and consider increasing test case complexity in generate_test_cases to thoroughly validate behavior.
- If OnlineGDB experiences temporary outages, you may see runtime errors; retrying with longer timeouts can help.
- When deploying, ensure environment variables such as PORT and any security-related configurations are properly set for your hosting environment.
Related MCP Servers
zen
Selfhosted notes app. Single golang binary, notes stored as markdown within SQLite, full-text search, very low resource usage
MCP -Deepseek_R1
A Model Context Protocol (MCP) server implementation connecting Claude Desktop with DeepSeek's language models (R1/V3)
mcp-fhir
A Model Context Protocol implementation for FHIR
mcp
Inkdrop Model Context Protocol Server
mcp-appium-gestures
This is a Model Context Protocol (MCP) server providing resources and tools for Appium mobile gestures using Actions API..
dubco -npm
The (Unofficial) dubco-mcp-server enables AI assistants to manage Dub.co short links via the Model Context Protocol. It provides three MCP tools: create_link for generating new short URLs, update_link for modifying existing links, and delete_link for removing short links.