Skip to main content
Glama
iamswayam

EZAuto MCP Learning Server

by iamswayam

EZAuto MCP Learning

A minimal end-to-end project for learning the Model Context Protocol (MCP) by building an AI-powered roadside assistance case management system using FastMCP, SQLite, and Google Gemini 3.1 Flash Lite.


šŸŽÆ Project Goal

This project was built to understand how AI Agents communicate with external systems using MCP.

Instead of using frameworks like LangChain or CrewAI, this project focuses on learning the fundamentals by implementing everything from scratch.


Architecture

                    User
                      │
                      ā–¼
        Gemini 3.1 Flash Lite
        (Function Calling)
                      │
                      ā–¼
          Python Tool Wrappers
                      │
                      ā–¼
        Official MCP ClientSession
                      │
                      ā–¼
            FastMCP Server
                      │
                      ā–¼
              SQLite Database

Features

  • SQLite database with 300 sample roadside assistance cases

  • FastMCP Server exposing business tools

  • Official MCP Client

  • Gemini Function Calling

  • Natural language querying

  • AI powered tool selection

  • End-to-end MCP communication


Tech Stack

Technology

Purpose

Python 3.12

Programming Language

SQLite

Database

FastMCP

MCP Server

MCP SDK

Official MCP Client

Google Gemini 3.1 Flash Lite

LLM

google-genai

Gemini SDK


Project Structure

ezauto-mcp-learning/
│
ā”œā”€ā”€ database/
│   ā”œā”€ā”€ schema.sql
│   ā”œā”€ā”€ seed.py
│   └── ezauto.db
│
ā”œā”€ā”€ mcp_server/
│   └── server.py
│
ā”œā”€ā”€ client/
│   └── gemini_agent.py
│
ā”œā”€ā”€ requirements.txt
ā”œā”€ā”€ .env
└── README.md

MCP Tools

Tool

Description

get_total_cases()

Returns total number of cases

get_cases_by_status(status)

Returns cases for a given status

get_case_status_summary()

Returns grouped case counts


Example Questions

How many cases are there?

How many CREATED cases are there?

How many ASSIGNED cases are there?

How many PENDING_ASSIGNMENT cases are there?

Give me the case status summary.

List all CLOSED cases.

How many cases are not escalated?

Example Flow

User
 │
 ā–¼
"How many cases are not escalated?"
 │
 ā–¼
Gemini understands intent
 │
 ā–¼
Calls get_total_cases()

Calls get_cases_by_status("ESCALATED")
 │
 ā–¼
FastMCP Server
 │
 ā–¼
SQLite
 │
 ā–¼
Returns results
 │
 ā–¼
Gemini reasons:

300 - 60 = 240
 │
 ā–¼
"There are 240 non-escalated cases."

Learning Outcomes

This project demonstrates:

  • Building an MCP Server

  • Registering MCP Tools

  • MCP Tool Discovery

  • MCP Tool Execution

  • SQLite Integration

  • Gemini Function Calling

  • AI Tool Selection

  • Agent-to-Tool Communication


Future Improvements

  • Search cases by customer name

  • Search by city

  • Get case by ID

  • Date range filtering

  • Multi-step reasoning

  • Conversation memory

  • RAG integration

  • PostgreSQL backend

  • Vector search


Lessons Learned

One of the biggest takeaways from this project was understanding that:

  • MCP standardizes communication between AI agents and external tools.

  • LLMs are valuable not because they replace SQL, but because they understand human intent, choose the appropriate tools, reason over the returned data, and generate natural-language responses.


Acknowledgements

This project was built as part of a hands-on journey to understand the Model Context Protocol (MCP), Function Calling, and Agentic AI from first principles.

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    MCP tool server providing SQLite database access for AI agents.
    MIT
  • A
    license
    Not graded
    quality
    C
    maintenance
    Read-only MCP server that exposes Garmin Connect health data from a local SQLite database to AI assistants, enabling queries for recent days, sleep, weekly trends, and a guarded SQL query surface.
    MIT
  • F
    license
    Not graded
    quality
    C
    maintenance
    MCP server enabling natural-language querying of SQLite databases via schema discovery, GraphRAG retrieval, and safely guarded read-only SQL execution.
    -