genesys-mcp-server

genesys-mcp-server

A read-only MCP server that exposes Genesys Cloud queue lookup, analytics aggregates, and conversation search tools, enabling natural language queries for contact center metrics.

Category
访问服务器

README

Genesys Cloud MCP Server (read-only)

A minimal MCP server wrapping three read-only Genesys Cloud Platform API calls, meant as the foundation described in ../Genesys-RCA-Agent-Architecture.md. Grow this by adding more @mcp.tool() functions in server.py as the RCA agent needs more signal (agent adherence, IVR flow errors, edge/telephony health, quality evaluations, ...).

Tools included:

  • list_queues(name_filter) — resolve a queue name to its id.
  • get_queue_aggregates(queue_id, start, end) — SLA%, ASA, abandon %, AHT etc. for a window.
  • search_conversations(queue_id, start, end, limit) — conversation-level detail for a window.

Not tested against a live org. The request bodies for the two analytics endpoints follow Genesys Cloud's documented query shape, but Genesys's exact field/metric names have shifted across API versions before. Before wiring this into anything scheduled, run each tool once through the MCP Inspector (step 4) against your real org and fix up any field names that come back wrong — the error message from GenesysApiError will include Genesys's own response body, which usually says exactly what's missing/misnamed.

1. Create a read-only OAuth client in Genesys Cloud

  1. Admin → Integrations → OAuth → Add Client.
  2. Grant type: Client Credentials.
  3. Roles: assign (or create) a custom role with only view-level permissions — at minimum: routing:queue:view, and the relevant analytics:*:view permissions for queue observations, queue aggregates, and conversation details. Do not grant any write/edit permissions — this server has no business needing them, and it removes an entire class of risk if the client secret ever leaks.
  4. Save, then copy the Client ID and Client Secret — the secret is only shown once.
  5. Note your org's region domain (Admin → Organization Settings, or look at the domain you log in through) — e.g. mypurecloud.com, usw2.pure.cloud, mypurecloud.ie.

2. Local setup

Requires Python 3.10+. (Not currently installed on this machine — grab it from python.org or winget install Python.Python.3.12 if you're setting this up here; a real deployment would run this on a server/container instead anyway.)

cd genesys-mcp-server
python -m venv .venv
.venv\Scripts\activate
pip install -r requirements.txt
copy .env.example .env

Edit .env with the client id/secret/environment from step 1.

3. Sanity-check the Genesys auth call

Before involving MCP at all, confirm the OAuth client works:

python -c "from config import Settings; from genesys_client import GenesysClient; s=Settings.from_env(); c=GenesysClient(s.client_id, s.client_secret, s.environment); print(c.request('GET', '/api/v2/routing/queues', params={'pageSize': 1}))"

If that prints queue JSON, auth and network access are good. If it raises GenesysAuthError, double check the client id/secret/environment. If it raises a 403 on the queues call, the OAuth client's role is missing routing:queue:view.

4. Test the MCP server interactively (no Claude needed yet)

The mcp[cli] package ships an Inspector — a local web UI that lets you call each tool by hand and see the raw response, without wiring up a real MCP client first:

mcp dev server.py

This prints a local URL — open it, and you should see list_queues, get_queue_aggregates, and search_conversations listed as tools. Run list_queues first to get a real queue_id, then try get_queue_aggregates with a recent time window and see whether the response shape matches what the tool's docstring promises. Fix up server.py here before moving on.

5. Connect it to Claude

Claude Desktop — one command registers it:

mcp install server.py --name "Genesys Cloud"

This writes an entry into Claude Desktop's claude_desktop_config.json pointing at this server's venv Python and server.py, and picks up your .env automatically. Restart Claude Desktop and the three tools should show up under the 🔌 icon.

Claude Code (this CLI) — add it as a project or user MCP server:

claude mcp add genesys-cloud -- python "C:\Users\g352280\OneDrive - Principal Financial Group\Ai\Claude\genesys-mcp-server\server.py"

(Run that from a real terminal, not this session — Claude Code reads MCP config at startup.) Or add it by hand to .mcp.json / claude_desktop_config.json:

{
  "mcpServers": {
    "genesys-cloud": {
      "command": "python",
      "args": ["C:\\Users\\g352280\\OneDrive - Principal Financial Group\\Ai\\Claude\\genesys-mcp-server\\server.py"]
    }
  }
}

6. Next steps

  • Add the remaining tools from the architecture doc's catalog (agent adherence, IVR flow execution, edge/telephony health, quality evaluations) the same way — one @mcp.tool() function per Genesys endpoint, in server.py.
  • Move .env secrets to a real vault (Azure Key Vault) before this runs anywhere but your laptop.
  • Once there's more than a couple of tools, consider splitting server.py into one module per Genesys API area (analytics, routing, telephony, quality) and importing them into a single FastMCP instance.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选