Skip to main content
Glama
Code-Fundi MCP Server

Code-Fundi MCP Server

Official
by Code-Fundi

Code-Fundi MCP Server

A production-grade Model Context Protocol (MCP) server for the Code-Fundi API: a codebase map and blast-radius engine for AI coding agents. Enables any MCP-compatible AI assistant (Claude, Claude Code, Cursor, Windsurf, VS Code Copilot, and more) to search, research, index, and scan code repositories through natural language, and see what a change breaks before it ships.

Built with FastMCP (TypeScript) and Zod for schema validation.

Getting started for AI agents

If you are an AI agent (or configuring one) and no CODEFUNDI_API_KEY is set, you must self-authenticate before using search, repos, chat, or other authenticated tools. The auth tools (code-fundi-auth-*) work without a pre-existing key.

Which path to use

Situation

Action

CODEFUNDI_API_KEY is set in MCP config

Use any tool immediately β€” the server sends it as X-API-Key on every request

No API key configured

Run the OTP self-auth flow below (recommended) or password sign-in

Zero-config MCP setup (no API key)

You can start the MCP server without CODEFUNDI_API_KEY and authenticate at runtime:

{
  "mcpServers": {
    "code-fundi": {
      "command": "npx",
      "args": ["-y", "@codefundi/code-fundi-mcp"]
    }
  }
}

Code-Fundi uses Supabase-backed auth (POST /v2/auth/authenticate, /v2/auth/verify, /v2/auth/resend). OTP emails contain a 6-digit code β€” magic links are not supported on this path.

  1. Ask the human user for their email address.

  2. Call code-fundi-auth-authenticate with:

    • auth_mode: "otp"

    • email: the user's email

    • should_create_user: true for a new account, false for a returning user

  3. Tell the user to check their inbox for a 6-digit code. The API may return verification_required: true and api_key.key_state: "agent_pending" until verification completes.

  4. Ask the user for the 6-digit OTP (human-in-the-loop β€” you cannot guess or bypass this step).

  5. Call code-fundi-auth-verify with the same email and the token (6 digits).

  6. On success, the MCP server automatically configures the API key in memory for all subsequent tool calls in this session.

If the code expired or was not received, call code-fundi-auth-resend with the same email, then repeat step 5.

Example dialogue:

Agent: What email should I use to sign in to Code-Fundi?
User:  dev@example.com
Agent: [calls code-fundi-auth-authenticate] I've sent a 6-digit code to dev@example.com. Please paste it here.
User:  482913
Agent: [calls code-fundi-auth-verify] You're signed in. I can now search and index your repositories.

Password sign-in (alternative)

For existing accounts with a password, call code-fundi-auth-authenticate with auth_mode: "password", the user's email, should_create_user: false, and the password parameter. The MCP client sends the password only in the X-CodeFundi-Auth-Password header (never in the JSON body). Production requires HTTPS. Returning users may receive an active API key immediately without a separate verify step.

After authentication

  • The API key is held in memory for the lifetime of the MCP server process. It is not persisted across IDE or MCP restarts.

  • Recommend the user add the key to their MCP config as CODEFUNDI_API_KEY so future sessions start authenticated.

  • A FREE-tier account and API key are created automatically on first signup.

Errors

HTTP status

What to do

401 Unauthorized

No valid key β€” run the OTP flow above, or set CODEFUNDI_API_KEY

429 Too many requests

Auth endpoints are rate-limited per IP; wait for Retry-After seconds, then retry

Related MCP server: Codebase Intelligence MCP Server

Features

Every tool below is backed by the same codebase map: structural dependencies, call graph, and blast radius, indexed once and queried in milliseconds.

  • πŸ” Semantic & grep code search across your indexed codebase map

  • 🧠 AI-powered research: search plus AI analysis in a single call

  • πŸ“¦ Repository management: index, status, README, listing, public catalog

  • πŸ›°οΈ Repository intelligence: cross-repo dependency map, blueprint, Blast-Radius Guard (impact analysis before you merge)

  • πŸ“„ 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 & model insight: direct conversation with Code-Fundi AI, model catalog, and per-tier limits

Quick Start

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-mcp

Or add it to a project:

npm install @codefundi/code-fundi-mcp

Install from source (this repository)

git clone https://github.com/Code-Fundi/code-fundi-mcp.git
cd code-fundi-mcp
npm install
npm run build

Configure

Option A β€” API key (fastest): set your key as an environment variable:

export CODEFUNDI_API_KEY=your_api_key_here

Option B β€” no API key: skip the env var and let the agent self-authenticate at runtime. See Getting started for AI agents.

Zero-config MCP example (no env block):

{
  "mcpServers": {
    "code-fundi": {
      "command": "npx",
      "args": ["-y", "@codefundi/code-fundi-mcp"]
    }
  }
}

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 plus 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 CLI

Tools Reference (27 tools)

Covers the Code-Fundi V2 API for codebase mapping and blast-radius analysis: search (including search-with-chat / research), repositories (list, index, status, readme, public catalog), repository intelligence (map, blueprint, radius), files, history, statistics, API keys, authentication, plus Fundi chat (POST /v1/fundi/chat) and the V2 model catalog / limits (GET /v2/models, GET /v2/models/limits).

Tool

Description

code-fundi-search

Semantic and grep search across your indexed codebase map, with filters

code-fundi-research

Search plus 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 into your codebase map

code-fundi-repo-status

Check repository indexing status

code-fundi-repo-readme

Get repository README documentation (deprecated, prefer blueprint)

code-fundi-list-public-repos

Browse the global catalog of indexed public repositories (no key needed)

Repository Intelligence

Tool

Description

code-fundi-repo-map

Cross-repository dependency map: how services and packages actually connect

code-fundi-repo-blueprint

README plus dependency and convention overview (successor to repo-readme)

code-fundi-repo-radius

Blast-Radius Guard: every file and function that breaks before you merge (PRO+)

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 the curated chat model catalog (GET /v2/models)

code-fundi-model-limits

Get AI model limits and tier configuration (GET /v2/models/limits)

Authentication

Two modes: pre-configured API key (CODEFUNDI_API_KEY in MCP config) or agent-driven OTP/password auth at runtime. Full step-by-step instructions, tool names, and error handling are in Getting started for AI agents at the top of this README.

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

Available Tools

27 tools
code-fundi-activity-statsA
Read-only

Get daily activity statistics for a given date range. Shows queries per day with credit costs.

Inputs: range.

code-fundi-auth-authenticateA

Start Code-Fundi authentication (POST /v2/auth/authenticate). No existing API key required. Use auth_mode otp for new or returning users: set should_create_user true on first signup, false on sign-in. Sends a 6-digit email OTP (not a magic link); then call code-fundi-auth-verify after the human user provides the code. Password mode: pass password here (sent as X-CodeFundi-Auth-Password header only); should_create_user false for sign-in. On success with an active key, the API key is configured in-memory for this MCP session only.

Inputs: email (required), auth_mode (required), password, should_create_user.

code-fundi-auth-resendA

Resend the OTP email (POST /v2/auth/resend) when the previous code expired or was not received. Use after code-fundi-auth-authenticate, before code-fundi-auth-verify. Default type is signup for new accounts.

Inputs: email (required), type.

code-fundi-auth-verifyA

Complete OTP sign-in (POST /v2/auth/verify). Requires the 6-digit code from the user's email after code-fundi-auth-authenticate. The human user must supply the token β€” ask them explicitly. On success, activates the API key and configures it in-memory for all subsequent tools in this MCP session. Persist CODEFUNDI_API_KEY in MCP config if the user wants auth to survive restarts.

Inputs: email (required), token (required).

code-fundi-chatA
Read-only

Send a message to Code-Fundi AI (Fundi chat: POST /v1/fundi/chat). Supports threading, optional code context, indexed repository knowledge (knowledge_id), embeddings memory, and voice mode. Responses are streamed by the API and returned as plain text (or JSON when the server uses JSON mode).

Inputs: prompt (required), embed, model, voice, +4 more.

code-fundi-conversationA
Read-only

Get all messages in a conversation thread by its conversation ID.

Inputs: conversation_id (required).

code-fundi-disable-api-keyA
Destructive

Disable a Code-Fundi API key by UUID (DELETE /v2/keys/{key_id}). Use code-fundi-list-api-keys to find key IDs. Does not rotate the active key unless you disable the one in use.

Inputs: key_id (required).

code-fundi-file-docsA
Read-only

Get AI-generated documentation for a specific file in an indexed repository. Returns detailed documentation including summaries, functions, dependencies, and code analysis.

Inputs: file_id (required), repo_key (required), fields.

code-fundi-history-itemA
Read-only

Get the full details of a single history entry by its ID, including the complete response and knowledge sources.

Inputs: history_id (required).

code-fundi-index-repoA

Index a new GitHub repository in Code-Fundi, or update an existing one. After indexing, the repository's files will be searchable via code-fundi-search.

Inputs: url (required), branch, update.

code-fundi-language-statsA
Read-only

Get programming language usage statistics across all indexed repositories.

Inputs: no named parameters.

code-fundi-list-api-keysA
Read-only

List all Code-Fundi API keys (masked) for the authenticated account.

Inputs: no named parameters.

code-fundi-list-filesA
Read-only

List files in an indexed Code-Fundi repository. Supports search by file name/path and pagination. Use the returned file IDs with code-fundi-file-docs to get documentation.

Inputs: repo_key (required), limit, order, offset, +2 more.

code-fundi-list-historyA
Read-only

List your Code-Fundi query history with optional filters for date range, category, endpoint, and repository.

Inputs: to, from, limit, offset, +6 more.

code-fundi-list-modelsA
Read-only

List the curated Code-Fundi chat model catalog (GET /v2/models) with providers, required tier, and context length.

Inputs: no named parameters.

code-fundi-list-public-reposA
Read-only

Browse the global catalog of indexed public repositories (across all Code-Fundi users). Supports pagination, an updated_since cursor, and optional embedding of each repo's largest files. This endpoint does not require an API key.

Inputs: limit, since, offset, file_count, +1 more.

code-fundi-list-reposA
Read-only

List all indexed repositories in your Code-Fundi account. Supports pagination, scope filtering (private/public), and name search.

Inputs: limit, order, scope, offset, +2 more.

code-fundi-model-limitsA
Read-only

Get the AI model limits and tier configuration for your account (GET /v2/models/limits): subscription tokens, the active model's context/knowledge limits, and account limits such as max repositories, files per repo, history retention, and organization access.

Inputs: no named parameters.

code-fundi-regenerate-api-keyA
Destructive

Regenerate the Code-Fundi API key. The full key is shown only once. The new key is automatically configured for all subsequent tool calls.

Inputs: no named parameters.

code-fundi-repo-blueprintA
Read-only

Get the canonical repository intelligence overview: README documentation, top dependencies, top functions/variables, and aggregated coding conventions (PRO+ only). This is the successor to code-fundi-repo-readme. Consumes credits.

Inputs: repo_key (required), demo, conventions_path_prefix.

code-fundi-repo-mapA
Read-only

Build a cross-repository dependency map showing where a dependency appears across the source repo, optional compared repos, and (optionally) the public index. Returns structured JSON. Consumes credits.

Inputs: repo_key (required), demo, type, limit, +4 more.

code-fundi-repo-radiusA
Read-only

Run blast-radius / file impact analysis for one or more files or dependencies. Returns projected data flows, entry points, and call edges. Requires PRO, ENTERPRISE, or ADMIN tier (STARTUP is not eligible) and consumes credits.

Inputs: repo_key (required), demo, file, files, +4 more.

code-fundi-repo-readmeA
Read-only

Get the parsed README documentation for a repository. Provide either a repository UUID or a clone URL. Deprecated in favor of code-fundi-repo-blueprint, which returns the same README plus dependency and convention intelligence.

Inputs: repo_key (required).

code-fundi-repo-statusB
Read-only

Check the indexing status of a repository by its clone URL.

Inputs: url (required).

code-fundi-researchA
Read-only

Search Code-Fundi repositories AND get an AI-synthesized analysis of the results. This performs a search, then streams an AI response that analyzes the matching code files. Use this when you need both code context and an intelligent summary/explanation.

Inputs: query (required), model, scope, fields, +12 more.

code-fundi-usage-statsA
Read-only

Get query-type usage statistics for a given date range. Shows breakdown by query type with counts, credit costs, and average durations.

Inputs: range.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.6/5.0

    Scored across 27 tools

    Disambiguation4/5

    Most tools have clearly distinct purposes, but a few pairs could cause confusion: code-fundi-search vs. code-fundi-research (research wraps search with AI analysis), code-fundi-usage-stats vs. code-fundi-activity-stats, and the deprecated code-fundi-repo-readme overlapping with code-fundi-repo-blueprint. Descriptions are detailed enough to disambiguate, but the overlaps are noticeable.

    Naming Consistency2/5

    All tools share the 'code-fundi-' prefix, but the remainder follows inconsistent patterns: some use verb_noun (list-repos, index-repo, list-files), others are noun phrases (repo-map, repo-blueprint, file-docs), and some are noun_verb (auth-authenticate, auth-verify). This mix of conventions makes it harder to predict tool names.

    Tool Count2/5

    At 27 tools, the server exceeds the 25-tool threshold for 'too many'. The count is inflated by a deprecated tool (code-fundi-repo-readme) and a set of six auth-related tools that could be consolidated. While the broad scope partly justifies the number, the presence of redundant/deprecated tools makes it feel overbuilt.

    Completeness4/5

    The tool surface covers the core Code-Fundi workflows: repository indexing and listing, search/research, file and blueprint retrieval, stats, history, auth, API key management, chat, and model limits. Missing operations include repository removal (de-indexing) and more granular repo configuration, but these are minor gaps for the primary use cases.

    Maintenance

    ActivityInactive
    ResponsivenessLimited data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      An MCP server that gives AI agents structured code understanding and precise code intelligence via local indexing of AST, call graphs, and semantic search.
      77 npm
      4
      Apache 2.0
    • A
      license
      Not graded
      quality
      D
      maintenance
      A production-grade MCP server providing advanced code intelligence capabilities such as semantic search, dependency analysis, and natural language Q&A across multiple programming languages.
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      MCP server for local-first code intelligence, providing structural code graph, semantic search, and impact analysis to AI agents.
      2
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      A production-ready MCP server that enables AI assistants to intelligently understand, analyze, edit, navigate, and review software projects with multi-workspace support, Git integration, and semantic search.
      1
      MIT