Fastmcp AI Agent
No description available
Ask AI about Fastmcp AI Agent
Powered by Claude · Grounded in docs
I know everything about Fastmcp AI Agent. Ask me about installation, configuration, usage, or troubleshooting.
0/500
Reviews
Documentation
FastMCP Server with LangGraph Agent & JWT Auth
A project to explore FastMCP, LangChain's LangGraph v1.0, and JWT authentication for MCP. This project implements a simple todo application using Model Context Protocol (MCP) server with an AI-powered interface.
Features
- Task Management API with FastMCP
- AI Agent Interface using LangChain and Groq
- JWT Authentication
- Simple In-Memory Task Storage
- Interactive CLI Interface
Prerequisites
- uv package package manager
- Python 3.13 or higher
- FastMCP 2.12.5 or higher
- LangChain 1.0.0 or higher
- Groq API access
Installation
-
Clone the repository
-
Install uv (if not already installed):
curl -LsSf https://astral.sh/uv/install.sh | sh -
Create a virtual environment and install dependencies:
uv sync
Configuration
Create a .env file in the root directory with the following variables:
GROQ_API_KEY=your_groq_api_key
JWT_PUBLIC_KEY=your_jwt_public_key
JWT_ALGORITHM=HS256 # or your preferred algorithm
JWT_TOKEN=your_jwt_token
Project Structure
mcp_server.py- Main FastMCP server implementationtools.py- Task management tools and temporary databaseagent.py- AI agent implementation using LangChain and Groqtest_client.py- Example client implementation
Usage
-
Start the MCP Server:
uv run mcp_server.py -
Run the AI Agent Interface:
uv run agent.py -
For testing, you can use the test client:
uv run test_client.py
Available Tools
add_task: Add a new task to the systemget_tasks: Retrieve all tasksremove_task: Remove a specific task by ID
Dependencies
- fastmcp >= 2.12.5
- langchain >= 1.0.0
- langchain-groq >= 1.0.0
- langchain-mcp-adapters >= 0.11.1
- langgraph >= 1.0.0
- python-dotenv >= 1.1.1
Development
The project uses Python 3.13 and follows standard Python project structure. Make sure to:
- Update dependencies in
pyproject.tomlas needed
