Context Lens

v1.0.0Knowledge & Memorystable

Semantic search knowledge base for MCP-enabled AI assistants. Index local files or GitHub repos, query with natural language. Built on LanceDB vector storage. Works with Claude Desktop, Cursor, and other MCP clients.

ai-assistantanthropicanthropic-claudeclaudeembedding
Share:
22
Stars
0
Downloads
0
Weekly
0/5

What is Context Lens?

Context Lens is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to semantic search knowledge base for mcp-enabled ai assistants. index local files or github repos, query with natural language. built on lancedb vector storage. works with claude desktop, cursor, and ot...

Semantic search knowledge base for MCP-enabled AI assistants. Index local files or GitHub repos, query with natural language. Built on LanceDB vector storage. Works with Claude Desktop, Cursor, and other MCP clients.

This server falls under the Knowledge & Memory category on MCPgee, the world's largest MCP server directory with 33,000+ servers.

Features

  • Semantic search knowledge base for MCP-enabled AI assistants

Use Cases

Semantic knowledge base search
GitHub and local file indexing
LanceDB vector storage
cornelcroi

Maintainer

LicenseMIT
Languagepython
Versionv1.0.0
UpdatedMay 6, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx context-lens

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

How to Set Up and Use Context Lens

Context Lens is a self-contained MCP server that turns any local files or public GitHub repositories into a semantic knowledge base your AI assistant can search with natural language. It uses the sentence-transformers/all-MiniLM-L6-v2 embedding model to convert content into 384-dimensional vectors stored in a serverless LanceDB database on disk, with no cloud services or external API keys required. AI assistants connected via MCP can index entire codebases or documentation sets and answer questions based on meaning rather than keyword matching — finding content about 'authentication' even when files use terms like 'login', 'credentials', or 'OAuth'.

Prerequisites

  • Python 3.11 or higher
  • uvx (from the uv package manager) for zero-config installation — install uv with `pip install uv`
  • An MCP client: Claude Desktop, Cursor, Kiro IDE, or any MCP-compatible assistant
  • Approximately 90 MB of disk space for the embedding model download on first run
  • No external API keys or cloud accounts required
1

Install uvx

Context Lens is published to PyPI as the context-lens package and runs via uvx with no manual installation. First ensure uv is available.

pip install uv
# Verify
uvx --version
2

Configure your MCP client

Add Context Lens to your MCP client configuration. The uvx command automatically downloads and runs the package. For Claude Desktop, edit claude_desktop_config.json.

{
  "mcpServers": {
    "context-lens": {
      "command": "uvx",
      "args": ["context-lens"]
    }
  }
}
3

Restart your MCP client

Restart Claude Desktop or reload MCP servers in your client. On first run, Context Lens downloads the ~90 MB sentence-transformers/all-MiniLM-L6-v2 embedding model automatically.

4

Index a local directory

Ask your AI assistant to index a local folder. Context Lens uses language-aware parsers (AST for Python, structural parsing for JSON, header-based splitting for Markdown) to create meaningful chunks rather than arbitrary character splits.

5

Index a GitHub repository

Ask your AI assistant to add a public GitHub repository to the knowledge base. Context Lens clones and indexes it automatically.

6

Search the knowledge base

Ask natural language questions. Context Lens converts your question to a vector and finds semantically similar chunks using cosine similarity across the LanceDB index.

Context Lens Examples

Client configuration

Standard uvx-based configuration that works with Claude Desktop, Cursor, Kiro IDE, and any MCP-compatible client.

{
  "mcpServers": {
    "context-lens": {
      "command": "uvx",
      "args": ["context-lens"],
      "autoApprove": ["list_documents", "search_documents"]
    }
  }
}

Prompts to try

These prompts demonstrate indexing content and then querying it semantically via the MCP tools.

- "Add https://github.com/fastapi/fastapi to the knowledge base"
- "Index my local project at /Users/me/projects/myapp"
- "How does FastAPI handle dependency injection?"
- "Find all code related to authentication and access control in the indexed documents"
- "List all documents currently in the knowledge base"
- "Search for error handling patterns across the indexed repositories"

Troubleshooting Context Lens

First run is slow or appears to hang

On first use, Context Lens downloads the sentence-transformers/all-MiniLM-L6-v2 embedding model (~90 MB). This is a one-time download. Wait for the download to complete before querying. Subsequent starts are fast.

uvx command not found

Install uv with `pip install uv` or via the official installer: `curl -LsSf https://astral.sh/uv/install.sh | sh`. After installation, ensure the uv bin directory is in your PATH and restart your terminal.

Search results are irrelevant or the wrong files are returned

Semantic search works best with natural language queries that describe the concept you are looking for. Avoid very short or highly technical queries (e.g. single function names) — use describe-what-it-does phrasing instead. If results are still poor, try re-indexing the content with `Add [path] to the knowledge base` to refresh the vectors.

Frequently Asked Questions about Context Lens

What is Context Lens?

Context Lens is a Model Context Protocol (MCP) server that semantic search knowledge base for mcp-enabled ai assistants. index local files or github repos, query with natural language. built on lancedb vector storage. works with claude desktop, cursor, and other mcp clients. It connects AI assistants to external tools and data sources through a standardized interface.

How do I install Context Lens?

Follow the installation instructions on the Context Lens GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.

Which AI clients work with Context Lens?

Context Lens works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.

Is Context Lens free to use?

Yes, Context Lens is open source and available under the MIT license. You can use it freely in both personal and commercial projects.

Browse More Knowledge & Memory MCP Servers

Explore all knowledge & memory servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.

Quick Config Preview

{ "mcpServers": { "context-lens": { "command": "npx", "args": ["-y", "context-lens"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

Ready to use Context Lens?

Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.

33,000+ ServersFree & Open SourceStep-by-Step Guides