{"id":44448279,"url":"https://github.com/0xcarbon/cratedex","last_synced_at":"2026-02-18T18:00:42.050Z","repository":{"id":337938898,"uuid":"1155890388","full_name":"0xCarbon/cratedex","owner":"0xCarbon","description":"MCP server to make agents good at Rust: smart documentation search, project diagnostics and more.","archived":false,"fork":false,"pushed_at":"2026-02-16T17:15:24.000Z","size":760,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-02-16T22:34:04.942Z","etag":null,"topics":["cargo","cargo-plugin","mcp","mcp-server","rust"],"latest_commit_sha":null,"homepage":"https://crates.io/crates/cratedex","language":"Rust","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/0xCarbon.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-APACHE","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}},"created_at":"2026-02-12T02:43:18.000Z","updated_at":"2026-02-16T17:15:27.000Z","dependencies_parsed_at":null,"dependency_job_id":"65269ee4-f5b1-4958-85ba-9b3e621c6fe5","html_url":"https://github.com/0xCarbon/cratedex","commit_stats":null,"previous_names":["0xcarbon/cratedex"],"tags_count":13,"template":false,"template_full_name":null,"purl":"pkg:github/0xCarbon/cratedex","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xCarbon%2Fcratedex","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xCarbon%2Fcratedex/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xCarbon%2Fcratedex/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xCarbon%2Fcratedex/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/0xCarbon","download_url":"https://codeload.github.com/0xCarbon/cratedex/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xCarbon%2Fcratedex/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29550797,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-17T14:33:00.708Z","status":"ssl_error","status_checked_at":"2026-02-17T14:32:58.657Z","response_time":100,"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":["cargo","cargo-plugin","mcp","mcp-server","rust"],"created_at":"2026-02-12T16:07:22.352Z","updated_at":"2026-02-17T17:00:40.260Z","avatar_url":"https://github.com/0xCarbon.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"logo.png\" alt=\"cratedex logo\" width=\"297\"\u003e\n\u003c/p\u003e\n\n# cratedex\n\n[![Crates.io](https://img.shields.io/crates/v/cratedex)](https://crates.io/crates/cratedex)\n[![License](https://img.shields.io/crates/l/cratedex)](LICENSE-MIT)\n\nMCP (Model Context Protocol) server for Rust documentation indexing, full-text search, and project diagnostics.\n\n## Quick Start\n\n1. Install:\n\n```bash\ncargo install cratedex\n```\n\nTo upgrade later:\n\n```bash\ncratedex update\n```\n\n2. Run as a background service (Linux user service):\n\n```bash\ncratedex install-service --linger\n```\n\n3. Connect your AI coding tool:\n\n```bash\n# Claude Code\nclaude mcp add --scope user --transport http cratedex http://127.0.0.1:3737/mcp\n\n# Codex\ncodex mcp add cratedex --url http://127.0.0.1:3737/mcp\n```\n\nFor OpenCode, add an HTTP MCP server entry that points to:\n\n```text\nhttp://127.0.0.1:3737/mcp\n```\n\n## Features\n\n- Full-text search across Rust crate documentation (SQLite FTS5)\n- Cargo metadata and workspace-aware dependency resolution\n- Build diagnostics, outdated dependencies, and security advisories\n- Per-project registration with background indexing\n- Dual transport: stdio (per-client) or HTTP (shared daemon)\n\n## Prerequisites\n\n- Rust toolchain (1.93+)\n- Nightly Rust (for rustdoc JSON generation)\n\n## Installation\n\n```bash\ncargo install cratedex\n```\n\n## Configuration\n\nConfiguration is loaded from (in priority order):\n1. Environment variables (`CRATEDEX__\u003cSECTION\u003e__\u003cKEY\u003e`)\n2. `~/.cratedex/cratedex.toml`\n3. `cratedex.toml` in the current directory\n4. Built-in defaults\n\nSee `cratedex.toml.example` for all options. Key environment variables:\n\n| Variable | Default | Description |\n|---|---|---|\n| `CRATEDEX__SERVER__TRANSPORT` | `http` | Transport protocol: `http` or `stdio` |\n| `CRATEDEX__SERVER__HOST` | `127.0.0.1` | HTTP bind address |\n| `CRATEDEX__SERVER__PORT` | `3737` | HTTP bind port |\n| `CRATEDEX__SERVER__ALLOW_REMOTE` | `false` | Allow non-loopback bind (`false` strongly recommended) |\n| `CRATEDEX__SERVER__AUTH_TOKEN` | unset | Optional HTTP bearer token |\n| `CRATEDEX__SERVER__MAX_SEARCH_RESULTS` | `10` | Max results per search query |\n| `CRATEDEX__SERVER__MAX_PROJECTS` | `32` | Max simultaneously registered projects |\n| `CRATEDEX__SERVER__MAX_CONCURRENT_REQUESTS` | `64` | HTTP concurrency limit |\n| `CRATEDEX__SERVER__RATE_LIMIT_PER_SEC` | `30` | HTTP request rate cap |\n| `CRATEDEX__SERVER__MAX_REQUEST_BODY_BYTES` | `262144` | Max HTTP request body size |\n| `CRATEDEX__DATABASE__PATH` | `~/.cratedex/cratedex.db` | Database file path |\n\n### HTTP Security Model\n\n- By default, cratedex only allows loopback binds (`127.0.0.1` / `localhost`).\n- Binding to non-loopback interfaces requires explicit opt-in via `CRATEDEX__SERVER__ALLOW_REMOTE=true` (or `install-service --allow-remote`).\n- If you expose the service beyond localhost, place it behind a reverse proxy that enforces TLS and authentication.\n- For additional local protection (multi-user hosts), set `CRATEDEX__SERVER__AUTH_TOKEN` and send `Authorization: Bearer \u003ctoken\u003e`.\n\n## MCP Tools\n\n| Tool | Description |\n|---|---|\n| `register_project` | Register a Rust project for indexing and diagnostics |\n| `reindex_project` | Restart indexing for an existing project |\n| `list_projects` | List all registered projects and their indexing status |\n| `get_index_status` | Get indexing status for one project |\n| `list_crates` | List all crates in a project's workspace |\n| `get_diagnostics` | Compact diagnostics summary |\n| `get_build_diagnostics` | Paginated build diagnostics |\n| `get_outdated_diagnostics` | Paginated outdated dependencies |\n| `get_security_diagnostics` | Paginated security advisories |\n| `search_docs` | Search Rust documentation across the global index |\n| `unregister_project` | Remove a registered project from the server |\n\n## MCP Resources\n\n| URI | Description |\n|---|---|\n| `cratedex://logs` | Recent log entries from the server (last 500 lines) |\n\n## Deployment Models\n\n### stdio -- per-client process\n\nEach MCP client spawns its own `cratedex` process. Simple to configure, but concurrent clients may contend on the shared database file. Best for single-client setups.\n\n### HTTP -- shared daemon\n\nA single `cratedex` process serves all clients over HTTP. Avoids database lock contention and shares the documentation index across all sessions. Recommended for multi-client environments.\n\nEndpoint: `http://\u003chost\u003e:\u003cport\u003e/mcp` (default `http://127.0.0.1:3737/mcp`)\n\n## Client Configuration\n\n### Claude Code\n\n```bash\nclaude mcp add --scope user --transport http cratedex http://127.0.0.1:3737/mcp\n```\n\n### Codex\n\n```bash\ncodex mcp add cratedex --url http://127.0.0.1:3737/mcp\n```\n\n### stdio (any MCP client)\n\nConfigure the client to spawn the server directly:\n\n```json\n{\n  \"command\": \"cratedex\",\n  \"args\": [\"server\"],\n  \"env\": {\n    \"CRATEDEX__SERVER__TRANSPORT\": \"stdio\"\n  }\n}\n```\n\n## Advanced Service Management\n\n### Linux: systemd User Service\n\nFor a persistent shared HTTP daemon, install cratedex as a systemd user service:\n\n```bash\ncratedex install-service\n```\n\nThis writes a service unit to `~/.config/systemd/user/cratedex.service`, runs `daemon-reload`, and enables + starts the service. The command is idempotent.\n\nTo verify:\n\n```bash\nsystemctl --user status cratedex\njournalctl --user -u cratedex -f\n```\n\nTo remove:\n\n```bash\ncratedex remove-service\n```\n\nTo update the service binary:\n\n```bash\ncratedex update\n```\n\nFor system-level services:\n\n```bash\nsudo cratedex update --system\n```\n\n### Linux: systemd System Service\n\nA system-level service runs a shared daemon under `/etc/systemd/system`, managed with plain `systemctl`.\n\n```bash\nsudo cratedex install-service --system\n```\n\nTo verify:\n\n```bash\nsystemctl status cratedex\njournalctl -u cratedex -f\n```\n\nTo remove:\n\n```bash\nsudo cratedex remove-service --system\n```\n\n### macOS: launchd\n\n`cratedex install-service` installs a LaunchAgent in `~/Library/LaunchAgents/`.\nUse `--system` (with sudo) for `/Library/LaunchDaemons/`.\n\n### Windows: Task Scheduler\n\n`cratedex install-service` installs a user-level scheduled task at logon.\nSystem-level Windows Services are not implemented directly; use NSSM for that deployment model.\n\n## License\n\nLicensed under either of\n\n- Apache License, Version 2.0 ([LICENSE-APACHE](LICENSE-APACHE) or \u003chttp://www.apache.org/licenses/LICENSE-2.0\u003e)\n- MIT license ([LICENSE-MIT](LICENSE-MIT) or \u003chttp://opensource.org/licenses/MIT\u003e)\n\nat your option.\n\n### Contribution\n\nUnless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F0xcarbon%2Fcratedex","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F0xcarbon%2Fcratedex","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F0xcarbon%2Fcratedex/lists"}