modelscope·@mingzilla/pi-api-mcp-server
一个模型上下文协议(MCP)服务器,使克劳德及其他与MCP兼容的AI助手能够安全地访问和管理PI仪表板资源,包括分类和图表。
这是一个 Model Context Protocol (MCP) 服务器,为与 PI 仪表板 API 交互提供了标准化的工具和资源。此实现使 Claude 和其他兼容 MCP 的 AI 助手能够安全地访问和管理 PI 仪表板资源,包括类别和图表。
以下是在完成设置后,此 MCP 服务器的典型使用场景示例。
初始认证:
Ensure the PI API MCP server is running
Set the API URL to http://localhost:8224/pi/api/v2
Use the authenticate tool for authentication guidance
Check the connection status to verify everything is working
List two charts from the dashboard
图表分析:
Retrieve the metadata from chart ID 450
Extract the chart JSON data from ID 450
Identify chart IDs associated with claims
Obtain JSON data for the identified charts
Analyze the data to generate actionable insights
示例输出:

要通过 Smithery 自动安装 pi-api-mcp-server 到 Claude Desktop:
npx -y @smithery/cli install @mingzilla/pi-api-mcp-server --client claude
{
"mcpServers": {
"pi-api": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"API_URL=http://localhost:8224/pi/api/v2",
"-e",
"PI_API_KEY=XXXXXXXX",
"mingzilla/pi-api-mcp-server"
],
"disabled": false,
"autoApprove": [
"keep-session-alive",
"check-connection",
"authenticate",
"list-categories",
"get-category",
"list-charts",
"get-chart",
"export-chart",
"get-filterable-attributes",
"export-chart"
]
}
}
}
重要提示:如果在初始化时未提供 --api-url 参数,服务器会在执行任何操作之前提示您使用 set-api-url 工具配置 API URL。这种设计使得在启动时 URL 尚未确定的环境中也能灵活配置。
访问您的 Claude for Desktop 应用程序配置文件的位置如下:
~/Library/Application Support/Claude/claude_desktop_config.json%APPDATA%\Claude\claude_desktop_config.json获取图表实体的可过滤属性
将 API URL 设置为 http://localhost:8224/pi/api/v2
以下是一些与Claude连接服务器后使用的示例查询:
Please use the set-api-url tool to set the PI API URL to http://localhost:8224/pi/api/v2
Please help me authenticate to the PI API.
I have a token. Please use the keep-session-alive tool with my token: [YOUR_TOKEN_HERE]
Please check if my connection to the PI API is working properly.
List all categories in the dashboard.
Get details about category with ID 123.
List all the charts available in the dashboard.
Export chart with ID 456 as a PDF.
Get the filterable attributes for chart entities to understand what fields I can filter on.
List charts with description containing "revenue" using the filter option.
Analyze the categories in the dashboard.
Compare data between charts 123 and 456.
Show me how to use filters effectively with this API.
start.sh来运行开发服务器。# Clone the repository (SSH or HTTPS option)
git clone git@github.com:mingzilla/pi-api-mcp-server.git
cd pi-api-mcp-server
# Install dependencies
npm install
./dependencies.sh # Installs global dependencies to enable MCP client connection via "@mingzilla/pi-api-mcp-server"
# Build the project
npm run build
# Execute the server
npm start
# Global installation
npm install -g @mingzilla/pi-api-mcp-server
# Direct execution via npx
npx @mingzilla/pi-api-mcp-server --api-url "http://localhost:8224/pi/api/v2" --auth-token "XXXXXXXX"
与桌面版Claude集成:
./dependencies.sh以安装所需依赖@mingzilla/pi-api-mcp-server引用的是通过“本地执行”安装的包){
"mcpServers": {
"pi-api": {
"command": "npx",
"args": [
"-y",
"@mingzilla/pi-api-mcp-server",
"--api-url",
"http://localhost:8224/pi/api/v2",
"--auth-token",
"XXXXXXXX"
],
"autoApprove": [
"keep-session-alive",
"check-connection",
"authenticate",
"list-categories",
"get-category",
"list-charts",
"get-chart",
"export-chart",
"get-filterable-attributes",
"export-chart"
]
}
}
}
./start.sh运行服务器build/index.js文件路径的配置./start.sh
{
"mcpServers": {
"pi-api": {
"command": "node",
"args": [
"/home/mingzilla/dev/tool-mcp-pi-api-server/build/index.js",
"--…
审计 npm 包依赖项以查找安全漏洞,提供详细的报告和修复建议,并集成 MCP。
通过API层将克劳德桌面版直接连接到数据库,使其能够探索数据库结构、编写SQL查询、分析数据集和创建报告。该API层还包含用于表探索和查询执行的工具。
DBCode 是一个 Visual Studio Code 扩展,允许你管理许多数据库,包括 PostgreSQL、MySQL、SQL Server、DuckDB、Redis、MongoDB 等更多数据库。 DBCode 提供了运行 MCP 服务器的选项,可以访问这些数据库、它们的模式以及执行查询的能力。
AI 首选的统一数据访问通道,支持30多种数据源(阿里云全系/主流数据库/数仓)的安全访问。
后端服务,实现了模型控制面板协议,可连接到 Apache Doris 数据库,允许用户执行 SQL 查询、管理元数据,并且有可能利用大语言模型(LLMs)完成自然语言到 SQL 的转换等任务。
提供对Excel文件的操纵功能。此服务器启用工作簿创建、数据操纵、格式设置和高级Excel功能。