com.knitli/codeweaver MCP Server
com.knitli/codeweaver
Semantic code search for AI agents with hybrid AST-aware understanding across 166 languages.
What this kind of tool is for
- Automate a build, test, or deployment step you repeat by hand.
- Review or refactor code in an existing repository without leaving your agent.
- Bridge an internal service or CLI into the agent toolset.
How to compare servers like this
- Scope of control:
- Repos and CI are hard to undo; prefer tools that ask before anything irreversible.
- Environment fit:
- Match the runtime it expects (Node, Python, a container) to what you actually run.
- Maintenance signal:
- Check the last-commit date — dev tooling that lags upstream breaks first.
- Config surface:
- Prefer tools whose environment-variable or config keys are documented plainly.
This page carries your copy-paste config: pick your MCP client in the install section on this page and use the copy button.
What is the com.knitli/codeweaver MCP server?
CodeWeaver is a semantic code search MCP server that gives AI agents precise, structural context from codebases through hybrid search (semantic + AST + keyword). It supports 166+ languages with AST-level understanding for 27 of them, and reduces token usage by 60–80% compared to keyword-only search.
CodeWeaver provides industrial-grade code context infrastructure for AI agents like Claude. Instead of generic keyword grep results, it delivers exact structural matches through hybrid semantic search, AST awareness, and language-specific chunking. It's designed for reliability with automatic local fallback, works airgapped, and uses 100% dependency injection for extensibility.
How to install com.knitli/codeweaver
Copy-paste configuration for popular MCP clients.
CODEWEAVER_CONFIG_FILESpecify a custom config file path for CodeWeaver. Only needed if not using the default locations.
CODEWEAVER_DEBUGEnable debug mode for CodeWeaver.
CODEWEAVER_EMBEDDING_API_KEYsecretSpecify the API key for the embedding provider, if required. Note: {', '.join([p for p in _providers_for_kind('embedding') if p.])}
CODEWEAVER_EMBEDDING_MODELSpecify the embedding model to use.
CODEWEAVER_EMBEDDING_PROVIDERSpecify the embedding provider to use.
CODEWEAVER_HOSTSet the server host for CodeWeaver.
CODEWEAVER_LOG_LEVELSet the log level for CodeWeaver (e.g., DEBUG, INFO, WARNING, ERROR).
CODEWEAVER_MCP_PORTSet the MCP server port for CodeWeaver if using http transport for mcp. Not required if using the default port (9328), or stdio transport.
CODEWEAVER_PORTSet the port for the codeweaver management server (information and management endpoints).
CODEWEAVER_PROFILEUse a premade provider settings profile for CodeWeaver.
CODEWEAVER_PROJECT_NAMESet the project name for CodeWeaver.
CODEWEAVER_PROJECT_PATHSet the project path for CodeWeaver.
CODEWEAVER_RERANKING_API_KEYsecretSpecify the API key for the reranking provider, if required.
CODEWEAVER_RERANKING_MODELSpecify the reranking model to use.
CODEWEAVER_RERANKING_PROVIDERSpecify the reranking provider to use.
CODEWEAVER_SPARSE_EMBEDDING_MODELSpecify the sparse embedding model to use.
CODEWEAVER_SPARSE_EMBEDDING_PROVIDERSpecify the sparse embedding provider to use.
CODEWEAVER_VECTOR_STORE_API_KEYsecretSpecify the API key for the vector store, if required.
CODEWEAVER_VECTOR_STORE_PORTSpecify the port for the vector store.
CODEWEAVER_VECTOR_STORE_PROVIDERSpecify the vector store provider to use.
CODEWEAVER_VECTOR_STORE_URLSpecify the URL for the vector store.
CODEWEAVER__TELEMETRY__DISABLE_TELEMETRYDisable telemetry data collection.
CODEWEAVER__TELEMETRY__TOOLS_OVER_PRIVACYOpt-in to potentially identifying collection of query and search result data. This is invaluable for helping us improve CodeWeaver's search capabilities. If privacy is a higher priority, do not enable this setting.
HTTPS_PROXYHTTP proxy for requests (Used by: Azure, Azure, Voyage)
OPENAI_API_KEYsecretAPI key for OpenAI-compatible services (not necessarily an API key *for* OpenAI). The OpenAI client also requires an API key, even if you don't actually need one for your provider (like local Ollama). So provide a dummy key if needed. (Used by: Azure, Cerebras, Deepseek, Fireworks, Github, Groq, Heroku, Moonshot, Ollama, Openai, Openrouter, Perplexity, Together, Vercel, X Ai)
OPENAI_LOGOne of: 'debug', 'info', 'warning', 'error' (Used by: Azure, Cerebras, Deepseek, Fireworks, Github, Groq, Heroku, Moonshot, Ollama, Openai, Openrouter, Perplexity, Together, Vercel, X Ai)
SSL_CERT_FILEPath to the SSL certificate file for requests (Used by: Azure, Azure, Voyage)
AI_GATEWAY_API_KEYsecretAPI key for Vercel service
AWS_ACCOUNT_IDAWS Account ID for Bedrock service
AWS_REGIONAWS region for Bedrock service
AWS_SECRET_ACCESS_KEYsecretAWS Secret Access Key for Bedrock service
AZURE_COHERE_API_KEYsecretAPI key for Azure Cohere service (cohere models on Azure)
AZURE_COHERE_ENDPOINTEndpoint for Azure Cohere service (cohere models on Azure)
AZURE_COHERE_REGIONRegion for Azure Cohere service
AZURE_OPENAI_API_KEYsecretAPI key for Azure OpenAI service (OpenAI models on Azure)
AZURE_OPENAI_ENDPOINTEndpoint for Azure OpenAI service (OpenAI models on Azure)
AZURE_OPENAI_REGIONRegion for Azure OpenAI service (OpenAI models on Azure)
COHERE_API_KEYYour Cohere API Key
CO_API_URLHost URL for Cohere service
DEEPSEEK_API_KEYsecretAPI key for DeepSeek service
GEMINI_API_KEYYour Google Gemini API Key
GOOGLE_API_KEYYour Google API Key
HF_HUB_VERBOSITYLog level for Hugging Face Hub client
HF_TOKENAPI key/token for Hugging Face service
INFERENCE_KEYsecretAPI key for Heroku service
INFERENCE_URLHost URL for Heroku service
MISTRAL_API_KEYYour Mistral API Key
QDRANT__LOG_LEVELLog level for Qdrant service
QDRANT__SERVICE__API_KEYsecretAPI key for Qdrant service
QDRANT__SERVICE__ENABLE_TLSEnable TLS for Qdrant service, expects truthy or false value (e.g. 1 for on, 0 for off).
QDRANT__SERVICE__HOSTHostname of the Qdrant service; do not use for URLs with schemes (e.g. 'http://')
QDRANT__SERVICE__HTTP_PORTPort number for the Qdrant service
QDRANT__TLS__CERTPath to the TLS certificate file for Qdrant service. Only needed if using a self-signed certificate. If you're using qdrant-cloud, you don't need this.
TAVILY_API_KEYYour Tavily API Key
TOGETHER_API_KEYsecretAPI key for Together service
VERCEL_OIDC_TOKENsecretOIDC token for Vercel service
VOYAGE_API_KEYsecretAPI key for Voyage service
{
"mcpServers": {
"codeweaver": {
"command": "uvx",
"args": [
"code-weaver",
"server",
"--project",
"--config",
"--host",
"--port",
"--transport",
"--verbose",
"--debug"
],
"env": {
"CODEWEAVER_CONFIG_FILE": "<YOUR_CODEWEAVER_CONFIG_FILE>",
"CODEWEAVER_DEBUG": "<YOUR_CODEWEAVER_DEBUG>",
"CODEWEAVER_EMBEDDING_API_KEY": "<YOUR_CODEWEAVER_EMBEDDING_API_KEY>",
"CODEWEAVER_EMBEDDING_MODEL": "<YOUR_CODEWEAVER_EMBEDDING_MODEL>",
"CODEWEAVER_EMBEDDING_PROVIDER": "<YOUR_CODEWEAVER_EMBEDDING_PROVIDER>",
"CODEWEAVER_HOST": "<YOUR_CODEWEAVER_HOST>",
"CODEWEAVER_LOG_LEVEL": "<YOUR_CODEWEAVER_LOG_LEVEL>",
"CODEWEAVER_MCP_PORT": "<YOUR_CODEWEAVER_MCP_PORT>",
"CODEWEAVER_PORT": "<YOUR_CODEWEAVER_PORT>",
"CODEWEAVER_PROFILE": "<YOUR_CODEWEAVER_PROFILE>",
"CODEWEAVER_PROJECT_NAME": "<YOUR_CODEWEAVER_PROJECT_NAME>",
"CODEWEAVER_PROJECT_PATH": "<YOUR_CODEWEAVER_PROJECT_PATH>",
"CODEWEAVER_RERANKING_API_KEY": "<YOUR_CODEWEAVER_RERANKING_API_KEY>",
"CODEWEAVER_RERANKING_MODEL": "<YOUR_CODEWEAVER_RERANKING_MODEL>",
"CODEWEAVER_RERANKING_PROVIDER": "<YOUR_CODEWEAVER_RERANKING_PROVIDER>",
"CODEWEAVER_SPARSE_EMBEDDING_MODEL": "<YOUR_CODEWEAVER_SPARSE_EMBEDDING_MODEL>",
"CODEWEAVER_SPARSE_EMBEDDING_PROVIDER": "<YOUR_CODEWEAVER_SPARSE_EMBEDDING_PROVIDER>",
"CODEWEAVER_VECTOR_STORE_API_KEY": "<YOUR_CODEWEAVER_VECTOR_STORE_API_KEY>",
"CODEWEAVER_VECTOR_STORE_PORT": "<YOUR_CODEWEAVER_VECTOR_STORE_PORT>",
"CODEWEAVER_VECTOR_STORE_PROVIDER": "<YOUR_CODEWEAVER_VECTOR_STORE_PROVIDER>",
"CODEWEAVER_VECTOR_STORE_URL": "<YOUR_CODEWEAVER_VECTOR_STORE_URL>",
"CODEWEAVER__TELEMETRY__DISABLE_TELEMETRY": "<YOUR_CODEWEAVER_TELEMETRY_DISABLE_TELEMETRY>",
"CODEWEAVER__TELEMETRY__TOOLS_OVER_PRIVACY": "<YOUR_CODEWEAVER_TELEMETRY_TOOLS_OVER_PRIVACY>",
"HTTPS_PROXY": "<YOUR_HTTPS_PROXY>",
"OPENAI_API_KEY": "<YOUR_OPENAI_API_KEY>",
"OPENAI_LOG": "<YOUR_OPENAI_LOG>",
"SSL_CERT_FILE": "<YOUR_SSL_CERT_FILE>",
"AI_GATEWAY_API_KEY": "<YOUR_AI_GATEWAY_API_KEY>",
"AWS_ACCOUNT_ID": "<YOUR_AWS_ACCOUNT_ID>",
"AWS_REGION": "<YOUR_AWS_REGION>",
"AWS_SECRET_ACCESS_KEY": "<YOUR_AWS_SECRET_ACCESS_KEY>",
"AZURE_COHERE_API_KEY": "<YOUR_AZURE_COHERE_API_KEY>",
"AZURE_COHERE_ENDPOINT": "<YOUR_AZURE_COHERE_ENDPOINT>",
"AZURE_COHERE_REGION": "<YOUR_AZURE_COHERE_REGION>",
"AZURE_OPENAI_API_KEY": "<YOUR_AZURE_OPENAI_API_KEY>",
"AZURE_OPENAI_ENDPOINT": "<YOUR_AZURE_OPENAI_ENDPOINT>",
"AZURE_OPENAI_REGION": "<YOUR_AZURE_OPENAI_REGION>",
"COHERE_API_KEY": "<YOUR_COHERE_API_KEY>",
"CO_API_URL": "<YOUR_CO_API_URL>",
"DEEPSEEK_API_KEY": "<YOUR_DEEPSEEK_API_KEY>",
"GEMINI_API_KEY": "<YOUR_GEMINI_API_KEY>",
"GOOGLE_API_KEY": "<YOUR_GOOGLE_API_KEY>",
"HF_HUB_VERBOSITY": "<YOUR_HF_HUB_VERBOSITY>",
"HF_TOKEN": "<YOUR_HF_TOKEN>",
"INFERENCE_KEY": "<YOUR_INFERENCE_KEY>",
"INFERENCE_URL": "<YOUR_INFERENCE_URL>",
"MISTRAL_API_KEY": "<YOUR_MISTRAL_API_KEY>",
"QDRANT__LOG_LEVEL": "<YOUR_QDRANT_LOG_LEVEL>",
"QDRANT__SERVICE__API_KEY": "<YOUR_QDRANT_SERVICE_API_KEY>",
"QDRANT__SERVICE__ENABLE_TLS": "<YOUR_QDRANT_SERVICE_ENABLE_TLS>",
"QDRANT__SERVICE__HOST": "<YOUR_QDRANT_SERVICE_HOST>",
"QDRANT__SERVICE__HTTP_PORT": "<YOUR_QDRANT_SERVICE_HTTP_PORT>",
"QDRANT__TLS__CERT": "<YOUR_QDRANT_TLS_CERT>",
"TAVILY_API_KEY": "<YOUR_TAVILY_API_KEY>",
"TOGETHER_API_KEY": "<YOUR_TOGETHER_API_KEY>",
"VERCEL_OIDC_TOKEN": "<YOUR_VERCEL_OIDC_TOKEN>",
"VOYAGE_API_KEY": "<YOUR_VOYAGE_API_KEY>"
}
}
}
}Tools & capabilities
Tools this server exposes to the agent.
find_code— Hybrid semantic and AST-aware code search across your codebase, supporting 166+ languages with precise structural understanding.
Use cases
- Help Claude find the exact functions that validate OAuth tokens across your codebase without noise
- Reduce token usage by 60–80% when providing code context to AI agents by returning only relevant structural matches
- Search code semantically across 166+ languages with AST-level understanding for 27 languages
- Set up a fully local, airgapped code search system with no cloud dependencies using FastEmbed and local Qdrant
- Swap between embedding providers (Voyage AI, OpenAI, local FastEmbed) without code changes using dependency injection
com.knitli/codeweaver MCP server FAQ
CodeWeaver provides semantic code search for AI agents using hybrid search (semantic vectors + AST + keyword matching). It understands code structure across 166+ languages and returns precise context instead of noisy keyword results, reducing token usage by 60–80%.
CodeWeaver is open-source under MIT or Apache-2.0 license. The 'quickstart' profile uses only free, local tools (FastEmbed + Qdrant). The 'recommended' profile uses Voyage AI embeddings, which has a free tier.
Install via PyPI (`uv add code-weaver`), then run `cw init --profile quickstart` for local-only setup or `cw init --profile recommended` for higher precision. Start the daemon with `cw start`. It exposes an MCP server that Cursor and Claude can connect to.
The 'quickstart' profile requires no authentication and runs fully local. The 'recommended' profile requires a Voyage AI API key (free tier available). You can also configure other embedding providers like OpenAI.
CodeWeaver is no longer actively maintained by Knitli, but the code is open-source (MIT/Apache-2.0) and available for forking. It is well-tested and functional.
CodeWeaver supports 166+ languages for semantic search and language-aware chunking. AST-level structural understanding is available for 27 languages including Python, JavaScript, Java, Go, Rust, and others.
README (reference)
Source of truth, from the repository.
<div align="center"> <picture> <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/knitli/codeweaver/refs/heads/main/docs-site/src/assets/codeweaver-reverse.svg"> <source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/knitli/codeweaver/refs/heads/main/docs-site/src/assets/codeweaver-primary.svg"> <img alt="CodeWeaver logo" src="https://raw.githubusercontent.com/knitli/codeweaver/refs/heads/main/docs-site/src/assets/codeweaver-primary.svg" height="150px" width="150px"> </picture>[!WARNING]
CodeWeaver is no longer maintained
We're really proud of CodeWeaver and think it's pretty awesome, but we can't maintain it anymore.
We're focused on something else.
CodeWeaver is (was?) a sophisticated, smart, code search tool with wide provider support. and it's still licensed under your choice of MIT or Apache-2.0.
So please, fork it and build something great!
CodeWeaver
Exquisite Context for Agents — Infrastructure that is Extensible, Predictable, and Resilient.
Documentation • Installation • Features • Comparison
</div>What It Does
CodeWeaver gives Claude and other AI agents precise context from your codebase. Not keyword grep. Not whole-file dumps. Actual structural understanding through hybrid semantic search.
CodeWeaver is Professional Context Infrastructure. With 100% Dependency Injection (DI) and a Pydantic-driven configuration system, it provides the reliability and extensibility required for industrial-grade AI deployments.
Example:
Without CodeWeaver:
Claude: "Let me search for 'auth'... here are 50 files mentioning authentication"
Result: Generic code, wrong context, wasted tokens
With CodeWeaver:
You: "Where do we validate OAuth tokens?"
Claude gets: The exact 3 functions across 2 files, with surrounding context
Result: Precise answers, focused context, 60-80% token reduction
CodeWeaver is no longer in alpha!
Early Release (0.x): CodeWeaver is in active development. APIs may change between minor versions. It's very well-tested but still in 'it works on my machine' territory. Use it, break it, help shape it.
How CodeWeaver Stacks Up
Quick Reference Matrix
| Feature | CodeWeaver | Legacy Search Tools |
|---|---|---|
| Search Type | Hybrid (Semantic + AST + Keyword) | Keyword Only |
| Context Quality | Exquisite / High-Precision | Noisy / Irrelevant |
| Extensibility | DI-Driven (Zero-Code Provider Swap) | Hardcoded |
| Reliability | Resilient (Automatic Local Fallback) | Fails on API Timeout |
| Token Usage | Optimized (60–80% Reduction) | Wasted on Noise |
🚀 Getting Started
Quick Install
# Add CodeWeaver to your project
uv add code-weaver
# Initialize with a profile (recommended uses Voyage AI)
cw init --profile recommended
# Verify setup
cw doctor
# Start the background daemon
cw start
📝 Note:
cw initsupports different Profiles:
recommended: High-precision search (Voyage AI + Qdrant)quickstart: 100% local, private, and free (FastEmbed + Local Qdrant)Want full offline? See the Local-Only Guide.
🐳 Prefer Docker? See Docker setup guide →
✨ Features
<table> <tr> <td width="50%">🔍 Exquisite Context
- Hybrid search (sparse + dense vectors)
- AST-level understanding (27 languages)
- Reciprocal Rank Fusion (RRF)
- Language-aware chunking (166+ languages)
🛡️ Industrial Resilience
- Automatic local fallback (FastEmbed)
- Circuit breaker pattern for APIs
- Works airgapped (no cloud required)
- Pydantic-driven validation at boot-time
🧩 Universal Extensibility
- 100% DI-driven architecture
- 17+ integrated providers
- Custom provider API
- Zero-code provider swapping
🛠️ Developer Experience
- Live indexing with file watching
- Diagnostic tool (
cw doctor) - Multiple CLI aliases (
cw/codeweaver) - Selectable profiles for easy setup
💭 Philosophy: Context is Oxygen
AI agents face too much irrelevant context, causing token waste, missed patterns, and hallucinations. CodeWeaver addresses this with one focused capability: structural + semantic code understanding that you control.
- Curation over Collection: Give agents exactly what they need, nothing more.
- Privacy-First: Your code stays local if you want it to.
- Infrastructure over Tooling: Built to be the reliable foundation for your AI stack.
📖 Read the detailed rationale →
<div align="center">
Official Documentation: docs.knitli.com/codeweaver/
Built with ❤️ by Knitli
</div> <!-- Badges --> <!-- Other links -->Related MCP servers
Query and audit AppSheet apps in natural language via Knotrik's pre-scanned definitions.
Manage Kong Konnect AI and API gateways, routes, plugins, and analytics from your agent.

Labelixa
Thermal label MCP server: render, validate, debug and convert ZPL, EPL, TSPL and CPCL labels.

Lassare
Human-in-the-loop for AI coding agents — ask questions, get approvals via Slack.

Team docs served to AI agents over MCP - search, Markdown reads, version pinning, read audit.
View repository →
KnowJudges
Source-linked research on U.S. judges, courts, cases, and judicial analytics.