Skip to main content
Glama
respanai

Respan MCP Server

Official
by respanai

Respan MCP 服务器

模型上下文协议 (MCP) 服务器,用于 Respan —— 直接从你的 AI 助手中访问日志、提示、追踪和客户数据。

功能

  • 日志 - 查询、筛选和创建 LLM 请求日志

  • 追踪 - 查看包含跨度树的完整执行追踪

  • 客户 - 访问客户数据和预算信息

  • 提示 - 管理提示模板和版本


Related MCP server: MCP Datadog Server

快速开始

选项 1:公开 HTTP(推荐)

无需安装。

  1. platform.respan.ai 获取你的 API 密钥

  2. 添加到你的 MCP 配置文件中:

Cursor (~/.cursor/mcp.json):

{
  "mcpServers": {
    "respan": {
      "url": "https://mcp.respan.ai/api/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_RESPAN_API_KEY"
      }
    }
  }
}

Claude Desktop (macOS: ~/Library/Application Support/Claude/claude_desktop_config.json):

{
  "mcpServers": {
    "respan": {
      "url": "https://mcp.respan.ai/api/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_RESPAN_API_KEY"
      }
    }
  }
}
  1. 重启 Cursor/Claude Desktop


选项 2:本地 Stdio

在本地运行 MCP 服务器,用于个人开发或离线使用。

前提条件: Node.js v18+

git clone https://github.com/respanai/respan-mcp.git
cd respan-mcp
npm install
npm run build
{
  "mcpServers": {
    "respan": {
      "command": "node",
      "args": ["/absolute/path/to/respan-mcp/dist/lib/index.js"],
      "env": {
        "RESPAN_API_KEY": "YOUR_RESPAN_API_KEY"
      }
    }
  }
}

选项 3:私有 HTTP(团队)

将你自己的实例部署到 Vercel,供团队共享一个部署。

Deploy with Vercel

在 Vercel 仪表盘 > 设置 > 环境变量中设置 RESPAN_API_KEY

与你的团队分享此配置:

{
  "mcpServers": {
    "respan": {
      "url": "https://your-project.vercel.app/mcp"
    }
  }
}

可用工具

组织

工具

描述

list_organizations

列出你的账户可以代表的组织,以及哪个是活跃组织

switch_organization

按名称、organization_idteam_id 切换活跃组织

所有其他工具仅读取和写入活跃组织。切换是账户范围且持久的——它会将 Respan 网页应用和任何其他会话移动到同一组织,因为后端将活跃组织存储在用户记录上,而不是令牌上。需要 OAuth 登录;API 密钥已绑定到一个组织,无法切换。

日志

工具

描述

list_logs

使用强大的查询功能列出和筛选 LLM 请求日志

get_log_detail

通过唯一 ID 检索单个日志的完整详情

create_log

为任何类型的 LLM 请求创建新日志条目

追踪

工具

描述

list_traces

使用排序和分页列出和筛选追踪

get_trace_tree

检索追踪的完整分层跨度树

客户

工具

描述

list_customers

使用分页和排序列出客户

get_customer_detail

获取客户详细信息,包括预算使用情况

提示

工具

描述

list_prompts

列出你组织中的所有提示

get_prompt_detail

获取详细的提示信息

list_prompt_versions

列出提示的所有版本

get_prompt_version_detail

获取特定版本的详细信息

工作流

工具

描述

list_workflows

列出自动化、监控、计划导出和评估流水线

filter_workflows

按类型或其他字段筛选工作流

get_workflow

检索工作流及其任务定义

create_automation_workflow

创建事件驱动的自动化;添加所需的仪表板采样门

create_monitor_workflow

从聚合/条件和交付任务创建监控

create_export_workflow

从 cron 和导出特定选项创建计划导出

create_workflow

高级底层工作流创建逃生门

update_workflow

更新可编辑的工作流草稿

delete_workflow

删除工作流族及其所有版本

list_workflow_versions

列出工作流族中的版本

get_workflow_version

检索特定工作流版本

commit_workflow

提交当前草稿

deploy_workflow

部署已提交的工作流版本

undeploy_workflow

停止已部署的工作流

validate_workflow

根据样本数据验证工作流任务

后端路由是共享的,但 MCP 创建函数是故意分离的。自动化为事件驱动的任务流水线,并接收仪表板兼容的 auto-sampling 门;监控接收聚合、条件和交付任务,并需要通知或 webhook;导出接收 UTC 五字段 cron 外加导出特定过滤器、字段、内联结果行为和采样。 n *** n

筛选语法

支持筛选的工具接受一个 ilters 对象: n GXP6

运算符: "" (等于), not, lt, lte, gt, gte, contains, icontains, startswith, endswith, in, isnull n *** n

项目结构 n

respan-mcp/
├── api/
│   └── mcp.ts                # HTTP entry point (Vercel serverless function)
├── lib/
│   ├── index.ts              # Stdio entry point (local mode)
│   ├── shared/
│   │   └── client.ts         # API client, auth config, path validation
│   ├── observe/
│   │   ├── logs.ts           # list_logs, get_log_detail, create_log
│   │   ├── traces.ts         # list_traces, get_trace_tree
│   │   └── users.ts          # list_customers, get_customer_detail
│   ├── account/
│   │   └── organizations.ts  # list_organizations, switch_organization
│   └── develop/
│       └── prompts.ts        # list_prompts, get_prompt_detail, versions
├── vercel.json               # Vercel config (rewrites, function timeout)
├── tsconfig.json             # TypeScript config
└── package.json

架构 n

  • 两个入口点: api/mcp.ts(通过 Vercel 的 HTTP)和 lib/index.ts(本地的 stdio) n* 共享核心: 两个入口点都创建一个 AuthConfig 并将其通过闭包传递给相同的工具注册函数——无全局可变状态 n* 工具模块: 按领域组织(observe/ 用于运行时数据,develop/ 用于提示管理) n* API 客户端: lib/shared/client.ts 处理所有上游 API 调用,具有 30s 超时、路径验证和认证 n *** n

企业配置 n

对于自定义 API 端点,设置 RESPAN_API_BASE_URL 环境变量: n Stdio 模式: n GXP8

私有部署: 在 Vercel 环境变量中设置 RESPAN_API_BASE_URL。 n *** n

本地开发 n

npm run build        # Compile TypeScript
npm run stdio        # Build and run in stdio mode

本地 OAuth 代理 n

该存储库包含一个独立的 Vercel HTTP 框架,用于公共 OAuth 和 MCP 路由。它使用现有的本地后端和 Redis 服务;它不会启动、重启或清除任一服务。 n 创建一个被 gitignored 的 .env.local: n GXP10

为了使用与 Vercel 相同的 Upstash REST 适配器,将本地 Redis 设置替换为: n GXP11

保持本地密钥前缀与预览和生产不同。探测总是将其替换为唯一每运行前缀,并且只删除这些密钥。 n 对于手动浏览器测试,运行本地服务: n GXP12

自动化验证命令启动其自己的独立代理框架,因此无需单独的 dev:oauth 进程即可运行: n GXP13

为了通过企业资源和后端执行相同的生命周期,运行: n GXP14

为了验证刷新旋转不会延长绝对刷新会话截止时间,使用短本地生命周期运行探测: n GXP15

探测在访问令牌过期后旋转刷新令牌,等待从原始会话发放开始的三分钟,然后要求最新刷新令牌返回 invalid_grant。此设置仅用于本地验证。 n 探测在 127.0.0.1:3100 上启动其自己的独立框架,使用唯一的 Redis 密钥前缀,仅打印步骤状态和持续时间,并且仅删除该唯一前缀下的密钥。请勿在相同端口上同时运行 dev:oauth。Google 登录需要单独配置的本地后端凭据;确定性自动化套件在缺少这些凭据的情况下涵盖代理行为。 n 托管 OAuth 客户端注册接受 HTTPS 回调和绑定到回环地址的 HTTP 回调——字面地址 127.0.0.1[::1],或主机名 localhost,这是 Claude Code 和 MCP Inspector 注册的。主机名匹配是精确的,因此 localhost.attacker.examplesub.localhost 不是回环。其他 HTTP 主机、可执行 URL 方案、凭据、片段、重复回调和过大的回调列表被拒绝。 n Vercel 部署需要 Upstash 而不是内存存储。生产公共和后端 URL 必须使用 HTTPS,并且 OAuth 秘密和 Redis 凭据必须仅通过部署秘密管理器配置。 n 有关完整的预览和生产设置、环境变量矩阵、Vercel 服务配置、验证门、监控和回滚过程,请参见 公开 MCP OAuth 代理: Vercel 部署运行手册。 n 自动化检查: n GXP16

*** n

文档 n

完整文档位于 docs.respan.ai/documentation/resources/mcp n

许可证 n

MIT

Install Server
F
license - not found
B
quality
B
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    B
    quality
    D
    maintenance
    Enables AI assistants to query and analyze AI agent sessions from observability providers like Shepherd (AIOBS) and Langfuse, allowing users to debug agent runs, compare sessions, track performance, and analyze LLM usage patterns.
    18
    MIT
  • A
    license
    A
    quality
    B
    maintenance
    Enables AI assistants to access full Datadog observability, including log search, APM trace filtering, smart sampling, and cross-correlation between logs, traces, and metrics.
    23
    1,015
    5
    Apache 2.0
  • A
    license
    A
    quality
    C
    maintenance
    Enables AI assistants to search logs, query metrics, manage dashboards, analyze APM traces, and control monitors via Datadog APIs.
    30
    MIT

View all related MCP servers

Related MCP Connectors

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/respanai/respan-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server