analyze_repositoryLABSCO SUMMARY
It tells you why a result ranked where it did.
The scoring breakdown — textual against semantic against functional — is the part that makes the bias claim checkable rather than a slogan: you can see when a hit is winning on comments and discount it yourself. Updates are agent-driven by design rather than filesystem-watched, which is what lets the whole thing run in a container: after your assistant changes a file, it calls the update tool, and the index stays honest.
What it is
A code retrieval server implementing the SACL framework, aimed at one specific failure: search systems over-weight docstrings, comments and variable names, so nicely-commented code outranks the function that actually does the job. It detects that textual bias, augments the code's semantic representation, and reranks on functional relevance — then returns results with their related components from a knowledge graph.
What you get
query_coderuns bias-aware search with a scoring breakdown across textual, semantic and functional signals, plus a ranking explanationquery_code_with_contextadds relationship context — related components, dependency chains and a relationship graphanalyze_repositoryperforms the initial full scan, with anincrementaloption for later passesget_relationshipsmaps a file's imports, exports, calls, extends, implements, uses and depends_on links to a depth you chooseget_file_contextreturns the surrounding context for one fileupdate_fileandupdate_filesre-analyse after changes, one file or a batchget_bias_analysisreports where textual bias was detected, andget_system_statsreports the state of the index
Requirements
Node.js 18+, a Neo4j instance for the knowledge graph, and an OpenAI API key — OPENAI_API_KEY is required, with NEO4J_URI, NEO4J_USER and NEO4J_PASSWORD alongside it. npm install locally, or bring the whole stack up with the supplied docker-compose. Embeddings are billed against your OpenAI key, and repository analysis embeds the codebase, so the first full scan is where the cost lands.
Setup effort
Build from source — git clone https://github.com/ulasbilgen/sacl
USE CASES
Finding the function that does the thing, not the one that describes it
Search with functional relevance weighted above documentation, and read the score breakdown.
Understanding a result before you change it
Search with relationship context so related components and dependency chains come back too.
Assessing the blast radius of an edit
Map what a file imports, calls, extends and depends on, to the depth you need.
Keeping the index accurate while an agent works
Push the changed files back after each edit, singly or in a batch.
9 tools
Listed in project docs. Your client may show a different list.
query_codequery_code_with_contextupdate_fileupdate_filesget_relationshipsget_file_contextget_bias_analysisget_system_statsBEFORE YOU INSTALL
What to know first
Tools you get
9 tools named in the project's documentation.
Requires
- Node.js 18+
- A Neo4j database
- OPENAI_API_KEY in your environment
Where it runs
All 3 documented setups run the server on your machine.
INSTALLATION
Connect your client
You clone and build this one yourself.
Server setup
git clone https://github.com/ulasbilgen/sacl
cd sacl
npm install
npm run build
cp .env.example .envEdit .env with your settings: OPENAI_API_KEY, NEO4J_URI, NEO4J_USER and NEO4J_PASSWORD
MCP Clients
Claude Desktop — local build
{
"mcpServers": {
"sacl": {
"command": "node",
"args": [
"<YOUR_PATH_TO_SACL>/dist/index.js"
],
"env": {
"OPENAI_API_KEY": "<YOUR_OPENAI_API_KEY>",
"NEO4J_URI": "bolt://localhost:7687",
"NEO4J_USER": "neo4j",
"NEO4J_PASSWORD": "password"
}
}
}
}Claude Desktop — Docker
{
"mcpServers": {
"sacl": {
"command": "docker",
"args": [
"exec",
"-i",
"sacl_sacl-mcp-server_1",
"node",
"/app/dist/index.js"
],
"env": {
"OPENAI_API_KEY": "<YOUR_OPENAI_API_KEY>",
"SACL_REPO_PATH": "/workspace",
"NEO4J_URI": "bolt://neo4j:7687",
"NEO4J_USER": "neo4j",
"NEO4J_PASSWORD": "<YOUR_NEO4J_PASSWORD>"
}
}
}
}This card runs inside the container Docker Compose starts: from your clone, with .env filled in, run docker-compose up -d first (the README's Docker route; it also starts Neo4j). sacl_sacl-mcp-server_1 is the container name that setup produces with docker-compose — if docker ps shows a different name for the sacl-mcp-server service, use that.
Cursor — Docker
{
"mcpServers": {
"sacl": {
"command": "docker",
"args": [
"exec",
"-i",
"sacl_sacl-mcp-server_1",
"node",
"/app/dist/index.js"
],
"cwd": "/workspace"
}
}
}This card runs inside the container Docker Compose starts: from your clone, with .env filled in, run docker-compose up -d first (the README's Docker route; it also starts Neo4j). sacl_sacl-mcp-server_1 is the container name that setup produces with docker-compose — if docker ps shows a different name for the sacl-mcp-server service, use that.