golestan_code_mcp
Click on "Deploy 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., "@golestan_code_mcpwho calls url_for in the flask repo?"
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.
golestan_code_mcp
A code context MCP server backed by Oracle AI Database 26ai. It indexes codebases into the database, cut at function and class boundaries. It searches them by name and by meaning, follows their calls, keeps a wiki page about each module, and remembers what earlier sessions learned. It serves all of it to AI coding tools such as Claude Code, Codex and Cursor over the Model Context Protocol (MCP), so an agent can find and understand code without reading whole files.
The idea was initiated by the article Coding Challenge #139 - Code Context
from Coding Challenges. The project was developed with the help of GitHub Spec Kit:
every feature went through a specification, a plan and a task list, kept in specs/.
It is free to use, change and share under the MIT License.
Features
Structure-aware indexing of 13 languages (Python, Go, JavaScript, TypeScript, C#, C, C++, Java, Kotlin, Rust, PHP, Ruby, Swift): one chunk per definition, with its exact lines and documentation. Re-ingesting only reads what changed.
Hybrid search: keyword and semantic matching fused in one database index, with each result's scores shown.
Code graph: callers, callees and the transitive impact of a change, as a SQL property graph.
Module wiki: one page per module, written from the index, with citations that follow the code and pages that are rewritten when it changes.
Agent memory: every tool call is recorded and distilled into facts a new session can recall.
Usage feedback: results that clients used rank a little higher, with a bounded, decaying boost.
Private by default: embeddings are computed inside the database, so no source code is sent out to be indexed and no API key is needed.
Related MCP server: Graft
Quick start
You need Docker (tested with Rancher Desktop) with about 12 GB free, uv and git. The commands are run from the project root; Setup has the details and the PowerShell variants.
1. Configure and start the database. Copy .env.example to .env and replace both passwords. Then:
docker compose up -d
uv sync
uv run golestan-check-db # waits for the first start, then checks the connection2. Index a repository. Indexing explains what is read and how re-ingesting works.
uv run golestan-clone-samples # optional: flask and gin, into ../ccctx-repos
uv run ccctx repo add ../ccctx-repos/flask --name flask
uv run ccctx model load # once: the embedding model and the search index
uv run ccctx ingest flask3. Search it. See Search and Code relationships.
uv run ccctx search "how are incoming requests routed to handlers"
uv run ccctx callers url_for
uv run ccctx wiki build --repo flask4. Connect an AI coding tool. Install the command once, then register it. For Claude Code:
uv tool install --editable .
claude mcp add ccctx -- ccctx mcpAny MCP client can start ccctx mcp the same way. The MCP server has the details.
Upgrading from 1.4.1 or earlier. The source moved from src/golestan_code_mcp/ to src/, so an existing install must be refreshed once: close the MCP clients that run ccctx (on Windows they keep ccctx.exe locked), then run uv sync and uv tool install --editable . --reinstall. Registrations stay as they are.
5. Run the tests. Database tests are skipped, with a reason, when the database is down.
uv run pytestMCP tools
Tool | Answers |
| Find code, wiki pages and remembered facts by name or by meaning |
| The full source of a definition |
| What calls a function or method |
| What a function or method calls |
| What could break if a definition changes |
| What a module does, from its wiki page |
| The indexed repositories |
| What earlier sessions worked out |
| Record that a result helped |
Parameters, results and the change history are in The MCP server.
Documentation
Setup: prerequisites, the database, installing, checking that data persists
Indexing: registering and ingesting codebases, the languages and their limits
Search: search modes and ranking, usage feedback, evaluating retrieval
Code relationships: callers, calls and impact
Module wiki: the module pages, their citations and how they stay current
Agent memory: runs, facts, recall and the optional distilling model
The MCP server: the tools, registering clients, the change history
CLAUDE.md: commands, conventions and the file layout, for AI coding agents and contributors
License
MIT, see LICENSE.
This server cannot be deployed
Maintenance
Related MCP Connectors
Codebase graphs, caller impact analysis, and recorded project context for AI coding agents.
Deterministic context layer for your codebase: change impact, blast radius, answers with receipts.
Search indexed code, trace dependencies, assess change impact, and recall repository memory.
Shared memory for coding agents. Stop re-explaining your codebase every session.
Related MCP Servers
- AlicenseNot gradedqualityAmaintenanceLocal-first code indexer that provides deep code understanding for Claude and other LLMs with symbol/text search across 48+ languages, semantic search capabilities, and real-time index updates through the Model Context Protocol.58MIT
- AlicenseBqualityDmaintenanceLocal-first codebase context engine that parses code into a ranked dependency graph and serves it to AI tools via MCP for deep structural understanding.59 npm1MIT
- AlicenseNot gradedqualityBmaintenanceTurns a codebase into a queryable graph with semantic search, call graphs, and control/data flow analysis, served to AI coding agents via the Model Context Protocol.118 npmMIT
- AlicenseNot gradedqualityCmaintenanceProvides intelligent code indexing with 15 MCP tools for symbol extraction, hybrid search (FTS5+vector), call graphs, and incremental indexing of local folders and remote repos, enabling token-efficient code retrieval for AI agents.3MIT