
mingzilla/pi-api-mcp-server
Developer toolsЭта страница переведена автоматически. Технические детали смотрите в оригинале. Открыть оригинал
MCP (Model Context Protocol) Server for the PI API
Обзор
A Model Context Protocol (MCP) server that provides standardized tools and resources for interacting with the PI Dashboard API. This implementation enables Claude and other MCP-compatible AI assistants to securely access and manage PI Dashboard resources, including categories and charts. The following demonstrates typical usage scenarios for this MCP Server after setup completion. - Execute the following instructions to establish a connection: - If chart ID 450 contains metadata information, use the following prompt: To install pi-api-mcp-server for Claude Desktop automatically via Smithery: - No MCP Server configuration needed - MCP client configuration file setup: : If the --api-url parameter is not provided at initialization, the server will prompt you to configure the API URL using the set-api-url tool before executing any operations. This design enables flexible configuration in environments where the URL is not predetermined at startup.
README
Показан фрагмент оригинального README. Открыть оригинал.
PI API MCP Server
A Model Context Protocol (MCP) server that provides standardized tools and resources for interacting with the PI Dashboard API. This implementation enables Claude and other MCP-compatible AI assistants to securely access and manage PI Dashboard resources, including categories and charts.
Utilizing PI with MCP
The following demonstrates typical usage scenarios for this MCP Server after setup completion.
Initial Authentication:
- Execute the following instructions to establish a connection:
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
Chart Analysis:
- If chart ID 450 contains metadata information, use the following prompt:
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
Example Output:
Installation
Installing via Smithery
To install pi-api-mcp-server for Claude Desktop automatically via Smithery:
npx -y @smithery/cli install @mingzilla/pi-api-mcp-server --client claude
Installation - Using Docker (Recommended)
- No MCP Server configuration needed
- MCP client configuration file setup:
{
"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"
]
}
}
}
Important Note: If the --api-url parameter is not provided at initialization, the server will prompt you to configure the API URL using the set-api-url tool before executing any operations. This design enables flexible configuration in environments where the URL is not predetermined at startup.
Configuration File Location
Access your Claude for Desktop application configuration at:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json - Linux: Use other tools for now. e.g. Cline - ask it to show you the MCP config file
Available Tools
Schema Discovery
Установка
docker run -i --rm -e API_URL=http://localhost:8224/pi/api/v2 -e PI_API_KEY=XXXXXXXX mingzilla/pi-api-mcp-serverКонфигурация
{
"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"
]
}
}
}