{"id":31283039,"url":"https://github.com/leblancfg/code-mcp","last_synced_at":"2025-09-24T04:05:05.303Z","repository":{"id":305045426,"uuid":"1021740914","full_name":"leblancfg/code-mcp","owner":"leblancfg","description":"STDIO MCP server that allows agents to run their code in Google Cloud Functions","archived":false,"fork":false,"pushed_at":"2025-07-17T22:08:29.000Z","size":54,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-09-09T04:46:29.612Z","etag":null,"topics":["cloudfunction","codeinterpreter","google","mcp-server"],"latest_commit_sha":null,"homepage":"https://leblancfg.com/code-mcp","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/leblancfg.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-07-17T21:54:16.000Z","updated_at":"2025-07-17T22:08:31.000Z","dependencies_parsed_at":"2025-07-18T03:40:04.185Z","dependency_job_id":"cbd8dbf2-710c-4e6c-9b1d-eab53f1ddb0b","html_url":"https://github.com/leblancfg/code-mcp","commit_stats":null,"previous_names":["leblancfg/code-mcp"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/leblancfg/code-mcp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leblancfg%2Fcode-mcp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leblancfg%2Fcode-mcp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leblancfg%2Fcode-mcp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leblancfg%2Fcode-mcp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/leblancfg","download_url":"https://codeload.github.com/leblancfg/code-mcp/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leblancfg%2Fcode-mcp/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":276689022,"owners_count":25686612,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-24T02:00:09.776Z","response_time":97,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cloudfunction","codeinterpreter","google","mcp-server"],"created_at":"2025-09-24T04:05:03.566Z","updated_at":"2025-09-24T04:05:05.297Z","avatar_url":"https://github.com/leblancfg.png","language":"Python","readme":"# Code MCP Server\n\nAn MCP (Model Context Protocol) server that provides code interpretation capabilities via Google Cloud Functions.\n\n## Features\n\n- Execute Python, JavaScript, and Bash code in a sandboxed environment\n- Automatic deployment to Google Cloud Functions\n- STDIO-based MCP server implementation\n\n## Prerequisites\n\n- Python 3.11+\n- Google Cloud SDK (`gcloud`) installed and configured\n- A Google Cloud Project with Cloud Functions API enabled\n\n## Installation\n\n```console\n$ pip install -e \".[dev]\"\n```\n\n## Usage\nYou'll first need to set up a Google Cloud Function that can execute code. The server will handle requests to this function. In this repo, run it with\n\n```console\n$ uv run python deploy_gcf.py\n```\n\n\n### As an MCP Server\n\n```console\n$ uv run python main.py\n```\n\n### Running Tests\n\n```console\n$ uv run pytest\n```\n\n### Testing with the MCP Inspector\nYou can use the CLI feature with\n\n```console\n$ GCF_URL=$MY_COOL_GCF_URL \\\nnpx @modelcontextprotocol/inspector@0.11.0 \\\n--cli uv run python main.py \\\n--method tools/call \\\n--tool-name run_code \\\n--tool-arg \"code=print(1+1)\" \\\n--tool-arg language=python \\\n| jq\n```\n\n## Configuration\n\nSet the `GCF_URL` environment variable to use an existing Cloud Function, otherwise the server will attempt to deploy one automatically.\n\n```console\n$ export GCF_URL=\"https://region-project.cloudfunctions.net/code-interpreter\"\n```\n\n## Architecture\n\n- **MCP Server**: Handles tool requests from AI agents\n- **Google Cloud Function**: Executes code in an isolated environment\n- **Supported Languages**: Python, JavaScript (Node.js), Bash\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleblancfg%2Fcode-mcp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fleblancfg%2Fcode-mcp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleblancfg%2Fcode-mcp/lists"}