- Home
- MCP servers
- Context Lens
Context Lens
- typescript
12
GitHub Stars
typescript
Language
6 months ago
First Indexed
2 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Context Lens is a self-contained MCP server that turns your local content into a semantic, searchable knowledge base for AI assistants. It uses a built-in serverless vector store to enable fast, offline semantic search over code, documents, and text files, while keeping all data private on your machine.
How to use
You connect an MCP client to the Context Lens server to index content and run semantic queries. You index local files, GitHub repositories, or direct URLs, then ask questions like “How does authentication work in this project?” to get concept-focused results that go beyond exact keyword matches.
Key actions you’ll perform with an MCP client:
- Add documents from local folders, URLs, or GitHub repositories to the knowledge base
- Run semantic searches over indexed content to find conceptually relevant chunks
- List indexed documents and review metadata
- Remove documents or clear the entire knowledge base
- Use the same server from different MCP clients for convenience and consistency
How to install
Follow these steps to set up an MCP client to run Context Lens within your workflow. You will create a small configuration that points your MCP client at the Context Lens server, then reload or start the server from your client.
{
"mcpServers": {
"context_lens": {
"command": "uvx",
"args": ["context-lens"]
}
}
}
Place the configuration into your MCP client’s expected path for server definitions. Use the following example blocks as guidance for common clients.
{
"mcpServers": {
"context_lens": {
"command": "uvx",
"args": ["context-lens"]
}
}
}
Notes and considerations
Context Lens is designed to run locally with zero cloud dependencies. All processing, embedding, and storage happen on your machine, provided by LanceDB for vector storage.
You don’t need API keys. The embedding model and vector database operate entirely offline once the server is running.
For different MCP clients, you generally use the same local Context Lens server configuration and simply point your client to the same mcp.json setup. If you use multiple clients, you can reload or restart the server instance from any client that supports MCP server management.
Tooling overview and usage patterns
In practical usage you typically index content, then issue semantic queries. You can: add documents, search for relevant chunks, list indexed documents, inspect document metadata, and remove content or wipe the knowledge base when needed.
Security and privacy considerations
All processing happens locally. There is no external API usage or data transmission to remote services, so your content remains private on your device.
Performance and storage notes
The system uses a local embedding model with 384-dimensional vectors and LanceDB as a serverless, file-based store. The storage footprint grows with the number of chunks indexed, but the model itself is kept on disk and loaded on first use.
Available tools
add_document
Add files, folders, or URLs to the knowledge base for indexing and semantic search.
search_documents
Perform semantic searches over indexed content to retrieve conceptually relevant chunks.
list_documents
Browse the indexed documents and view metadata for each item.
get_document_info
Fetch metadata about a specific indexed document.
remove_document
Remove a specific document from the knowledge base.
clear_knowledge_base
Remove all documents from the knowledge base, resetting the server.