@codefundi/code-fundi-mcp
v0.1.2
Published
MCP server for the Code-Fundi API — search, research, index, and manage code repositories via any MCP-compatible AI assistant.
Downloads
389
Maintainers
Readme
Code-Fundi MCP Server
A production-grade Model Context Protocol (MCP) server for the Code-Fundi API. Enables any MCP-compatible AI assistant — Claude, Cursor, Windsurf, VS Code Copilot, and more — to search, research, index, and scan code repositories through natural language.
Built with FastMCP (TypeScript) and Zod for schema validation.
Features
- 🔍 Semantic & grep code search across indexed repositories
- 🧠 AI-powered research — search + AI analysis in a single call
- 📦 Repository management — index, status, README, listing
- 📄 File documentation — AI-generated docs for any indexed file
- 📊 Usage statistics — query usage, activity, language breakdowns
- 🔐 Agent-driven authentication — sign up/sign in via OTP without pre-configured keys
- 💬 AI chat — direct conversation with Code-Fundi AI
Quick Start
Install from npm (recommended)
Install the package (includes a pre-built dist/). The code-fundi-mcp binary is on your PATH when installed globally, or available via npx without cloning the repo:
npm install -g @codefundi/code-fundi-mcpOr add it to a project:
npm install @codefundi/code-fundi-mcpInstall from source (this repository)
git clone https://github.com/Code-Fundi/code-fundi-mcp.git
cd code-fundi-mcp
npm install
npm run buildConfigure
Set your API key as an environment variable:
export CODEFUNDI_API_KEY=your_api_key_hereOr skip this step — agents can authenticate dynamically using the code-fundi-auth-* tools.
Use with Claude Desktop
After a global install (npm i -g @codefundi/code-fundi-mcp), point MCP at the published binary — no path to dist/index.js required:
{
"mcpServers": {
"code-fundi": {
"command": "@codefundi/code-fundi-mcp",
"env": {
"CODEFUNDI_API_KEY": "your_api_key_here"
}
}
}
}If the binary is not on your PATH, use npx (downloads or uses the local package and runs the same entrypoint):
{
"mcpServers": {
"code-fundi": {
"command": "npx",
"args": ["-y", "@codefundi/code-fundi-mcp"],
"env": {
"CODEFUNDI_API_KEY": "your_api_key_here"
}
}
}
}Use with Cursor
Same pattern as Claude — command + optional args only; no manual path to the repo:
{
"mcpServers": {
"code-fundi": {
"command": "npx",
"args": ["-y", "@codefundi/code-fundi-mcp"],
"env": {
"CODEFUNDI_API_KEY": "your_api_key_here"
}
}
}
}When developing inside this repo, you can run npm run dev or npx tsx src/index.ts without building first.
Development Mode
npm run dev # Run with tsx (no build needed)
npx fastmcp inspect src/index.ts # Open MCP Inspector UI
npx fastmcp dev src/index.ts # Test with MCP CLITools Reference (22 tools)
Covers the Code-Fundi V2 API: search (including search-with-chat / research), repositories (list, index, status, readme), files, history, statistics, API keys, authentication, plus Fundi chat and the model catalog (POST /v1/fundi/chat, GET /v1/fundi/models — there is no separate /v2/chat in the published OpenAPI).
Search
| Tool | Description |
|------|-------------|
| code-fundi-search | Semantic/grep search across repositories with filters |
| code-fundi-research | Search + AI-synthesized analysis of matching code |
Repositories
| Tool | Description |
|------|-------------|
| code-fundi-list-repos | List indexed repositories with pagination |
| code-fundi-index-repo | Index a new GitHub repository |
| code-fundi-repo-status | Check repository indexing status |
| code-fundi-repo-readme | Get repository README documentation |
Files
| Tool | Description |
|------|-------------|
| code-fundi-list-files | List files in a repository |
| code-fundi-file-docs | Get AI-generated file documentation |
History
| Tool | Description |
|------|-------------|
| code-fundi-list-history | List query history with filters |
| code-fundi-history-item | Get full details of a history entry |
| code-fundi-conversation | Get conversation thread messages |
Statistics
| Tool | Description |
|------|-------------|
| code-fundi-usage-stats | Query-type usage breakdown |
| code-fundi-activity-stats | Daily activity statistics |
| code-fundi-language-stats | Programming language usage |
Authentication
| Tool | Description |
|------|-------------|
| code-fundi-auth-authenticate | Start OTP/password auth flow (no key needed) |
| code-fundi-auth-verify | Verify OTP code and obtain API key |
| code-fundi-auth-resend | Resend OTP verification email |
| code-fundi-list-api-keys | List API keys (masked) |
| code-fundi-regenerate-api-key | Regenerate API key |
| code-fundi-disable-api-key | Disable an API key by ID (DELETE /v2/keys/{key_id}) |
Chat & Models
| Tool | Description |
|------|-------------|
| code-fundi-chat | Fundi AI chat (POST /v1/fundi/chat; streamed responses are collected to text) |
| code-fundi-list-models | List available AI models |
Authentication
The server supports two authentication modes:
Pre-configured API Key (Recommended)
Set CODEFUNDI_API_KEY in your MCP config environment. All tools work immediately.
Agent-Driven Auth (Dynamic)
When no API key is set, agents can self-authenticate:
- Call
code-fundi-auth-authenticatewith email andauth_mode: "otp" - User receives an OTP code via email
- Call
code-fundi-auth-verifywith the 6-digit code - API key is automatically configured — all tools now work
This enables fully autonomous agent setup without manual configuration.
Environment Variables
| Variable | Required | Default | Description |
|----------|----------|---------|-------------|
| CODEFUNDI_API_KEY | No* | — | API key for authentication |
| CODEFUNDI_BASE_URL | No | https://api.codefundi.app | API base URL override |
* Required unless using agent-driven auth tools.
License
MIT
