1. Conduid
  2. Agents
  3. Langgraph Fastapi MCP Server Demo
MCP server · Agents

Langgraph Fastapi MCP Server Demo

A sample project that turns a shopping list FastAPI app into an MCP server and connects a LangGraph based chatbot to the MCP server so that it can manage the user's shopping list via chat.

Unclaimed agents
34Low

Scored 6 months ago · breakdown

About Langgraph Fastapi MCP Server Demo

Langgraph Fastapi MCP Server Demo is an MCP server in the Agents category: a sample project that turns a shopping list FastAPI app into an MCP server and connects a LangGraph based chatbot to the MCP server so that it can manage the user's shopping list via chat.

Install

From source
git clone https://github.com/davidkiss/langgraph-fastapi-mcp-server-demo

This server has no ConduID identity, so agent calls to it are not receipted. Pin the version you install and review the source before granting it credentials.

Ask AI

✦

Ask AI about Langgraph Fastapi MCP Server Demo

Powered by Claude · Grounded in docs

I know everything about Langgraph Fastapi MCP Server Demo. Ask me about installation, configuration, usage, or troubleshooting.

Security checks

  • ✓README presentThe repository ships documentation.

5 checks have not been run yet.

README

LangGraph FastAPI MCP Server Demo

This is a sample project that turns a shopping list FastAPI app into an MCP server and connects a LangGraph based chatbot to the MCP server so that it can manage the user's shopping list via chat.

Watch the video

Technology Stack

  • FastAPI: a modern, fast (high-performance), web framework for building APIs with Python 3
  • FastAPI-MCP: an open-source library that exposes your FastAPI endpoints as Model Context Protocol (MCP) tools (with Auth)
  • MCP (Model Context Protocol): an open protocol that facilitates seamless interaction between AI models and external data sources or tools
  • LangChain: An opens-source framework that helps developers build applications powered by large language models (LLMs)
  • LangGraph: An opens-source framework by LangChain for building and managing complex AI agents using graph-based architecture
  • ChatGPT: A popular LLM provided by OpenAI
  • Gradio: A popular opens-source library for building web interfaces for machine learning models. This project uses Gradio to create a web interface for the chatbot.
  • LangSmith: An opens-source framework by LangChain for tracing and monitoring LLM applications.
  • uv: A fast opens-source Python package manager - a drop-in replacement for pip, conda and virtualenv.

Quick Start

1. Install uv

Follow the instructions here to install uv, if you haven't already.

2. Install Dependencies

uv sync

3. Set Up OpenAI API Key

Create a .env file in the project root:

# .env
OPENAI_API_KEY=your-openai-api-key-here

4. Run the FastAPI app

uv run uvicorn server.main:app --host 0.0.0.0 --port 8000 --reload

Try the FastAPI app at http://localhost:8000/docs

5. Run the Chatbot

uv run chatbot.py

The chatbot will be available at http://localhost:7860

Usage Examples

Try these example queries in the chatbot:

  • "I need to buy a watermelon",
  • "What's in my shopping list?",
  • "Let's add spaghetti and tomato sauce",
  • "I just bought the watermelon",
  • "Remove the tomato sauce",
  • "I need an extra spaghetti",

Dependencies

  • LangGraph: For creating the React agent
  • Gradio: For the chat interface
  • LangChain OpenAI: For the language model integration
  • LangChain Core: For tool definitions
  • FastAPI: For the MCP server
  • SQLAlchemy: For database operations

License

This project is open source and available under the MIT License.

README copy captured when this server was indexed; it may lag the repository. The original is authoritative.

Questions

About Langgraph Fastapi MCP Server Demo

How do I install Langgraph Fastapi MCP Server Demo?

No package has been published for this server, so install it from source: clone the repository and follow its README.

Is Langgraph Fastapi MCP Server Demo safe to use with an AI agent?

Its trust score is 34 out of 100 (low). It passes 1 of the 1 static security checks run so far. It has no ConduID identity yet, so agent calls to it are not receipted.

Is Langgraph Fastapi MCP Server Demo still maintained?

Conduid hasn't recorded a commit date for this repository yet. Check the repository directly for recent activity.