Skip to content

MABSSSSS/fastmcp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FastMCP: Autonomous LangChain Documentation Agent

An advanced implementation of the Model Context Protocol (MCP) for intelligent documentation exploration. Powered by LangChain, LangGraph, and Groq LLMs.


Project Overview

This project implements a state-of-the-art LangChain Documentation Agent using the high-level FastMCP framework. It bridges the gap between static documentation and interactive AI by allowing an autonomous agent to search, fetch, and summarize technical docs in real-time through the Model Context Protocol.

Strategic Architecture

  • FastMCP Server: A specialized MCP server (server/scraper.py) that exposes tools for semantic search and content extraction from the LangChain documentation ecosystem.
  • LangGraph Orchestrator: An agentic loop implemented in agent/agent.py that utilizes LangGraph's native handling of JSON-schema tools to solve standard langchain_classic compatibility issues.
  • Groq Inference: Utilizes Llama 3.3 (70B) via Groq for ultra-fast, high-reasoning capabilities, enabling the agent to execute complex multi-step research tasks.

🛠️ Key Features

  • Semantic Documentation Search: Deep-search capabilities across LangChain's official guides, tutorials, and API references.
  • Autonomous Tool Selection: The agent intelligently decides when to list topics, search for specific keywords, or fetch full page content.
  • Conflict Resolution: Implements the definitive fix for MCP tool-input schema mismatches by leveraging LangGraph's object-passing architecture.
  • Background Orchestration: Automated background server startup with health polling ensures the agent only starts once the MCP bridge is ready.

📂 Project Structure

fastmcp/
├── agent/            # LangGraph Agent logic & MCP Client bridge
├── server/           # FastMCP Server implementation & Scraper logic
├── run.py            # Unified entry point for Server + Agent orchestration
├── requirements.txt  # Project dependencies
└── .env              # API keys and server configuration

⚙️ Setup & Execution

1. Configure Environment

Create a .env file with your Groq API Key:

GROQ_API_KEY=gsk_your_key_here
MCP_SERVER_HOST=localhost
MCP_SERVER_PORT=8000

2. Install Dependencies

python -m venv env
source env/Scripts/activate  # Windows
pip install -r requirements.txt

3. Launch the System

python run.py

This command will:

  1. Start the FastMCP Server in a background daemon thread.
  2. Wait for the server to pass its Health Check.
  3. Initialize the LangGraph Agent.
  4. Begin an interactive session or execute pre-defined documentation queries.

"Leveraging the Model Context Protocol to build agents that truly understand their tools."

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages