npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@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

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

Set your API key as an environment variable:

export CODEFUNDI_API_KEY=your_api_key_here

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

Tools 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:

  1. Call code-fundi-auth-authenticate with email and auth_mode: "otp"
  2. User receives an OTP code via email
  3. Call code-fundi-auth-verify with the 6-digit code
  4. 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