Skip to main content
Glama

From creating my first MCP server to deploying production-ready applications using Docker and cloud-native architectures.

πŸ€– What is MCP?

Model Context Protocol (MCP) is a standardized protocol that enables seamless communication between AI models and external tools/systems. It allows:

  • πŸ”Œ Tool Integration: Connect AI models to custom tools and services

  • 🌐 Universal Communication: Standardized way for LLMs to interact with resources

  • πŸ”„ Multi-Transport Support: Use stdio, HTTP, or custom transports

  • πŸ›‘οΈ Type-Safe: Full type support and validation

  • πŸ“‘ Remote Execution: Execute tools on remote servers

Related MCP server: MCP AI Chat LangChain

βœ… Prerequisites

  • Python 3.11+ (MCP requires modern Python)

  • Git for version control

  • Docker (for Chapter 6)

  • Basic Python knowledge (async/await, decorators)

  • API familiarity (helpful for understanding HTTP transport)

  • Terminal/Command Line comfort

The project includes:

  • fastmcp - FastMCP framework for building MCP servers

  • langchain - For integration with language models

  • langchain-mcp-adapters - Bridge between LangChain and MCP

  • mcp - Official MCP specification implementation

  • agentic-terminal - Terminal-based MCP tools

πŸ› οΈ Technologies

Technology

Purpose

Version

FastMCP

MCP framework

3.2.4+

Python

Programming language

3.12+

Docker

Containerization

Latest

LangChain

LLM framework integration

1.2.17+

Async/Await

Concurrent operations

Built-in Python

HTTP

Network transport

Standard

Stdio

Local process communication

Standard

UV

Package management

Latest

Setting Up Python Environment

Using uv (recommended - faster than pip):

uv venv .venv
source .venv/bin/activate  # On Windows: .venv\Scripts\activate

Or using traditional venv:

python -m venv .venv
source .venv/bin/activate  # On Windows: .venv\Scripts\activate

πŸ“š Project Structure

1: Creating Your First MCP Server 🌱

File: 1_Create_MCP/

The fundamentals of MCP by building a basic server:

  • 1_first_mcp_server_stdio.py: Build a simple MCP server using stdio transport

    • Basic tool definition with @mcp.tool() decorator

    • Fetch and process data patterns

    • Running server locally

  • 2_python_client.py: Create a Python client to connect to the MCP server

    • Understand client-server communication

    • Making tool calls programmatically

  • 3_langchain_client.py: Integrate MCP with LangChain

    • Use MCP tools with language models

    • Automatic tool discovery and binding

Key Learnings:

  • FastMCP framework basics

  • Stdio transport protocol

  • Async function handling

  • Tool documentation with docstrings


πŸ—οΈ Project Architecture

MCP_Projects/
β”‚
β”œβ”€β”€ 1_Create_MCP/           # Basics: Stdio-based MCP
β”‚   β”œβ”€β”€ 1_first_mcp_server_stdio.py
β”‚   β”œβ”€β”€ 2_first_python_client.py
β”‚   └── 3_langchain_client.py
β”‚
β”œβ”€β”€ 2_HTTP_MCP/           # Basics: HTTP-based MCP
β”‚   β”œβ”€β”€ 1_http_mcp_server.py
β”‚   
β”œβ”€β”€ pyproject.toml            # Main project config
β”œβ”€β”€ package.json              # NPM metadata
β”œβ”€β”€ main.py                   # Entry point
└── README.md                 # This file

πŸ“š Resources

Official Documentation

Available Tools

2 tools
fetchC

Use this tool to fetch data from a source.

Inputs: no named parameters.

processD

Use this tool to process the fetched data.

Inputs: path (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    D1.8/5.0

    Scored across 2 tools

    Disambiguation2/5

    Fetch and process at least form a sequential pipeline, but both are so vaguely described ("a source", "the fetched data") that an agent cannot tell what resource is being touched or what processing means. Boundaries are only inferable from ordering, not from the descriptions.

    Naming Consistency3/5

    Both names are bare single verbs with no nouns, which is internally consistent and readable. However, the pattern is so generic it conveys almost no domain information, making it borderline rather than good.

    Tool Count2/5

    Two tools is far too thin to describe any real project/data workflow; there is no configuration, query, listing, or write operation. The set feels like an unimplemented placeholder rather than a scoped server.

    Completeness1/5

    There is no identifiable domain and no lifecycle coverage: no way to specify a source, inspect results, persist or update data, or handle errors. An agent would have to guess at everything after the first call.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      A toolkit for building Model Context Protocol servers and clients that provide standardized context for LLMs, allowing applications to expose resources, tools, and prompts through stdio or Streamable HTTP transports.
      MIT
    • F
      license
      Not graded
      quality
      D
      maintenance
      A complete working example of Model Context Protocol servers that exposes tools and functions over streamable HTTP, allowing AI assistants like Cursor to access capabilities such as web search via Tavily.
      -