PI API MCP Server
About
An MCP server for interacting with the PI Dashboard API.
Details
- Author
- mingzilla
- GitHub stars
- 7
- Downloads
- 478
- Categories
- Developer Tools, API, Other
Jump to
- Authenticate and manage sessions with the PI Dashboard API
- List, get, create, update, and delete categories
- List, get, delete, and export charts in various formats
- Filter entities using filterable attributes
- Analyze categories and charts with built-in prompts
- Session management tools for token refresh and logout
Setting up with Highlight
This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:
- Download and install Highlight from highlightai.com/download
- Navigate to the plugins tab and select "Add Custom Plugin"
-
Configure the plugin with the settings below
Plugin Name
PI API MCP ServerCommand (node, npx, python, etc.)Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.
- Enable "Start Automatically" if you want the plugin to start when Highlight launches
From the repository
Install via Smithery, Docker, npm, or local build. Configure the MCP client (e.g., Claude for Desktop) with the provided JSON configuration, specifying the API URL and optional auth token. Use the available tools and prompts to authenticate, list/analyze categories and charts, and export chart data.
Claude Desktop / Cursor
Paste into your MCP client config file to install this server.
{
"mcpServers": {
"pi api mcp server": {
"pi-api-mcp-server": {
"command": "npx",
"args": [
"-y",
"@smithery/cli",
"install",
"@mingzilla/pi-api-mcp-server",
"--client",
"claude"
]
}
}
}
}
McpServers
{
"pi-api-mcp-server": {
"command": "npx",
"args": [
"-y",
"@smithery/cli",
"install",
"@mingzilla/pi-api-mcp-server",
"--client",
"claude"
]
}
}
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
- get-filterable-attributes: Get the list of attributes that can be used for filtering by examining a sample entity Get the filterable attributes for chart entities
Connection Management
- check-connection: Check if the current API URL and authentication are valid
- set-api-url: Configure the base API URL for all requests
Set the API URL to http://localhost:8224/pi/api/v2
Authentication
- authenticate: Get guidance on authentication options
- authenticate-with-credentials: Authenticate with username and password (last resort option)
- keep-session-alive: Verify and refresh the current authentication token (also used for token-based authentication)
- logout: Invalidate the current token and end the session
- set-organization: Set the organization ID for subsequent requests
Categories
- list-categories: List all categories with filtering support
- get-category: Get a category by ID
- create-category: Create a new category
- update-category: Update an existing category
- delete-category: Delete a category
- list-category-objects: List all objects for a specific category
Charts
- list-charts: List all charts with filtering support
- get-chart: Get a chart by ID
- delete-chart: Delete a chart
- export-chart: Export a chart in various formats
Available Resources
- auth://status: Get authentication status
- categories://list: List all categories
- categories://{id}: Get a specific category
- categories://{categoryId}/objects: Get objects for a specific category
- charts://list: List all charts
- charts://{id}: Get a specific chart
- charts://{id}/export/{format}: Export a chart in a specific format
Available Prompts
- analyze-categories: Analyze categories in the dashboard
- analyze-charts: Analyze charts in the dashboard
- compare-charts: Compare data between two charts
- category-usage-analysis: Analyze how categories are being used in charts
- use-filters: Shows how to use filters effectively with this API
Claude Integration Examples
Here are some example queries to use with Claude after connecting the server:
Set the API URL
Please use the set-api-url tool to set the PI API URL to http://localhost:8224/pi/api/v2
Authentication
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.
Working with Categories
List all categories in the dashboard.
Get details about category with ID 123.
Working with Charts
List all the charts available in the dashboard.
Export chart with ID 456 as a PDF.
Using Filters
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.
Using Analysis Prompts
Analyze the categories in the dashboard.
Compare data between charts 123 and 456.
Show me how to use filters effectively with this API.
----
Development
Local Execution
- Note: you can make use of start.sh to run the dev server as well.
~~~bash
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.





