uni-kb
Parses Cocos game source code to extract frontend components and their dependencies, enabling code exploration and documentation.
Parses Express.js route definitions to extract endpoints, HTTP methods, paths, and middleware chains for code understanding and spec generation.
Parses NestJS decorators to extract endpoints, HTTP methods, paths, and middleware chains for code understanding and spec generation.
Parses Node.js/Express/NestJS source code to extract structured knowledge including routes, services, models, and middleware.
Parses Sequelize model definitions to extract entities, fields, types, and relationships for data model understanding.
Parses Spring annotations to extract REST endpoints, HTTP methods, paths, parameters, and response types from controllers, as well as business logic from services, entities, and MyBatis mappers.
Parses TypeORM model definitions to extract entities, fields, types, and relationships for data model understanding.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@uni-kbgenerate API contract for the controller layer"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
uni-kb — Knowledge Base Library
Reusable data layer for codebase understanding. Parses source code into structured knowledge, indexes it for search, and serves it via MCP.
Can be used standalone by human developers or consumed by uni-dev agent system.
Architecture
Source Code
│
▼
┌──────────────────────────────────────────┐
│ tree-sitter Parsers (plugin system) │
│ Java/Spring · Node.js/Express/NestJS │
└───────────────┬──────────────────────────┘
▼ structured JSON
┌──────────────────────────────────────────┐
│ Storage Layer │
│ ┌──────────┬──────────┬───────────────┐ │
│ │ SQLite │ ChromaDB │ NetworkX │ │
│ │ 8 tables │ 14 idx │ Code Graph │ │
│ └──────────┴──────────┴───────────────┘ │
└───────────────┬──────────────────────────┘
▼
┌──────────────────────────────────────────┐
│ Spec Generators (6) │
│ API Contract · Business Logic · Models │
│ Auth Matrix · Config · Migration │
└───────────────┬──────────────────────────┘
▼
┌──────────────────────────────────────────┐
│ MCP Server (20 tools, 5 categories) │
└──────────────────────────────────────────┘Related MCP server: code-graph-mcp
Phase 1: Parser Extension System
Goal: Abstract plugin interface + registry + Java parser
1.1 Base Plugin Interface (parsers/base.py)
class ParserPlugin(ABC):
@abstractmethod
def language(self) -> str: ...
@abstractmethod
def detect(self, file_path: str) -> bool: ...
@abstractmethod
def parse(self, file_path: str, source: str) -> ParseResult: ...1.2 Plugin Registry (parsers/registry.py)
Discovers plugins via Python entry points (pyproject.toml [project.entry-points."uni_kb.parsers"]). Loads on demand.
1.3 Java Parser (parsers/java/)
Four sub-parsers using tree-sitter-java:
Parser | Target | Extracts |
|
| Endpoints, HTTP methods, paths, params, response types |
|
| Business logic structure, dependencies |
|
| Entities, fields, types, constraints, relationships |
| MyBatis XML | Custom SQL queries, result maps |
Output: ParseResult with standardized JSON matching SQLite schema.
Phase 2: Storage Layer
2.1 SQLite Store (store/sqlite_store.py)
8 tables initialized on uni-kb init --project ./:
Table | Purpose |
| Top-level source modules |
| Classes / components |
| Methods / functions |
| REST endpoints |
| Database tables |
| Table columns |
| Vue/Cocos components |
| Permission annotations |
2.2 ChromaDB Indexes (store/chroma_indexes.py)
14 named collections with embedded mode (persisted in .uni-kb/chroma/):
# | Index | Content |
1 |
| Java controller source |
2 |
| Java service source |
3 |
| Java entity source |
4 |
| Mapper XML source |
5 |
| Vue admin source |
6 |
| Cocos game source |
7 |
| Generated OpenAPI specs |
8 |
| Generated method docs |
9 |
| Generated entity specs |
10 |
| Permission matrix |
11 |
| Config catalog |
12 |
| Table DDL |
13 |
| Documentation |
14 |
| Per-module checklists |
2.3 Code Graph (store/code_graph.py)
NetworkX directed graph.
Nodes (8 types): Module, Class, Method, APIEndpoint, DBTable, DBColumn, VueComponent, CocosComponent
Edges (11 + 3 migration): HAS_METHOD, CALLS, INJECTS, IMPLEMENTS, EXTENDS, ROUTES_TO, MAPS_TO, FK_TO, API_CALLER, PERMITS, IMPORTS + MIGRATES_TO, BLOCKED_BY, VERIFIED_AGAINST
Phase 3: Node.js Parser
1.4 Node.js Parser (parsers/nodejs/)
Four sub-parsers using tree-sitter-typescript:
Parser | Target | Extracts |
| Express | Endpoints, HTTP methods, paths, middleware chains |
| Service classes | Business logic structure |
| Sequelize / TypeORM models | Entities, fields, types, relationships |
| Auth middleware | Permission chains, guards |
Phase 4: Spec Generators + MCP
4.1 Generators (generators/)
6 generators, 4 exposed as direct MCP tools:
Generator | Input | Output | MCP Tool |
| Controller/Route AST | OpenAPI 3.0 YAML |
|
| Service AST | Markdown pseudo-code |
|
| Entity + DB schema | YAML model spec | → |
| Permission annotations | Permission matrix YAML |
|
| YAML/.env files | Config catalog YAML | → |
| Module + dep graph | Prioritized checklist MD |
|
4.2 MCP Server (mcp_server.py)
20 tools in 5 categories:
Category | Tools |
Code Exploration |
|
Spec Retrieval |
|
Data Model |
|
Auth & Config |
|
Operations |
|
Dependencies
chromadb
networkx
tree-sitter
tree-sitter-java
tree-sitter-typescript
sqlite-utils
pyyaml
mcp>=1.0.0CLI Usage
# Initialize knowledge base for a project
uni-kb init --project /path/to/project
# Parse and index source code
uni-kb index --project /path/to/project
# Start MCP server
uni-kb serve --project /path/to/project --port 9020This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/admin-init/uni-kb'
If you have feedback or need assistance with the MCP directory API, please join our Discord server