chromadb-fastapi-mcp logo

chromadb-fastapi-mcp

by osushinekotan

This project provides a FastAPI-based server for ChromaDB, enabling easy management and querying of vector embeddings. It also integrates with the MCP (Machine Communication Protocol) for enhanced tool and resource discovery.

View on GitHub

Last updated: N/A

What is chromadb-fastapi-mcp?

This is a FastAPI server that wraps ChromaDB, providing a REST API for managing collections and documents. It also integrates with the Machine Communication Protocol (MCP) to allow tools like Cursor and Claude Desktop to discover and interact with the ChromaDB instance.

How to use chromadb-fastapi-mcp?

  1. Clone the repository. 2. Install dependencies using uv sync. 3. Configure the .env file with ChromaDB settings (client type, data directory) and your OpenAI API key. 4. Run the server using uv run python -m app.main or uv run uvicorn app.main:app --reload. 5. Access the API documentation at http://localhost:8000/docs. 6. Connect to the MCP server using SSE with tools like Cursor, or use mcp-proxy for tools like Claude Desktop.

Key features of chromadb-fastapi-mcp

  • REST API for ChromaDB

  • Collection management (create, list, modify, delete)

  • Document management (add, query, get, update, delete)

  • MCP integration for tool discovery

  • SSE support for MCP clients

  • Support for ephemeral and persistent ChromaDB clients

Use cases of chromadb-fastapi-mcp

  • Semantic search applications

  • Question answering systems

  • Document retrieval

  • AI-powered tools integration

  • Enabling ChromaDB access for MCP-compatible clients

FAQ from chromadb-fastapi-mcp

What is ChromaDB?

ChromaDB is an open-source embedding database.

What is FastAPI?

FastAPI is a modern, high-performance web framework for building APIs with Python.

What is MCP?

MCP (Machine Communication Protocol) is a protocol for tools to discover and interact with each other.

How do I configure the server?

Configure the .env file with your ChromaDB settings and OpenAI API key.

How do I connect to the MCP server with Cursor?

In Cursor settings, set the MCP server URL to http://localhost:8000/mcp.