{
  "markdown": "# CodeAlive MCP: Deepest Context Engine for your projects (especially for large codebases)\n\n<!-- MCP Server Name: io.github.codealive-ai.codealive-mcp -->\n\n[![CodeAlive Logo](https://app.codealive.ai/images/logos/dark-logo.svg)](https://www.codealive.ai/)\n\n**Connect your AI assistant to CodeAlive's powerful code understanding platform in seconds!**\n\nThis MCP (Model Context Protocol) server enables AI clients like Claude Code, Cursor, Claude Desktop, Continue, VS Code (GitHub Copilot), Cline, Codex, OpenCode, SourceCraft Code Assistant, SourceCraft CLI, Zed, KodaCode, GigaCode, Qwen Code, Gemini CLI, Roo Code, Goose, Kilo Code, Windsurf, Kiro, Qoder, n8n, and Amazon Q Developer to access CodeAlive's advanced semantic code search and codebase interaction features.\n\n## What is CodeAlive?\n\nCodeAlive is a Context Engine for large codebases, powered by graph-based retrieval and exposed through MCP. It gives AI agents like Cursor, Claude Code, Codex, and other MCP-compatible tools precise repository context instead of forcing them to read files blindly. In our RepoQA benchmark, CodeAlive + Qwen3.6 deep reached frontier-agent quality at ~25x lower model cost, and semantic search reduced captured tokens by 45%.\n\nIt's like Context7, but for your (large) codebases.\n\nIt allows AI-Coding Agents to:\n\n*   **Find relevant code faster** with semantic search\n*   **Understand the bigger picture** beyond isolated files  \n*   **Provide better answers** with full project context\n*   **Reduce costs and time** by removing guesswork\n\n## 🛠 Available Tools\n\nOnce connected, you'll have access to these powerful tools:\n\n1. **`get_data_sources`** - List your indexed repositories and workspaces\n2. **`semantic_search`** - Canonical semantic search across indexed artifacts\n3. **`grep_search`** - Exact literal or regex text search inside file content, plus literal file-name/path matching (returns files like `Form.xml` even when their content never mentions the name), with line-level previews for content matches\n4. **`get_repository_ontology`** - Get repository-level orientation for one selected repository\n5. **`get_file_tree`** - Inspect a bounded file tree for one repository\n6. **`read_file`** - Read a repository-relative file path, optionally with a line range\n7. **`fetch_artifacts`** - Load the full source for relevant search hits (missing or inaccessible identifiers are reported back, not silently dropped)\n8. **`get_artifact_relationships`** - Expand call graph, inheritance, and reference relationships for one artifact\n9. **`get_artifact_query_schema`** - Inspect supported ArtifactQuery entities, fields, and examples\n10. **`query_artifact_metadata`** - Run read-only metadata analytics across selected repositories\n11. **`chat`** - Stateless, slower synthesized codebase Q&A; call only when explicitly requested\n\n## 🎯 Usage Examples\n\nAfter setup, try these commands with your AI assistant:\n\n- *\"Show me all available repositories\"* → Uses `get_data_sources`\n- *\"Find authentication code in the user service\"* → Uses `semantic_search`\n- *\"Find the exact regex that matches JWT tokens\"* → Uses `grep_search`\n- *\"Explain how the payment flow works in this codebase\"* → Usually starts with `semantic_search`/`grep_search`, then optionally uses `chat`\n\n`semantic_search` and `grep_search` should be the default tools for most agents. `chat` is a slower stateless synthesis fallback that can take substantially longer than retrieval, and is usually unnecessary when an agent can run a multi-step workflow with ontology, search, fetch/read, relationships, ArtifactQuery, and local file reads. If your agent supports subagents, the highest-confidence path is to delegate a focused subagent that orchestrates `semantic_search` and `grep_search` first.\n\n## 📚 Agent Skill\n\nFor an even better experience, install the [CodeAlive Agent Skill](https://github.com/CodeAlive-AI/codealive-skills) alongside the MCP server. The MCP server gives your agent access to CodeAlive's tools; the skill teaches it the best workflows and query patterns to use them effectively.\n\n**For most agents** (Cursor, Copilot, Gemini CLI, Codex, and [30+ others](https://agentskills.io/)) — install the skill:\n\n```bash\nnpx skills add CodeAlive-AI/codealive-skills@codealive-context-engine\n```\n\n**For Claude Code** — install the plugin (recommended), which includes the skill plus Claude-specific enhancements:\n\n```\n/plugin marketplace add CodeAlive-AI/codealive-skills\n/plugin install codealive@codealive-marketplace\n```\n\n## Table of Contents\n\n*   [Agent Skill](#-agent-skill)\n*   [Quick Start (Remote)](#-quick-start-remote)\n*   [AI Client Integrations](#-ai-client-integrations)\n*   [Advanced: Local Development](#-advanced-local-development)\n*   [Community Plugins](#-community-plugins)\n*   [HTTP Deployment (Self-Hosted & Cloud)](#-http-deployment-self-hosted--cloud)\n*   [Windows & WSL](#-windows--wsl)\n*   [Available Tools](#-available-tools)\n*   [Usage Examples](#-usage-examples)\n*   [Troubleshooting](#-troubleshooting)\n*   [Publishing to MCP Registry](#-publishing-to-mcp-registry)\n*   [License](#-license)\n\n## 🚀 Quick Start (Remote)\n\n**The fastest way to get started** - no installation required! Our remote MCP server at `https://mcp.codealive.ai/api` provides instant access to CodeAlive's capabilities.\n\n### Step 1: Get Your API Key\n\n1. Sign up at [https://app.codealive.ai/](https://app.codealive.ai/)\n2. Navigate to **MCP & API**\n3. Click **\"+ Create API Key\"**\n4. Copy your API key immediately - you won't see it again!\n\n### Step 2: Open Your Client Guide\n\nChoose your client in the [MCP integration guides](https://docs.codealive.ai/integrations/mcp) and follow the current setup instructions there.\n\n## 🚀 Quick Start (Agentic Installation)\n\nYou may ask your AI agent to install the CodeAlive MCP server for you.\n\n1. Copy-paste the following prompt into your AI agent. Do not include your API key in the prompt:\n```\nAdd the CodeAlive MCP server by following the guide for my client at https://docs.codealive.ai/integrations/mcp\n\nPrefer the Remote HTTP option when available. Do not ask me to paste an API key into chat. When the key is needed, ask me to create a CodeAlive API key and copy it to my clipboard. After I confirm, insert it directly from the clipboard into the required secure configuration without displaying, echoing, logging, or exposing it in command arguments, command output, or model context. If you cannot safely use the clipboard without exposing the value, tell me exactly where to paste it myself.\n```\nThen allow execution.\n\n2. Restart your AI agent.\n\n## 🤖 AI Client Integrations\n\nClient-specific configuration is maintained in the CodeAlive documentation so file paths, transports, and authentication guidance stay current.\n\n**Start here:** [MCP integration guides](https://docs.codealive.ai/integrations/mcp)\n\n| Client | Setup guide |\n|---|---|\n| Claude Code | [Claude Code](https://docs.codealive.ai/integrations/mcp/claude-code) |\n| Claude Desktop | [Claude Desktop](https://docs.codealive.ai/integrations/mcp/claude-desktop) |\n| Cursor | [Cursor](https://docs.codealive.ai/integrations/mcp/cursor) |\n| Visual Studio Code | [VS Code](https://docs.codealive.ai/integrations/mcp/vscode) |\n| Windsurf | [Windsurf](https://docs.codealive.ai/integrations/mcp/windsurf) |\n| Cline | [Cline](https://docs.codealive.ai/integrations/mcp/cline) |\n| Continue | [Continue](https://docs.codealive.ai/integrations/mcp/continue) |\n| Codex | [Codex](https://docs.codealive.ai/integrations/mcp/codex) |\n| Gemini CLI | [Gemini CLI](https://docs.codealive.ai/integrations/mcp/gemini-cli) |\n| Amazon Q Developer | [Amazon Q](https://docs.codealive.ai/integrations/mcp/amazon-q) |\n| OpenCode | [OpenCode](https://docs.codealive.ai/integrations/mcp/opencode) |\n| SourceCraft Code Assistant and SourceCraft CLI | [SourceCraft](https://docs.codealive.ai/integrations/mcp/sourcecraft) |\n| Zed | [Zed](https://docs.codealive.ai/integrations/mcp/zed) |\n| ChatGPT | [ChatGPT](https://docs.codealive.ai/integrations/mcp/chatgpt) |\n| OpenClaw | [OpenClaw](https://docs.codealive.ai/integrations/mcp/openclaw) |\n| KodaCode, GigaCode, Roo Code, Goose, Kilo Code, Qwen Code, Kiro, Qoder, JetBrains AI Assistant, n8n, and more | [Other agents](https://docs.codealive.ai/integrations/mcp/other-agents) |\n\nFor an unlisted client, use these generic connection details and adapt them to the client's MCP configuration format:\n\n- **Endpoint:** `https://mcp.codealive.ai/api`\n- **Transport:** Streamable HTTP\n- **Authentication header:** `Authorization: Bearer YOUR_API_KEY_HERE`\n\nFor a private deployment, replace the endpoint with your server's `/api` URL. See [Self-Hosting](https://docs.codealive.ai/integrations/mcp/self-hosting) for deployment guidance.\n\n> **Connecting the server is half the setup.** Coding agents may continue using their built-in search unless project instructions tell them to prefer CodeAlive. Ready-made rules for `AGENTS.md`, `CLAUDE.md`, and client-specific instruction files are in [Instructing Coding Agents](https://docs.codealive.ai/guides/instructing-agents).\n\n---\n## 🔧 Advanced: Local Development\n\n**For developers who want to customize or contribute to the MCP server.**\n\n### Prerequisites\n\n*   Python 3.11+\n*   [uv](https://github.com/astral-sh/uv) (recommended) or pip\n\n### Installation\n\n```bash\n# Clone the repository\ngit clone https://github.com/CodeAlive-AI/codealive-mcp.git\ncd codealive-mcp\n\n# Setup with uv (recommended)\nuv venv\nsource .venv/bin/activate  # Windows: .venv\\Scripts\\activate\nuv pip install -e .\n\n# Or setup with pip\npython -m venv .venv\nsource .venv/bin/activate  # Windows: .venv\\Scripts\\activate  \npip install -e .\n```\n\n### Local Server Configuration\n\nAfter installing the server locally, point your MCP client at `.venv/bin/python` with `src/codealive_mcp_server.py` as the first argument and provide `CODEALIVE_API_KEY` in the process environment. Client-specific configuration belongs in the [MCP integration guides](https://docs.codealive.ai/integrations/mcp).\n\n### Running HTTP Server Locally\n\n```bash\n# Start local HTTP server\nexport CODEALIVE_API_KEY=\"your_api_key_here\"\npython src/codealive_mcp_server.py --transport http --host localhost --port 8000\n\n# Test health endpoint\ncurl http://localhost:8000/health\n```\n\nHTTP transport validates `Host` and browser `Origin` headers. Loopback hosts\n(`localhost`, `127.0.0.1`, `::1`) work without extra configuration. For a\nshared hostname, configure an exact allowlist:\n\n```bash\nexport CODEALIVE_MCP_ALLOWED_HOSTS=\"mcp.codealive.yourcompany.com\"\n# Only for browser callers; ordinary MCP clients do not send Origin.\nexport CODEALIVE_MCP_ALLOWED_ORIGINS=\"https://mcp.codealive.yourcompany.com\"\npython src/codealive_mcp_server.py --transport http --host 0.0.0.0 --port 8000\n```\n\nThe equivalent repeatable CLI options are `--allowed-host` and\n`--allowed-origin`. Do not use `*` for an Internet-facing server.\n\n### Testing Your Local Installation\n\nAfter making changes, quickly verify everything works:\n\n```bash\n# Match pyproject.toml exactly; older uv versions reject the locked setup.\nuv --version  # expected: uv 0.11.28\nuv sync --locked --extra test\n\n# Install the repository pre-push dependency audit once per clone\n./scripts/setup-hooks.sh\n\n# Quick smoke test (recommended)\nmake smoke-test\n\n# Or run directly\npython smoke_test.py\n\n# With your API key for full testing\nCODEALIVE_API_KEY=your_key python smoke_test.py\n\n# Run unit tests\nmake unit-test\n\n# Run all tests\nmake test\n\n# Equivalent direct locked test run\nuv run pytest src/tests/ -q\n```\n\nThe smoke test verifies:\n- Server starts and connects correctly\n- All tools are registered\n- Each tool responds appropriately\n- Parameter validation works\n- Runs in ~5 seconds\n\n---\n\n## 🌐 Community Plugins\n\n- [Gemini CLI — CodeAlive Extension](https://github.com/akolotov/gemini-cli-codealive-extension)\n- [Gemini CLI setup guide](https://docs.codealive.ai/integrations/mcp/gemini-cli)\n\n---\n\n## 🚢 HTTP Deployment (Self-Hosted & Cloud)\n\n**Deploy the MCP server as an HTTP service for team-wide access or integration with self-hosted CodeAlive instances.**\n\n### Deployment Options\n\nThe CodeAlive MCP server can be deployed as an HTTP service using Docker. This allows multiple AI clients to connect to a single shared instance, and enables integration with self-hosted CodeAlive deployments.\n\n### Docker Compose (Recommended)\n\nCreate a `docker-compose.yml` file based on our example:\n\n```bash\n# Download the example\ncurl -O https://raw.githubusercontent.com/CodeAlive-AI/codealive-mcp/main/docker-compose.example.yml\nmv docker-compose.example.yml docker-compose.yml\n\n# Edit configuration (see below)\nnano docker-compose.yml\n\n# Start the service\ndocker compose up -d\n\n# Check health\ncurl http://localhost:8000/health\n```\n\n**Configuration Options:**\n\n1. **For CodeAlive Cloud (default):**\n   - Remove `CODEALIVE_BASE_URL` environment variable (uses default `https://app.codealive.ai`)\n   - For remote clients with OAuth support, configure only `https://mcp.codealive.ai/api` and\n     complete the browser sign-in when prompted\n   - Existing API-key clients remain supported via `Authorization: Bearer YOUR_KEY`\n\n2. **For Self-Hosted CodeAlive:**\n   - Set `CODEALIVE_BASE_URL` to your CodeAlive instance URL (e.g., `https://codealive.yourcompany.com`)\n   - Set `CODEALIVE_MCP_ALLOWED_HOSTS` to the exact hostname clients use for this MCP server\n   - Clients must provide their API key via `Authorization: Bearer YOUR_KEY` header\n\nSee `docker-compose.example.yml` for the complete configuration template.\n\nFor example, current Codex and Claude Code clients can use browser OAuth without storing a\nCodeAlive API key:\n\n```bash\ncodex mcp add codealive --url https://mcp.codealive.ai/api\ncodex mcp login codealive\n\nclaude mcp add --transport http codealive https://mcp.codealive.ai/api\n# Start Claude Code and run /mcp to authenticate.\n```\n\nCursor and OpenCode also discover OAuth automatically from the same URL. Use\n`cursor-agent mcp login codealive` or `opencode mcp auth codealive` when their UI does not prompt\nautomatically. API-key configuration remains available as a compatibility option.\n\n### OAuth 2.1 deployment profile\n\nRemote HTTP deployments can enable browser authorization while keeping legacy API-key clients\nworking during rollout. OAuth mode publishes MCP Protected Resource Metadata, validates exact\nissuer/resource-bound JWTs, and exchanges them for a separate short-lived Tool API token. The\nincoming MCP bearer token is never forwarded downstream.\n\n| Environment variable | Purpose |\n|---|---|\n| `CODEALIVE_MCP_OAUTH_ENABLED=true` | Enables OAuth validation and MCP authorization discovery for HTTP transport |\n| `CODEALIVE_OAUTH_ISSUER` | Exact OpenIddict issuer, with a trailing slash |\n| `CODEALIVE_MCP_RESOURCE` | Exact public MCP resource URL; its path is also the HTTP MCP path |\n| `CODEALIVE_TOOL_API_RESOURCE` | Downstream audience; defaults to `urn:codealive:tool-api` |\n| `CODEALIVE_OAUTH_INTERNAL_CLIENT_ID` | Confidential resource-server client used only for token exchange |\n| `CODEALIVE_OAUTH_INTERNAL_CLIENT_SECRET` | Required secret for that internal client; startup fails closed when it is missing |\n\nThe authorization server and MCP service values must match exactly. In CodeAlive Web.Server the\ncorresponding settings live under `McpOAuth` (`Enabled`, `Issuer`, `Resource`,\n`ToolApiResource`, `InternalClientId`, and `InternalClientSecret`). Persist the Web.Server Data\nProtection key ring and OpenIddict signing/encryption certificates across replicas and restarts.\nFor a zero-downtime internal credential rotation, give the new credential a new client ID, deploy\nWeb.Server with both current and `PreviousInternalClientId`/`PreviousInternalClientSecret`, roll\nMCP replicas to the new current pair, then remove the previous pair. Web.Server deliberately fails\nstartup instead of changing a secret in place under an existing client ID.\nEnable the Web.Server and MCP flags in the same rollout; a half-enabled deployment is not a valid\nsteady state. API-key credentials retain their explicit legacy grammar and are never used as a\nfallback after OAuth validation fails.\n\n### Connecting MCP Clients to Your Deployed Instance\n\nUse the same generic connection details as CodeAlive Cloud, replacing the endpoint with your deployment's `/api` URL:\n\n- **Endpoint:** `https://your-server.example.com/api`\n- **Transport:** Streamable HTTP\n- **Authentication header:** `Authorization: Bearer YOUR_API_KEY_HERE`\n\nFor the exact configuration format, open the relevant [client integration guide](https://docs.codealive.ai/integrations/mcp).\n\n## 🪟 Windows & WSL\n\nUse the client-specific documentation for Windows and WSL setup:\n\n- [Claude Code](https://docs.codealive.ai/integrations/mcp/claude-code)\n- [Claude Desktop](https://docs.codealive.ai/integrations/mcp/claude-desktop)\n- [All MCP integration guides](https://docs.codealive.ai/integrations/mcp)\n- [Troubleshooting](https://docs.codealive.ai/troubleshooting)\n\nFor self-hosted servers running in WSL2, Windows clients must be able to reach the server's `/api` endpoint. Use mirrored networking on supported Windows 11 versions or connect through the WSL2 VM address.\n\n## 🐞 Troubleshooting\n\n### Quick Diagnostics\n\n1. **Test the hosted service:**\n   ```bash\n   curl https://mcp.codealive.ai/health\n   ```\n\n2. **Check your API key:**\n   ```bash\n   curl -H \"Authorization: Bearer YOUR_API_KEY\" https://app.codealive.ai/api/v1/data_sources\n   ```\n\n3. **Enable debug logging:** Add `--debug` to local server args\n\n### Common Issues\n\n- **\"Connection refused\"** → Check internet connection\n- **\"401 Unauthorized\"** → Verify your API key  \n- **\"No repositories found\"** → Check API key permissions in CodeAlive dashboard\n- **Client-specific logs** → See your AI client's documentation for MCP logs\n\n### Windows / WSL Issues\n\n- **`docker: command not found` in WSL** → Enable Docker Desktop WSL integration for your distro (Settings → Resources → WSL integration), or use the full path `/usr/bin/docker`\n- **`ENOENT` or `spawn error` for `npx`/`python`** → Non-interactive WSL shells don't inherit `nvm`/`pyenv` paths. Use absolute paths in MCP configs\n- **`Connection refused` to self-hosted server in WSL2** → WSL2 uses NAT networking; `localhost` differs between Windows and WSL2. Enable mirrored networking in `.wslconfig` or use the WSL2 VM IP (`hostname -I`)\n- **Claude Desktop can't connect to WSL MCP server** → Claude Desktop doesn't support WSL subprocess spawning. Use Remote HTTP (`https://mcp.codealive.ai/api`), Docker Desktop, or the `wsl.exe` proxy pattern (see [Windows & WSL section](#-windows--wsl))\n\n### Getting Help\n\n- 📧 Email: support@codealive.ai\n- 🐛 Issues: [GitHub Issues](https://github.com/CodeAlive-AI/codealive-mcp/issues)\n\n---\n\n## 📦 Publishing to MCP Registry\n\nFor maintainers: see [DEPLOYMENT.md](DEPLOYMENT.md) for instructions on publishing new versions to the MCP Registry.\n\n---\n\n## Privacy Policy\n\nCodeAlive processes the repositories and queries you send through this extension in order to provide semantic search and codebase analysis. For complete privacy details, see [CodeAlive Privacy Policy](https://www.codealive.ai/privacy/).\n\n---\n\n## 📄 License\n\nMIT License - see [LICENSE](LICENSE) file for details.\n\n---\n\n**Ready to supercharge your AI assistant with deep code understanding?**  \n[Get started now →](https://app.codealive.ai/)\n",
  "bytes": 19396,
  "sha": "7313c4e51a8e270ca6861d557cc4cbf049e27682bd8253dc3305d39ef3b9db5a",
  "repo_slug": "codealive-ai/codealive-mcp",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_codealive_ai_codealive_mcp_4f236581/readme"
}