{"id":48586218,"url":"https://github.com/mathematic-inc/claude-tools-mcp","last_synced_at":"2026-04-08T18:09:45.781Z","repository":{"id":320925180,"uuid":"1083791198","full_name":"mathematic-inc/claude-tools-mcp","owner":"mathematic-inc","description":"MCP server that exposes Claude Code's file and shell tools (bash, read, write, edit, glob, grep) over HTTP for remote use by any MCP client","archived":false,"fork":false,"pushed_at":"2026-03-11T01:03:56.000Z","size":116,"stargazers_count":13,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-11T06:09:24.543Z","etag":null,"topics":["claude","claude-code","docker","file-tools","go","http-server","mcp","model-context-protocol","shell-tools"],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mathematic-inc.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":"mathematic-inc"}},"created_at":"2025-10-26T18:10:48.000Z","updated_at":"2026-03-11T01:03:51.000Z","dependencies_parsed_at":"2025-10-26T20:32:08.687Z","dependency_job_id":"85714fa5-7c9b-4e04-99fa-64b499d45c7a","html_url":"https://github.com/mathematic-inc/claude-tools-mcp","commit_stats":null,"previous_names":["brwse/claude-tools-mcp","mathematic-inc/claude-tools-mcp"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/mathematic-inc/claude-tools-mcp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mathematic-inc%2Fclaude-tools-mcp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mathematic-inc%2Fclaude-tools-mcp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mathematic-inc%2Fclaude-tools-mcp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mathematic-inc%2Fclaude-tools-mcp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mathematic-inc","download_url":"https://codeload.github.com/mathematic-inc/claude-tools-mcp/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mathematic-inc%2Fclaude-tools-mcp/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31567507,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-08T14:31:17.711Z","status":"ssl_error","status_checked_at":"2026-04-08T14:31:17.202Z","response_time":54,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["claude","claude-code","docker","file-tools","go","http-server","mcp","model-context-protocol","shell-tools"],"created_at":"2026-04-08T18:09:45.122Z","updated_at":"2026-04-08T18:09:45.774Z","avatar_url":"https://github.com/mathematic-inc.png","language":"Go","funding_links":["https://github.com/sponsors/mathematic-inc"],"categories":[],"sub_categories":[],"readme":"# Claude Tools MCP Server\n\nAn MCP (Model Context Protocol) server that exposes Claude Code's file and shell manipulation tools over HTTP, allowing any MCP client to use these tools remotely.\n\n## Features\n\nThis server provides the following tools:\n\n- **bash**: Execute shell commands with timeout support and background execution\n- **bash_output**: Retrieve output from background shell processes\n- **kill_shell**: Terminate background shell processes\n- **read**: Read files with line offset/limit support\n- **write**: Write files to disk\n- **edit**: Perform exact string replacements in files\n- **glob**: Find files using glob patterns\n- **grep**: Search file contents using ripgrep (regex support, multiple output modes)\n\n## Installation\n\n### From Source\n\n```bash\ngo build -o claude-tools-mcp ./cmd/claude-tools-mcp\n```\n\n### With Docker\n\n```bash\ndocker build -t claude-tools-mcp .\ndocker run -p 8080:8080 claude-tools-mcp\n```\n\n#### Docker Build Optimization\n\nThe Docker image uses a pre-built runtime base image (`Dockerfile.runtime`) that contains all development tools and dependencies. This runtime image is automatically built and published to GitHub Container Registry (GHCR) whenever `Dockerfile.runtime` or the workflow file changes.\n\n**Benefits:**\n- Significantly faster builds (only compiles Go binary, not installing all tools)\n- Consistent runtime environment across deployments\n\n**Building the runtime image locally:**\n```bash\n# Build the runtime base image\ndocker build -f Dockerfile.runtime -t claude-tools-runtime .\n\n# Build the main image using local runtime\ndocker build -t claude-tools-mcp .\n```\n\nThe published runtime image is available at: `ghcr.io/mathematic-inc/claude-tools-mcp-runtime:latest`\n\n## Usage\n\n### Starting the Server\n\n```bash\n# Default (localhost:8080)\n./claude-tools-mcp\n\n# Custom address\n./claude-tools-mcp --addr localhost:9000\n```\n\n### With Docker\n\n```bash\n# Default port (8080)\ndocker run -p 8080:8080 claude-tools-mcp\n\n# Custom port\ndocker run -e PORT=9000 -p 9000:9000 claude-tools-mcp\n```\n\n### Configuration\n\nThe server runs in stateless mode, allowing each HTTP request to be handled independently. This enables horizontal scaling and simpler deployment.\n\n### Security Features\n\n- **Timeout protection**: Prevents slowloris attacks with ReadHeaderTimeout and IdleTimeout\n- **Graceful shutdown**: Responds to SIGINT/SIGTERM, allowing in-flight requests to complete\n- **Path validation**: Rejects relative paths to prevent directory traversal\n- **File size limits**: 10MB max file size, ~100k token max output\n- **Result limits**: Maximum 1000 lines for grep/glob results\n\n## Architecture\n\nThe server uses the [MCP Go SDK](https://github.com/modelcontextprotocol/go-sdk) to expose tools over HTTP. All tools are stateless except for:\n\n- **File modification tracking**: Detects when files are edited externally\n- **Background shell management**: Tracks long-running bash processes\n\nSee [CLAUDE.md](./CLAUDE.md) for detailed architecture documentation.\n\n## Development\n\n### Running Tests\n\n```bash\n# All tests\ngo test ./...\n\n# Specific package\ngo test ./internal/tools\n\n# Specific test\ngo test -run TestFunctionName ./internal/tools\n```\n\n### Dependencies\n\n- Go 1.25.1+\n- [MCP Go SDK](https://github.com/modelcontextprotocol/go-sdk)\n- [Cobra](https://github.com/spf13/cobra) for CLI\n- [mimetype](https://github.com/gabriel-vasile/mimetype) for file type detection\n- ripgrep (`rg`) must be installed for the grep tool\n\n## Repository\n\n[github.com/mathematic-inc/claude-tools-mcp](https://github.com/mathematic-inc/claude-tools-mcp)\n\n## License\n\nApache-2.0 License. Copyright (c) Mathematic Inc. See [LICENSE](./LICENSE) for details.\n\n\u003e This project is free and open-source work by a 501(c)(3) non-profit. If you find it useful, please consider [donating](https://github.com/sponsors/mathematic-inc).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmathematic-inc%2Fclaude-tools-mcp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmathematic-inc%2Fclaude-tools-mcp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmathematic-inc%2Fclaude-tools-mcp/lists"}