Skip to main content
Glama
FiddelMyStick

AI-Agentic-MCP

AI-Agentic MCP

This repository contains an exploration of the Model Context Protocol (MCP) using LangChain and FastMCP. It demonstrates how to decouple tool implementations into an independent MCP server, which is then dynamically consumed by a LangChain agent.

Features

  • FastMCP Server: A standalone server exposing tools over a streamable HTTP connection.

    • get_employee_infos: A mock tool for fetching employee details (name, salary, seniority).

    • search: Web search capability utilizing the TavilySearch API.

  • LangChain MCP Agent: A ReAct-style conversational agent powered by OpenAI's gpt-4o-mini. The agent dynamically queries and utilizes the tools exposed by the MCP server using MultiServerMCPClient.

  • Decoupled Architecture: Demonstrates building scalable AI agents where the LLM logic and tool executions can exist on different servers.

Related MCP server: langchain-mcp-user-query-demo

Project Structure

  • mcp-server.py: The FastMCP server implementation that defines and serves the tools.

  • agent_graph.py: The interactive LangChain agent that connects to the MCP server and answers user queries via the terminal.

  • graph.ipynb: A Jupyter Notebook for exploring and prototyping.

  • main.py: A simple boilerplate entry point.

  • pyproject.toml / uv.lock: Project metadata and dependencies, managed via uv.

Prerequisites

Installation

This project uses uv for dependency management.

  1. Clone the repository:

    git clone <your-repo-url>
    cd AI-Agentic-MCP-main
  2. Install dependencies:

    uv sync

    Alternatively, using pip:

    pip install .
  3. Configure Environment Variables: Create a .env file in the root directory and add your API keys:

    OPENAI_API_KEY=your_openai_api_key_here
    TAVILY_API_KEY=your_tavily_api_key_here

Usage

To test the multi-server architecture, you need to run the server and the agent simultaneously.

  1. Start the MCP Server: In your first terminal, run:

    python mcp-server.py

    The server will start listening on http://localhost:24000/mcp.

  2. Run the Interactive Agent: In a separate terminal, launch the agent:

    python agent_graph.py

You can now ask questions in the prompt (e.g., "What is the salary of Alice?" or search the web). Type exit to quit the agent.

F
license - not found
-
quality - not tested
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

View all related MCP servers

Related MCP Connectors

  • MCP server exposing the Backtest360 engine API as tools for AI agents.

  • MCP server for AI agents to plan, verify, and deploy Cloudflare-native apps.

  • Agent-native MCP server over the public saagarpatel.dev corpus. Read-only, stateless.

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/FiddelMyStick/AI-Agentic-MCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server