remote-capable server
The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.
Integrations
Provides containerized deployment of the PI API MCP server, simplifying installation and configuration in various environments
Supports execution through Node.js, allowing direct execution of the server through the Node.js runtime
PI API MCP 服务器
模型上下文协议 (MCP) 服务器,提供与 PI Dashboard API 交互的标准化工具和资源。此实现使 Claude 和其他兼容 MCP 的 AI 助手能够安全地访问和管理 PI Dashboard 资源,包括类别和图表。
将 PI 与 MCP 结合使用
下面演示了设置完成后此 MCP 服务器的典型使用场景。
初始身份验证:
- 执行以下指令建立连接:
图表分析:
- 如果图表 ID 450 包含元数据信息,请使用以下提示:
示例输出:
安装
通过 Smithery 安装
要通过Smithery自动为 Claude Desktop 安装 pi-api-mcp-server:
安装 - 使用 Docker(推荐)
- 无需 MCP 服务器配置
- MCP 客户端配置文件设置:
重要提示:如果初始化时未提供--api-url
参数,服务器将在执行任何操作之前提示您使用set-api-url
工具配置 API URL。此设计可在启动时未预先确定 URL 的环境中实现灵活的配置。
配置文件位置
访问您的 Claude for Desktop 应用程序配置:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json
- Windows:
%APPDATA%\Claude\claude_desktop_config.json
- Linux:现在使用其他工具。例如 Cline - 要求它向您显示 MCP 配置文件
可用工具
模式发现
- get-filterable-attributes :通过检查示例实体获取可用于过滤的属性列表Copy
连接管理
- check-connection :检查当前 API URL 和身份验证是否有效
- set-api-url :为所有请求配置基本 API URLCopy
验证
- 身份验证:获取有关身份验证选项的指导
- authentic-with-credentials :使用用户名和密码进行身份验证(最后的选择)
- keep-session-alive :验证并刷新当前身份验证令牌(也用于基于令牌的身份验证)
- logout :使当前令牌无效并结束会话
- set-organization :设置后续请求的组织 ID
类别
- list-categories :列出所有支持过滤的类别
- get-category :通过 ID 获取类别
- create-category :创建一个新类别
- update-category :更新现有类别
- 删除类别:删除类别
- list-category-objects :列出特定类别的所有对象
图表
- list-charts :列出所有支持过滤的图表
- get-chart :通过 ID 获取图表
- delete-chart :删除图表
- export-chart :以多种格式导出图表
可用资源
- auth://status :获取身份验证状态
- categories://list :列出所有类别
- categories://{id} :获取特定类别
- categories://{categoryId}/objects :获取特定类别的对象
- charts://list :列出所有图表
- charts://{id} :获取特定图表
- charts://{id}/export/{format} :以特定格式导出图表
可用提示
- 分析类别:分析仪表板中的类别
- 分析图表:分析仪表板中的图表
- compare-charts :比较两个图表之间的数据
- 类别使用分析:分析图表中类别的使用方式
- use-filters :展示如何通过此 API 有效地使用过滤器
克劳德积分示例
以下是连接服务器后与 Claude 一起使用的一些示例查询:
设置 API URL
验证
使用类别
使用图表
使用过滤器
使用分析提示
发展
本地执行
- 注意:您也可以使用
start.sh
来运行开发服务器。
NPM 安装
MCP 客户端配置
与 Claude for Desktop 集成:
Node.js 实现
- 执行“本地执行”部分中的指令
- 确保已执行
./dependencies.sh
来安装所需的依赖项 - 实现以下配置(注意:“@mingzilla/pi-api-mcp-server”引用通过“本地执行”安装的包)
本地开发
- 使用
./start.sh
运行服务器 - 使用
build/index.js
文件的路径设置配置
开发检查清单
- 更新代码 -> 启动本地服务器 -> 使用 index.js 文件路径测试本地服务器
- 更新 readme.md 文件 -> 更改 mcpServers 配置部分:docker + node + npx
- ./publish.sh——发布到 npm
- ./dockerBuild.sh -> ./dockerPublish.sh(编辑版本号以匹配 package.json)-> 测试 docker 配置
- 将代码推送到 github
执照
MIT 许可证
作者
明皇(mingzilla)
This server cannot be installed
模型上下文协议服务器使 Claude 和其他与 MCP 兼容的 AI 助手能够安全地访问和管理 PI 仪表板资源,包括类别和图表。
- Utilizing PI with MCP
- Installation
- Installation - Using Docker (Recommended)
- Configuration File Location
- Available Tools
- Available Resources
- Available Prompts
- Claude Integration Examples
- Development
- License
- Author