Customer Support MCP Server

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.

Category
Visit Server

README

๐ŸŽซ Customer Support MCP Server

<div align="center">

Python MCP SQLite Cursor uv

๐Ÿค– 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

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.

Official
Featured
TypeScript
Magic Component Platform (MCP)

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.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

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.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

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.

Official
Featured
TypeScript
Kagi MCP Server

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.

Official
Featured
Python
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Exa Search

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.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured