
A directory listing describing a cancellation-letter and mailing-address service. The configured public GitHub repository returned 404 during source verification.

A Model Context Protocol server that analyzes a user-specified local code repository using Gemini and generates codebase context for AI clients.
Kontxt MCP Server is cataloged as an MCP server attributed to reyneill. A Model Context Protocol server that analyzes a user-specified local code repository using Gemini and generates codebase context for AI clients. It is categorized under developer tools. See the capability inspector for recorded interfaces and their independent review status; consult upstream documentation for the current interface.
Installation configuration is not reviewed. No executable setup is offered for this entry; inspect the source repository before proceeding.
Catalog license label: Not specified. Check the source repository's current license and terms before using, modifying or distributing this software.
能力定义尚未审核。未核验的采集内容不会作为可信接口展示。
暂无可展示的已审核记录。这不表示上游不支持此能力。
暂无可展示的已审核记录。这不表示上游不支持此能力。
暂无可展示的已审核记录。这不表示上游不支持此能力。
Email delivery is not connected. This page does not collect email addresses or create subscriptions.
Browse the registry for current listings instead.
Reviews for Kontxt MCP Server are not available yet
Review publishing and storage are not connected. This page does not collect or publish ratings or comments, including after sign-in.
No. The server mentions referenced files to Gemini but does not automatically read or include their contents; Gemini decides which files to read using its tools.
The server logs a message, keeps running with a heuristic token estimator, and periodically retries loading the tokenizer, switching automatically once access is granted.
README.md · 25b3dec4ac08 · 采集于 2026-11-13 10:13:35 UTC
保留上游原文,不做 AI 改写。为安全起见过滤脚本、表单和不安全链接。
当前显示最后一次成功采集的文档快照,请以来源页面为准。
A Model Context Protocol (MCP) server that tries to solve condebase indexing (until agents can).
get_codebase_context) tool for AI clients (like Cursor, Claude Desktop).list_repository_structure, read_files, grep_codebase) to understand the code.python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
pip install -r requirements.txt
tree: Ensure the tree command is available on your system.
brew install treesudo apt update && sudo apt install tree.env.example to .env..env and add your Google Gemini API Key:
GEMINI_API_KEY="YOUR_ACTUAL_API_KEY"
--gemini-api-key command-line argument.By default, the server runs in SSE mode, which allows you to:
Run the server:
python kontxt_server.py --repo-path /path/to/your/codebase
PS: you can use pwd to list the project path
The server will start on http://127.0.0.1:8080/sse by default.
For additional options:
python kontxt_server.py --repo-path /path/to/your/codebase --host 0.0.0.0 --port 6900
The server can be stopped by pressing Ctrl+C in the terminal where it's running. The server will attempt to close gracefully with a 3-second timeout.
Once your server is running, you can connect Cursor to it by editing your ~/.cursor/mcp.json file:
{
"mcpServers": {
"kontxt-server": {
"serverType": "sse",
"url": "http://localhost:8080/sse"
}
}
}
PS: remember to always refresh the MCP server on Cursor Settings or other client to connect to the MCP via sse
If you prefer to have the client start and manage the server process:
python kontxt_server.py --repo-path /path/to/your/codebase --transport stdio
For this mode, configure your ~/.cursor/mcp.json file like this:
{
"mcpServers": {
"kontxt-server": {
"serverType": "stdio",
"command": "python",
"args": ["/absolute/path/to/kontxt_server.py", "--repo-path", "/absolute/path/to/your/codebase", "--transport", "stdio"],
"env": {
"GEMINI_API_KEY": "your-api-key-here"
}
}
}
}
--repo-path PATH: Required. Absolute path to the local code repository to analyze.--gemini-api-key KEY: Google Gemini API Key (overrides .env if provided).--token-threshold NUM: Target maximum token count for the context. Allowed values are:
--gemini-model NAME: Specific Gemini model to use (default: models/gemini-2.5-flash-preview-04-17).--tokenizer-model NAME: Hugging Face tokenizer id for token estimation (default: google/gemma-7b; override via KONTXT_TOKENIZER_MODEL).--transport {stdio,sse}: Transport protocol to use (default: sse).--host HOST: Host address for the SSE server (default: 127.0.0.1).--port PORT: Port for the SSE server (default: 8080).--cors-origins ORIGINS: Comma-separated list of allowed CORS origins. If omitted, defaults to loopback only.--cors-credentials: Allow credentials for CORS (disabled by default).For security, wildcard CORS is not used. By default, only loopback origins are allowed:
http://127.0.0.1, http://localhost, and the bound host:port.To allow specific web clients during development, pass explicit origins or use an env var:
python kontxt_server.py \
--repo-path /path/to/your/codebase \
--cors-origins http://localhost:3000,http://127.0.0.1:5173
# or via environment variable
KONTXT_CORS_ORIGINS="http://localhost:3000,http://127.0.0.1:5173" \
python kontxt_server.py --repo-path /path/to/your/codebase
Notes:
GET, OPTIONS. Headers: all. Credentials: off unless --cors-credentials is set.This server uses the google/gemma-7b tokenizer to estimate tokens. The model is gated by Google on Hugging Face.
What happens if you don't have access yet:
How to gain access (free, ~2 minutes):
huggingface-cli login (or set HF_TOKEN).Configuration:
--tokenizer-model or KONTXT_TOKENIZER_MODEL: use a different HF tokenizer id if desired.KONTXT_TOKENIZER_RELOAD_INTERVAL (seconds, default 60): how often the server re-attempts tokenizer loading.Example queries:
PS: you can further specify the agent to use the MCP tool if it's not using it: "What is the last word of the third codeblock of the auth file? Use the MCP tool available."
Your referenced files/context in your queries are included as context for analysis:
The server will mention these files to Gemini but will NOT automatically read or include their contents. Instead, Gemini will decide which files to read using its tools based on the query context.
This approach allows Gemini to only read files that are actually needed and prevents the context from being bloated with irrelevant file content.
The server tracks token usage across different operations:
This information is logged during operation, helping you monitor API usage and optimize your queries.
PD: want the tool to improve? PR's are open.
Claim this server with your GitHub account to request manual ownership verification.
Link to the catalog listing for Kontxt MCP Server from your README. This badge does not certify ownership, compatibility or security.
[](https://awesome-mcp.com/servers/kontxt)Public repository statistics could not be verified. Check the configured source address; unavailable counts are not zero.
来源、范围和时段分别列出;不相加,不代表安装人数、活跃用户或安全审核。
尚无已审核的包 / 镜像标识,暂不展示下载统计。
Alternative and complementary servers in the same category

A directory listing describing a cancellation-letter and mailing-address service. The configured public GitHub repository returned 404 during source verification.

A hosted MCP service for browsing and searching through Singapore mobile-network proxies.

A directory listing describing a Markdown-to-PDF service. The configured public GitHub repository returned 404 during source verification.