cx-agent
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@cx-agentI lost my phone. Please suspend my line."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
cx-agent-mcp
A small MCP server for a telecom support assistant. The assistant can look up customers, check balance and orders, suspend a lost SIM and open tickets, all through a REST backend. It also has a tool that reads a SIP trace and tells you why a call failed.
I spent a few years in VoIP support before moving to backend work, and most "the bot is broken" tickets I saw were really telephony or integration problems. So this project focuses on those two parts: calling backend APIs safely, and reading SIP traces.
What's inside
backend/api.py mock telecom backend (FastAPI)
mcp_server/api_client.py HTTP client: auth, timeouts, retries, idempotency keys
mcp_server/server.py MCP tools, one resource, one prompt
mcp_server/sip_analyzer.py SIP trace parser and rules
agent/chat.py terminal chat client (Claude + the MCP server over stdio)
samples/trace_488.txt example failed call
tests/ pytestRelated MCP server: Nexlink Telecom MCP Server
Tools
Tool | Kind | Notes |
| read | accepts |
| read | balance, data left, line status |
| read | validates the order id before calling the API |
| write | refuses unless |
| write | handover note for the human agent; idempotent |
| local | ladder, codecs, media IPs, likely cause |
Resource: policy://escalation. Prompt: support_agent.
How API calls are handled
API key header on every request
3s timeout (configurable). A support bot can't keep a customer waiting
Retries with backoff only on 429/502/503/504 and network errors
4xx errors are never retried
Writes are retried only when they carry an
Idempotency-Key, so a retry can't suspend a line twice or open two ticketsTools never raise. On failure they return
ok: false, a sentence the bot can say, and a next step (offer_human_agentorask_customer_to_check_input)
You can see this working by starting the backend with BACKEND_FAIL_RATE=0.3. About a third of the calls return 503 and the tools still answer.
SIP analyzer
Paste a text trace from an SBC, sngrep or Wireshark. It builds the ladder and checks for:
4xx/5xx final responses with what to look at (488 codec/SRTP mismatch, 403, 404 number format, 503...)
200 OK with no ACK (the call that drops after ~30 seconds)
private IPs in the SDP
c=line (one way audio behind NAT)only compressed codecs offered (bad for speech recognition)
no
telephone-event(DTMF won't reach the bot)more than one Call-ID (B2BUA legs)
Running it
python -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
pip install -r requirements.txt
# terminal 1
uvicorn backend.api:app --port 8000 # swagger at http://127.0.0.1:8000/docs
# terminal 2, pick one
npx @modelcontextprotocol/inspector python -m mcp_server.server
python -m agent.chat # needs ANTHROPIC_API_KEYSettings are read from environment variables, see .env.example.
Claude Desktop
{
"mcpServers": {
"cx-agent": {
"command": "C:\\path\\to\\cx-agent-mcp\\.venv\\Scripts\\python.exe",
"args": ["-m", "mcp_server.server"],
"env": {
"PYTHONPATH": "C:\\path\\to\\cx-agent-mcp",
"BACKEND_URL": "http://127.0.0.1:8000",
"BACKEND_API_KEY": "dev-secret-key"
}
}
}
}Things to try:
"my number is 01001234567, how much balance do I have?"
"where is ORD-5001?"
"I lost my phone, stop my line"
paste
samples/trace_488.txtand ask why the call failed
Tests
pytest -qThe tool tests route httpx straight into the FastAPI app, so no server has to be running.
Next
streamable HTTP transport
OAuth2 client credentials instead of a static key
FAQ search tool
Arabic replies
Genesys Cloud data action pointing at the backend
This server cannot be deployed
Maintenance
Related MCP Connectors
Build and manage AI-native customer support agents from Claude or any MCP client.
Manage AI assistants, history, calls, campaigns, contacts, knowledge, messaging, and automations.
- OkareoOAuthcom.okareo
Simulation, evaluation and monitoring for voice agents.
Read calls, contacts, users, teams and numbers; tag calls and create or update contacts.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to access curated SIP/VoIP documentation, troubleshoot traces, and analyze telecom configurations with 20+ read-only tools.MIT
- FlicenseNot gradedqualityBmaintenanceEnables natural language interaction with telecom network operations data via MCP, providing read-only insights and role-gated write operations such as bandwidth upgrades, with progress tracking and human-in-the-loop elicitation.-
- AlicenseNot gradedqualityCmaintenanceEnables an AI to perform customer support workflows by looking up customers, retrieving orders, and creating support tickets through MCP tools.4 npmX11 no permit persons clause
- FlicenseNot gradedqualityCmaintenanceEnables AI agents to retrieve customer, order, ticket, policy, and agreement information, and to prepare or execute state-changing support actions like escalations and follow-ups with confirmation and access control.-