PluginBench
MCP Server
Maintained
Apache-2.0

com.knitli/codeweaver MCP Server

com.knitli/codeweaver

Semantic code search for AI agents with hybrid AST-aware understanding across 166 languages.

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.

transport: stdio
Config generated by PluginBench — verify against the source before use.
Environment / auth
  • CODEWEAVER_CONFIG_FILE

    Specify a custom config file path for CodeWeaver. Only needed if not using the default locations.

  • CODEWEAVER_DEBUG

    Enable debug mode for CodeWeaver.

  • CODEWEAVER_EMBEDDING_API_KEY
    secret

    Specify the API key for the embedding provider, if required. Note: {', '.join([p for p in _providers_for_kind('embedding') if p.])}

  • CODEWEAVER_EMBEDDING_MODEL

    Specify the embedding model to use.

  • CODEWEAVER_EMBEDDING_PROVIDER

    Specify the embedding provider to use.

  • CODEWEAVER_HOST

    Set the server host for CodeWeaver.

  • CODEWEAVER_LOG_LEVEL

    Set the log level for CodeWeaver (e.g., DEBUG, INFO, WARNING, ERROR).

  • CODEWEAVER_MCP_PORT

    Set the MCP server port for CodeWeaver if using http transport for mcp. Not required if using the default port (9328), or stdio transport.

  • CODEWEAVER_PORT

    Set the port for the codeweaver management server (information and management endpoints).

  • CODEWEAVER_PROFILE

    Use a premade provider settings profile for CodeWeaver.

  • CODEWEAVER_PROJECT_NAME

    Set the project name for CodeWeaver.

  • CODEWEAVER_PROJECT_PATH

    Set the project path for CodeWeaver.

  • CODEWEAVER_RERANKING_API_KEY
    secret

    Specify the API key for the reranking provider, if required.

  • CODEWEAVER_RERANKING_MODEL

    Specify the reranking model to use.

  • CODEWEAVER_RERANKING_PROVIDER

    Specify the reranking provider to use.

  • CODEWEAVER_SPARSE_EMBEDDING_MODEL

    Specify the sparse embedding model to use.

  • CODEWEAVER_SPARSE_EMBEDDING_PROVIDER

    Specify the sparse embedding provider to use.

  • CODEWEAVER_VECTOR_STORE_API_KEY
    secret

    Specify the API key for the vector store, if required.

  • CODEWEAVER_VECTOR_STORE_PORT

    Specify the port for the vector store.

  • CODEWEAVER_VECTOR_STORE_PROVIDER

    Specify the vector store provider to use.

  • CODEWEAVER_VECTOR_STORE_URL

    Specify the URL for the vector store.

  • CODEWEAVER__TELEMETRY__DISABLE_TELEMETRY

    Disable telemetry data collection.

  • CODEWEAVER__TELEMETRY__TOOLS_OVER_PRIVACY

    Opt-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_PROXY

    HTTP proxy for requests (Used by: Azure, Azure, Voyage)

  • OPENAI_API_KEY
    secret

    API 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_LOG

    One 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_FILE

    Path to the SSL certificate file for requests (Used by: Azure, Azure, Voyage)

  • AI_GATEWAY_API_KEY
    secret

    API key for Vercel service

  • AWS_ACCOUNT_ID

    AWS Account ID for Bedrock service

  • AWS_REGION

    AWS region for Bedrock service

  • AWS_SECRET_ACCESS_KEY
    secret

    AWS Secret Access Key for Bedrock service

  • AZURE_COHERE_API_KEY
    secret

    API key for Azure Cohere service (cohere models on Azure)

  • AZURE_COHERE_ENDPOINT

    Endpoint for Azure Cohere service (cohere models on Azure)

  • AZURE_COHERE_REGION

    Region for Azure Cohere service

  • AZURE_OPENAI_API_KEY
    secret

    API key for Azure OpenAI service (OpenAI models on Azure)

  • AZURE_OPENAI_ENDPOINT

    Endpoint for Azure OpenAI service (OpenAI models on Azure)

  • AZURE_OPENAI_REGION

    Region for Azure OpenAI service (OpenAI models on Azure)

  • COHERE_API_KEY

    Your Cohere API Key

  • CO_API_URL

    Host URL for Cohere service

  • DEEPSEEK_API_KEY
    secret

    API key for DeepSeek service

  • GEMINI_API_KEY

    Your Google Gemini API Key

  • GOOGLE_API_KEY

    Your Google API Key

  • HF_HUB_VERBOSITY

    Log level for Hugging Face Hub client

  • HF_TOKEN

    API key/token for Hugging Face service

  • INFERENCE_KEY
    secret

    API key for Heroku service

  • INFERENCE_URL

    Host URL for Heroku service

  • MISTRAL_API_KEY

    Your Mistral API Key

  • QDRANT__LOG_LEVEL

    Log level for Qdrant service

  • QDRANT__SERVICE__API_KEY
    secret

    API key for Qdrant service

  • QDRANT__SERVICE__ENABLE_TLS

    Enable TLS for Qdrant service, expects truthy or false value (e.g. 1 for on, 0 for off).

  • QDRANT__SERVICE__HOST

    Hostname of the Qdrant service; do not use for URLs with schemes (e.g. 'http://')

  • QDRANT__SERVICE__HTTP_PORT

    Port number for the Qdrant service

  • QDRANT__TLS__CERT

    Path 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_KEY

    Your Tavily API Key

  • TOGETHER_API_KEY
    secret

    API key for Together service

  • VERCEL_OIDC_TOKEN
    secret

    OIDC token for Vercel service

  • VOYAGE_API_KEY
    secret

    API key for Voyage service

~/Library/Application Support/Claude/claude_desktop_config.json
{
  "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

What does CodeWeaver do?

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%.

Is CodeWeaver free?

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.

How do I install CodeWeaver in Cursor or Claude?

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.

Does CodeWeaver require authentication?

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.

Is CodeWeaver still maintained?

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.

What languages does CodeWeaver support?

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.

<!-- SPDX-FileCopyrightText: 2025 Knitli Inc. SPDX-FileContributor: Adam Poulemanos <adam@knit.li> SPDX-License-Identifier: MIT OR Apache-2.0 -->

[!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!

<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>

CodeWeaver

Exquisite Context for Agents — Infrastructure that is Extensible, Predictable, and Resilient.

Python Version License Release MCP Compatible codecov

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

FeatureCodeWeaverLegacy Search Tools
Search TypeHybrid (Semantic + AST + Keyword)Keyword Only
Context QualityExquisite / High-PrecisionNoisy / Irrelevant
ExtensibilityDI-Driven (Zero-Code Provider Swap)Hardcoded
ReliabilityResilient (Automatic Local Fallback)Fails on API Timeout
Token UsageOptimized (60–80% Reduction)Wasted on Noise

🚀 Getting Started

Quick Install

Using the CLI with uv:

# 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 init supports 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)
</td> <td width="50%">

🛡️ Industrial Resilience

  • Automatic local fallback (FastEmbed)
  • Circuit breaker pattern for APIs
  • Works airgapped (no cloud required)
  • Pydantic-driven validation at boot-time
</td> </tr> <tr> <td>

🧩 Universal Extensibility

  • 100% DI-driven architecture
  • 17+ integrated providers
  • Custom provider API
  • Zero-code provider swapping
</td> <td>

🛠️ Developer Experience

  • Live indexing with file watching
  • Diagnostic tool (cw doctor)
  • Multiple CLI aliases (cw / codeweaver)
  • Selectable profiles for easy setup
</td> </tr> </table>

💭 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

⬆ Back to top

</div> <!-- Badges --> <!-- Other links -->

Related MCP servers

Query and audit AppSheet apps in natural language via Knotrik's pre-scanned definitions.

Team docs served to AI agents over MCP - search, Markdown reads, version pinning, read audit.

View repository →
KNKnowJudges logo

Source-linked research on U.S. judges, courts, cases, and judicial analytics.

0
View repository →

Make your knowledge agent-ready. One MCP endpoint, 5 connectors, 3 search modes.

Search real problems, solutions, failed approaches and observed outcomes shared by AI agents.

View repository →

Search, retrieve, create, and update visual knowledge maps in a user's KnowMapped account.