Omniscience
Enables LLMs to efficiently navigate large codebases by providing surgical access to specific code symbols via semantic search and call-graph queries.
README
<div align="center"> <img src="https://img.shields.io/badge/Status-Beta-blue?style=for-the-badge" alt="Status Badge"/> <img src="https://img.shields.io/badge/Python-3.12%2B-green?style=for-the-badge&logo=python" alt="Python Badge"/> <img src="https://img.shields.io/badge/License-MIT-lightgray?style=for-the-badge" alt="License Badge"/>
<h1 align="center">Project Omniscience</h1> <p align="center"> <strong>A Dual-Brain MCP Server for Surgical Code Intelligence</strong> </p> </div>
Omniscience is a highly optimized Model Context Protocol (MCP) server designed to give Large Language Models (LLMs) token-efficient, surgical access to massive codebases. Instead of flooding the LLM's context window with entire repositories, Omniscience uses a sophisticated Dual-Brain architecture to find exactly what the LLM needs—and absolutely nothing more.
🧠 The Dual-Brain Architecture
graph TD
A[Codebase] -->|Real-time watcher| B(Omniscience Scanner)
B -->|Code| C{Dual-Brain Parser}
subgraph Structural Brain
C -->|AST Parsing| D[Tree-Sitter]
D -->|Function Definitions & Calls| E[(SQLite Graph DB)]
end
subgraph Semantic Brain
C -->|Text/Code| F[Voyage-4-nano]
F -->|Local Embeddings| G[(LanceDB Vector DB)]
end
E -.->|Graph Query| H[MCP Client]
G -.->|Semantic Search| H
1. Structural Brain (Tree-sitter)
Parses the AST (Abstract Syntax Tree) of your codebase in real-time. It maps out exact file locations, boundary lines for functions/classes, and automatically generates a complete Call-Graph (Caller -> Callee relationships) stored in a local SQLite database.
2. Semantic Brain (LanceDB & Voyage-4-nano)
Generates and stores high-quality semantic embeddings of every code symbol completely locally. Allows the LLM to search for abstract concepts ("how does the auth routing work?") using lightning-fast hybrid search.
📖 How to talk to your AI?
If you're wondering how exactly you should prompt your AI (Claude, Antigravity, Cursor) to make use of these superpowers, check out our Prompt Library (PROMPTS.md) for copy-pasteable examples!
🛠️ Exposed MCP Tools
The server exposes powerful tools to the AI, allowing it to navigate your project like a senior engineer.
| Tool | Description | Token Impact |
|---|---|---|
🔍 semantic_search |
Finds relevant code symbols based on a natural language query or keywords. | Low |
🕸️ graph_query |
Returns the blast radius of a specific symbol based on the AST Call-Graph. | Low |
📖 surgical_read |
Extracts only the exact code snippet for a single function or class. | Massive Savings |
🏗️ apply_surgical_patch |
Replaces an exact code symbol with new code and triggers a background re-index. | Low |
🔄 rebuild_index |
Manually triggers a complete re-indexing of the entire workspace. | None |
🚀 Installation & Setup
Omniscience is designed to be ridiculously fast. We use uv for lightning-fast dependency resolution.
# 1. Clone the repository
git clone https://github.com/FreakyLetsFail/mcp-omniscience.git
cd mcp-omniscience
# 2. Run the Initialization Script (Downloads model, syncs env)
./init.sh
📦 Standalone CLI Indexer (For Large Repositories)
To prevent your IDE and OS from freezing when opening a massive repository for the first time, Omniscience comes with a standalone CLI tool. It builds the AST Call-Graph and Semantic Vector Database efficiently in the background before you even start your AI.
./index.sh index /path/to/your/large/project
This creates a .omniscience folder directly inside your project containing the LanceDB and SQLite databases.
🔌 IDE Integration
Add Omniscience to your MCP client configuration (mcp_config.json, claude_desktop_config.json, etc.):
{
"mcpServers": {
"omniscience": {
"command": "/path/to/mcp-omniscience/run_server.sh",
"args": []
}
}
}
[!TIP] No initialization prompt required! When the MCP server starts in a new
WORKSPACE_DIR, it automatically builds the vector and graph databases in the background.
💰 Token Cost Analysis
Why use Omniscience over traditional whole-file reading?
- Full File Read (server.py): ~911 Tokens
- Omniscience Surgical Read (1 function): ~117 Tokens
- Context Window Saved: 87.16% per interaction!
By isolating exactly what is needed, the LLM hallucinates less, replies faster, and drastically reduces API costs.
<div align="center"> <p>Built with ❤️ for the AI Engineering Community.</p> </div>
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。