0.0.3 • Published 6 months ago
@inkr/codebase-mcp v0.0.3
@inkr/codebase-mcp
An MCP (Model Context Protocol) server designed to provide tools for interacting with codebases, leveraging generative AI capabilities. This server allows AI agents or other MCP clients to ask questions about a specified codebase path.
✨ Features
- Codebase Interaction: Provides an MCP tool (
ask_codebase) to query information about codebases. - Generative AI Integration: Utilizes
@google/genaifor processing and answering codebase-related questions. - Stdio Transport: Communicates using the standard MCP stdio transport mechanism.
📚 Table of Contents
🚀 Usage
This project runs as an MCP server. It's typically invoked by an MCP client or controller.
Connecting an MCP Client
Follow the configurations in these files, remember to update env inside with your preference:
- Visual Studio Code: .vscode/mcp.json
- Claude: .mcp.json
- Cursor: .cursor/mcp.json
- Roo Code: .roo/mcp.json
Environment Variables
| Variable | Description | Required | Default |
|---|---|---|---|
GEMINI_API_KEY | Your Gemini API key | Yes | |
MODEL | The model to use for codebase analysis | No | gemini-2.0-flash |
CODEBASE_PATH | The path to the codebase | No | (current working directory) |
Tools
Once connected, the client can invoke the tools provided by this server.
ask_codebase
| Argument | Description | Required | Default |
|---|---|---|---|
question | The question to ask about the codebase | Yes | |
path | The path of the file or directory to query, relative to CODEBASE_PATH | No | (Use CODEBASE_PATH) |
⚙️ Development
Prerequisites
- Bun
- Git
Steps
Install dependencies:
bun installConfiguration (if necessary):
- Check if any specific environment variables are required for
@google/genai(e.g., API keys). Create a.envfile if needed. (Further investigation might be needed to confirm required variables).
- Check if any specific environment variables are required for
Run:
- In IDEs: Reload window and check if the MCP is connected
- Manually: Run
./runin your terminal
💻 Technology Stack
- Runtime: Bun / Node.js
- Language: TypeScript
- Core Libraries:
- @modelcontextprotocol/sdk: For MCP server implementation.
- @google/genai: For generative AI features.
- Zod: For schema validation.
- Development: @types/bun, TypeScript
📜 License
This project is licensed under the MIT License - see the LICENSE file for details. Copyright (c) 2025 INKR Global
📧 Contact
- Khoa Nguyen @ khoa@inkr.com
- INKR Global @ inkr.com