Customer Support MCP Server
Enables AI assistants like Cursor to manage customer support tickets in SQLite through MCP tools, supporting creation, retrieval, search, and updates via natural language.
README
๐ซ Customer Support MCP Server
<div align="center">
๐ค AI-Powered Customer Support MCP Server
Connect Cursor AI to a real SQLite database through Model Context Protocol (MCP).
</div>
๐ Project Overview
The Customer Support MCP Server is a Python-based MCP server that allows an AI application such as Cursor to interact with a real SQLite database.
Instead of allowing the AI to directly execute SQL queries, the server exposes safe and well-defined business tools for customer support operations.
๐ฏ Main Goal
Demonstrate how an AI application can use MCP (Model Context Protocol) to:
- ๐ซ Create customer support tickets
- ๐ Retrieve existing tickets
- ๐ Search tickets
- โ๏ธ Update ticket information
- ๐พ Store ticket data in SQLite
- ๐ค Allow Cursor AI to perform operations using natural language
๐๏ธ Architecture
๐ค USER
โ
โ Natural Language
โผ
โโโโโโโโโโโโโโโโโ
โ Cursor โ
โ AI Agent โ
โโโโโโโโโฌโโโโโโโโ
โ
โ MCP
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Customer Support MCP โ
โ Server โ
โโโโโโโโโโโโโโโโโโโโโโโโโโค
โ ๐ซ create_ticket โ
โ ๐ get_ticket โ
โ ๐ search_tickets โ
โ โ๏ธ update_ticket โ
โโโโโโโโโโโโโโฌโโโโโโโโโโโโ
โ
โ SQL
โผ
โโโโโโโโโโโโโโโโโโโ
โ SQLite โ
โ support.db โ
โโโโโโโโโโโโโโโโโโโ
===================
๐ Features
Feature Description
๐ซ Create Ticket Create a new customer support ticket
๐ Get Ticket Retrieve a ticket using its ID
๐ Search Tickets Search using keyword, email, status, or priority
โ๏ธ Update Ticket Update status, priority, or description
๐พ SQLite Persistent local database
๐ค Cursor AI client for interacting with MCP
๐งช MCP Inspector Test and debug MCP tools
โก uv Fast Python package/environment management
=======================
๐งฐ Technology Stack
Technology Purpose
๐ Python 3.12 Application development
๐ MCP AI โ Tool communication
๐๏ธ SQLite Database
๐ค Cursor AI/MCP client
โก uv Python environment & dependency management
๐งช MCP Inspector MCP server testing
=====================
๐ Project Structure
customer_support_mcp/
โ
โโโ ๐ .cursor/
โ โโโ ๐ mcp.json
โ
โโโ ๐ data/
โ โโโ ๐๏ธ support.db
โ
โโโ ๐ .venv/
โ
โโโ ๐ database.py
โโโ ๐ server.py
โโโ ๐ pyproject.toml
โโโ ๐ uv.lock
โโโ ๐ README.md
โโโ ๐ .gitignore
==================
๐๏ธ Database Schema
The SQLite database contains a tickets table.
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ tickets โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ id INTEGER PRIMARY KEY โ
โ customer_name TEXT โ
โ customer_email TEXT โ
โ subject TEXT โ
โ description TEXT โ
โ status TEXT โ
โ priority TEXT โ
โ created_at TIMESTAMP โ
โ updated_at TIMESTAMP โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
============
๐งช Test Using MCP Inspector
The MCP Inspector allows you to test the tools before connecting Cursor.
Run:
uv run mcp dev server.py
Open the Inspector URL displayed in the terminal.
You should see:
Customer Support MCP Server
Tools
โ create_ticket
โ get_ticket
โ search_tickets
โ update_ticket
=======================
๐งโ๐ป Connect MCP Server to Cursor
Create:
.cursor/mcp.json
=======================
๐ Restart Cursor
After saving .cursor/mcp.json:
Cursor
โ
Restart Cursor
โ
Open customer_support_mcp
โ
Settings
โ
Tools & MCP
-------------
You should see:
๐ข customer-support
Tools:
โ create_ticket
โ get_ticket
โ search_tickets
โ update_ticket
===============
๐ค Using Cursor AI
Once the MCP server is connected, you can use natural language.
๐ซ Create Ticket
Ask Cursor:
Create a ticket for John Smith.
Email:
john@example.com
Issue:
Customer cannot login.
Priority:
high
Cursor can call:
create_ticket()
๐ Retrieve Ticket
Ask:
Show me ticket number 1.
Cursor can call:
get_ticket(ticket_id=1)
๐ Search Tickets
Ask:
Find all open urgent tickets.
Cursor can call:
search_tickets(
status="open",
priority="urgent"
)
โ๏ธ Update Ticket
Ask:
Change ticket 1 to resolved.
Cursor can call:
update_ticket(
ticket_id=1,
status="resolved"
)
===================
๐ฅ Example Workflow
๐ค User
โ
โ "Create a ticket for John"
โผ
๐ค Cursor AI
โ
โ MCP Tool Call
โผ
๐ create_ticket()
โ
โ SQL INSERT
โผ
๐๏ธ SQLite
โ
โ Ticket #1
โผ
๐ MCP Server
โ
โผ
๐ค Cursor
โ
โผ
๐ค User
==================
๐ Example or Sample database of Tickets Output
After creating tickets, the database might contain:
โโโโโโฌโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโฌโโโโโโโโโโโ
โ ID โ Customer โ Subject โ Status โ Priority โ
โโโโโโผโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโผโโโโโโโโโโโค
โ 1 โ John Smith โ Unable to login โ open โ high โ
โ 2 โ Sarah Jones โ Payment failed โ open โ urgent โ
โ 3 โ Mike Brown โ Password reset โ resolved โ medium โ
โโโโโโดโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโดโโโโโโโโโโโ
=================
๐ง MCP Concept
The most important concept in this project is:
AI APPLICATION
โ
โผ
โโโโโโโโโโโโโ
โ MCP โ
โโโโโโโฌโโโโโโ
โ
โผ
BUSINESS TOOLS
โ
โโโโโโโโโโผโโโโโโโโโ
โผ โผ โผ
CREATE SEARCH UPDATE
โ โ โ
โโโโโโโโโโผโโโโโโโโโ
โผ
DATABASE
The AI does not directly manipulate the SQLite database.
---------
Instead:
AI
โ
MCP Tool
โ
Python Function
โ
SQLite
โ
Result
โ
AI
===============
โ
MCP Business Tools
AI
โ
MCP Tool
โ
Validated Python Function
โ
SQLite
===============
๐ Verify SQLite Database
The database will be created here:
data/support.db
You can verify the database using Python:
sqlite3 "C:\Users\your name\path\folder name\data\support.db"
============
๐ Learning Outcomes
After completing this project, you will understand:
๐ MCP
Model Context Protocol
โ
MCP Server
โ
MCP Tools
โ
MCP Client
---
๐๏ธ Database Integration
Python
โ
sqlite3
โ
SQLite
---
๐ค AI Integration
Cursor AI
โ
MCP
โ
Python Tools
โ
SQLite
---
๐ผ Business Operations
CREATE
โ
READ
โ
SEARCH
โ
UPDATE
============
๐ Project Summary
Component Technology
๐ค AI Client Cursor
๐ Protocol MCP
๐ Backend Python
๐๏ธ Database SQLite
โก Environment uv
๐งช Testing MCP Inspector
๐ซ Business Domain Customer Support
=============
๐ Final Architecture
โโโโโโโโโโโโโโโโโโโโโโ
โ CURSOR โ
โ ๐ค AI AGENT โ
โโโโโโโโโโโคโโโโโโโโโโโ
โ
โ MCP
โผ
โโโโโโโโโโโโโโโโโโโโโโโโ
โ CUSTOMER SUPPORT MCP โ
โ SERVER โ
โ โโโโโโโโโโโโโโโโโโโโโโโฃ
โ ๐ซ create_ticket โ
โ ๐ get_ticket โ
โ ๐ search_tickets โ
โ โ๏ธ update_ticket โ
โโโโโโโโโโโโคโโโโโโโโโโโโ
โ
โ SQL
โผ
โโโโโโโโโโโโโโโโโโโโโโโโ
โ SQLite โ
โ support.db โ
โโโโโโโโโโโโโโโโโโโโโโโโ
==============
๐ Complete Command Flow
# 1. Go to project
cd C:\Users\path
# 2. Create environment
uv venv --python 3.12
# 3. Activate environment
.venv\Scripts\Activate.ps1
# 4. Install MCP
uv add "mcp[cli]"
# 5. Verify SQLite
uv run python -c "import sqlite3; print('SQLite OK')"
# 6. Verify MCP
uv run python -c "from mcp.server.fastmcp import FastMCP; print('MCP OK')"
# 7. Run MCP Inspector
uv run mcp dev server.py
# 8. Run MCP server directly
uv run python server.py
==============
โค๏ธ Final Message
<div align="center">
๐ซ Customer Support MCP Server
Python ๐ + MCP ๐ + SQLite ๐๏ธ + Cursor ๐ค
AI + MCP + Database = Intelligent Business Operations
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
Neon Database
MCP server for interacting with Neon Management API and databases
E2B
Using MCP to run code via e2b.
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.