ringba-api-mcp
Enables AI assistants to query Ringba call analytics, including running EHG insights reports and listing available metrics and dimensions.
README
Ringba API MCP Server
Streamable HTTP MCP server that exposes Ringba analytics APIs as tools for AI-assisted workflows — starting with EHG insights reports, with more Ringba endpoints to follow.
Quick Start
npm install
cp .env.example .env # then edit .env with your credentials
npm run build
npm start
The server listens on http://0.0.0.0:3031/mcp-ringba by default. Point your
MCP client at that URL.
Client Setup Guides
All clients below assume the server is running. Start it first:
npm start
For production use, run it under a process manager (PM2, systemd, launchd,
or a simple nohup / background task).
Claude Code (CLI)
Add this to your Claude Code settings. The location depends on your scope:
| Scope | Path |
|---|---|
| User (all projects) | ~/.claude/settings.json |
| Project (this repo only) | .claude/settings.json |
{
"mcpServers": {
"ringba-api": {
"type": "http",
"url": "http://localhost:3031/mcp-ringba"
}
}
}
Restart Claude Code or run /mcp to verify the server is connected.
The ringba_insights and ringba_list_available_columns tools will appear
in Claude's tool list automatically.
Claude Desktop
Claude Desktop supports HTTP MCP servers directly. Open the config file:
| OS | Path |
|---|---|
| macOS | ~/Library/Application Support/Claude/claude_desktop_config.json |
| Windows | %APPDATA%\Claude\claude_desktop_config.json |
| Linux | ~/.config/Claude/claude_desktop_config.json |
{
"mcpServers": {
"ringba-api": {
"type": "http",
"url": "http://localhost:3031/mcp-ringba"
}
}
}
Restart Claude Desktop after saving. The Ringba tools will be listed under the tools panel (hammer icon) in the chat input.
Cursor
Create or edit .cursor/mcp.json in your project root:
{
"mcpServers": {
"ringba-api": {
"url": "http://localhost:3031/mcp-ringba"
}
}
}
You can also place this at ~/.cursor/mcp.json for global access across all
projects. Restart Cursor after adding the configuration.
Cursor discovers MCP tools automatically; use Cmd/Ctrl+I to open Composer and the tools will be available.
GitHub Copilot (VS Code / VS Code Insiders)
GitHub Copilot supports MCP servers through the .vscode/mcp.json file
(VS Code 1.99+ with Copilot Chat). Create it in your project root:
{
"servers": {
"ringba-api": {
"type": "http",
"url": "http://localhost:3031/mcp-ringba"
}
}
}
After saving, open the Copilot Chat panel. Copilot will auto-discover the MCP tools on the next prompt.
Codex (OpenAI)
Codex supports MCP via its agent configuration. Add a server entry in your
Codex config file (~/.codex/config.toml or project .codex.toml):
[mcp_servers.ringba-api]
url = "http://localhost:3031/mcp-ringba"
If running Codex in a container or remote environment, replace localhost
with the host machine's reachable IP.
Windsurf
Create or edit .windsurf/mcp.json in your project:
{
"mcpServers": {
"ringba-api": {
"url": "http://localhost:3031/mcp-ringba"
}
}
}
Use Cascade (Cmd+L) after restart — the tools will be available to the agent.
Continue (VS Code / JetBrains extension)
Add to ~/.continue/config.json under the mcpServers key:
{
"mcpServers": [
{
"name": "ringba-api",
"transport": "http",
"url": "http://localhost:3031/mcp-ringba"
}
]
}
Continue will connect on the next chat session.
Generic / Other Clients
This server speaks standard JSON-RPC 2.0 over Streamable HTTP at the
configured MCP_PATH. Any MCP-compatible client that supports the
streamable-http transport can connect.
| Transport detail | Value |
|---|---|
| Protocol | JSON-RPC 2.0 |
| Transport | Streamable HTTP (SSE) |
| Endpoint | http://<host>:<port>/mcp-ringba |
| Methods | tools/list, tools/call |
| Auth | None on the MCP layer (Ringba API auth is server-side) |
Architecture
Client (Claude Code / IDE)
│
│ JSON-RPC 2.0 over Streamable HTTP
▼
ringba-api-mcp (TypeScript, @modelcontextprotocol/sdk)
│
│ POST Authorization: Token <api_key>
▼
Ringba API (api.ringba.com/v2/{accountId}/insights)
- Transport: Streamable HTTP (
/mcp-ringba), stateless, no session IDs - Auth: Ringba API token in
Authorizationheader on upstream calls - Port/Host: Configurable via
MCP_PORT/MCP_HOST(defaults:3031/0.0.0.0) - CORS: Open (
*) for local tooling
Environment Variables
| Variable | Required | Default | Description |
|---|---|---|---|
RINGBA_ACCOUNT_ID |
yes | — | Ringba account ID (e.g. RAc...) |
RINGBA_API_TOKEN |
yes | — | Ringba API token |
MCP_PORT |
no | 3031 |
HTTP listen port |
MCP_HOST |
no | 0.0.0.0 |
HTTP bind address |
MCP_PATH |
no | /mcp-ringba |
MCP endpoint path |
The server also loads ../RingbaApi/.env and ../RingbaApi/.env.local if they
exist, so you can share credentials with the main RingbaApi project.
Tools
ringba_insights
Run an EHG insights report — group call data by a dimension and get aggregated metrics for a date range.
Required parameters:
| Parameter | Type | Description |
|---|---|---|
reportStart |
string | ISO 8601 start timestamp (2026-06-11T06:00:00Z) |
reportEnd |
string | ISO 8601 end timestamp (2026-06-18T05:59:59Z) |
groupByColumn |
string | Dimension to group by (see available columns below) |
Optional parameters:
| Parameter | Type | Default | Description |
|---|---|---|---|
groupByDisplayName |
string | same as groupByColumn |
Label in output |
valueColumns |
string[] | all 20 default metrics | Metrics to include |
filters |
object[] | [] |
Filter conditions |
orderByColumn |
string | callCount |
Sort column |
orderDirection |
asc | desc |
desc |
Sort direction |
maxResultsPerGroup |
number | 1000 |
Row cap per group |
formatTimeZone |
string | America/Denver |
IANA timezone for dates |
formatTimespans |
boolean | true |
Human-readable durations |
formatPercentages |
boolean | true |
Human-readable percentages |
generateRollups |
boolean | true |
Include aggregate rows |
Filter syntax:
Each filter object wraps an anyConditionToMatch array of conditions:
{
"column": "targetName",
"value": "Elevated",
"isNegativeMatch": false,
"comparisonType": "CONTAINS"
}
Supported comparison types: CONTAINS, EQUALS, STARTS_WITH, ENDS_WITH,
GREATER_THAN, LESS_THAN, and others provided by the Ringba API.
Example call via MCP:
{
"name": "ringba_insights",
"arguments": {
"reportStart": "2026-06-11T06:00:00Z",
"reportEnd": "2026-06-18T05:59:59Z",
"groupByColumn": "targetName",
"filters": [
{
"anyConditionToMatch": [
{
"column": "targetName",
"value": "Elevated",
"isNegativeMatch": false,
"comparisonType": "CONTAINS"
}
]
}
]
}
}
ringba_list_available_columns
Reference tool — returns all known columns you can use in groupByColumn,
valueColumns, orderByColumn, and filters.
Optional parameter:
| Parameter | Type | Description |
|---|---|---|
category |
string | Filter by metric, dimension, or tag. Omit for all. |
Available group-by dimensions:
targetName, publisherName, campaignName, buyerName, inboundNumber,
callerId, callStatus, tag:InboundNumber:State, tag:InboundNumber:City,
tag:InboundNumber:Zip
Default value metrics (20 columns):
callCount, liveCallCount, completedCalls, endedCalls,
connectedCallCount, nonConnectedCallCount, duplicateCalls, blockedCalls,
incompleteCalls, payoutCount, convertedCalls, conversionAmount,
payoutAmount, profitGross, profitMarginGross, earningsPerCallGross,
totalCost, callLengthInSeconds, avgHandleTime, convertedPercent
Extending
This server is scoped to ringba-api-mcp so additional Ringba endpoints
(number management, campaign config, etc.) can be added as new tools under the
same server without breaking existing clients.
To add a new endpoint:
- Add a tool definition in
ListToolsRequestSchemahandler - Add a case in the
CallToolRequestSchemaswitch - Write a handler that calls the Ringba API via
fetch() - Add any new column definitions to
AVAILABLE_COLUMNSif needed
Differences from db-mcp-server
| Aspect | db-mcp-server |
ringba-api-mcp |
|---|---|---|
| Backend | Prisma / PostgreSQL | Ringba REST API |
| Operations | CRUD (no delete) on DB models | API endpoints as tools |
| Auth | Database credentials | Ringba API token |
| Default port | 3030 |
3031 |
| Default path | /mcp |
/mcp-ringba |
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。