PI API MCP Server
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 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:
Chart Analysis:
- If chart ID 450 contains metadata information, use the following prompt:
Example Output:
Installation
Installing via Smithery
To install pi-api-mcp-server for Claude Desktop automatically via Smithery:
Installation - Using Docker (Recommended)
- No MCP Server configuration needed
- MCP client configuration file setup:
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 entityCopy
Connection Management
- check-connection: Check if the current API URL and authentication are valid
- set-api-url: Configure the base API URL for all requestsCopy
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
Authentication
Working with Categories
Working with Charts
Using Filters
Using Analysis Prompts
Development
Local Execution
- Note: you can make use of
start.sh
to run the dev server as well.
NPM Installation
MCP Client Configuration
Integration with Claude for Desktop:
Node.js Implementation
- Execute the instructions in the "Local Execution" section
- Ensure
./dependencies.sh
has been executed to install required dependencies - Implement the following configuration (Note: "@mingzilla/pi-api-mcp-server" references the package installed through "Local Execution")
Local Development
- run the server using
./start.sh
- set the config with the path to the
build/index.js
file
Development Check List
- update code -> start local server -> test local server with file path to index.js
- update readme.md file -> change the mcpServers config section: docker + node + npx
- ./publish.sh - publish to npm
- ./dockerBuild.sh -> ./dockerPublish.sh (edit version number to match package.json) -> test docker config
- push code to github
License
MIT License
Author
Ming Huang (mingzilla)
This server cannot be installed
A Model Context Protocol server that enables Claude and other MCP-compatible AI assistants to securely access and manage PI Dashboard resources including categories and charts.
- Utilizing PI with MCP
- Installation
- Installation - Using Docker (Recommended)
- Configuration File Location
- Available Tools
- Available Resources
- Available Prompts
- Claude Integration Examples
- Development
- License
- Author