indyiq-pi-mcp
v2.0.4
Published
MCP server exposing OSIsoft PI Web API as read-only tools for Claude
Maintainers
Readme
indyiq-pi-mcp
An MCP (Model Context Protocol) server that exposes OSIsoft/AVEVA PI Web API as read-only tools for Claude. Runs as a local stdio process — no separate server needed. Each user gets their own instance spawned by Claude.
Installation
npm install -g indyiq-pi-mcpConnecting to Claude
Credentials are passed via the env block in your MCP config.
Claude Code (~/.claude/settings.json)
The alwaysAllow list pre-approves all tools so Claude never pauses to ask permission.
{
"mcpServers": {
"indyiq-pi": {
"type": "stdio",
"command": "indyiq-pi-mcp",
"env": {
"PI_BASE_URL": "https://<your-pi-server>/piwebapi",
"PI_USER": "<username>",
"PI_PASSWORD": "<password>"
},
"alwaysAllow": [
"pi_help",
"pi_session",
"pi_system",
"pi_element",
"pi_attribute",
"pi_eventframe",
"pi_point",
"pi_stream"
]
}
}
}Claude Desktop (claude_desktop_config.json)
{
"mcpServers": {
"indyiq-pi": {
"command": "indyiq-pi-mcp",
"env": {
"PI_BASE_URL": "https://<your-pi-server>/piwebapi",
"PI_USER": "<username>",
"PI_PASSWORD": "<password>"
}
}
}
}Usage without installing globally
{
"mcpServers": {
"indyiq-pi": {
"type": "stdio",
"command": "npx",
"args": ["indyiq-pi-mcp"],
"env": {
"PI_BASE_URL": "https://<your-pi-server>/piwebapi",
"PI_USER": "<username>",
"PI_PASSWORD": "<password>"
}
}
}
}Prompts
| Prompt | Description |
|--------|-------------|
| pi_data_structures | Loads PI Web API data structures, hierarchy, WebId concepts, and time expressions into context. |
| pi_select_database | Fetches all Asset Databases — auto-selects and caches if only one, otherwise presents a numbered list. |
Tools (8)
All tools are read-only — no writes to PI Web API. The server uses a skill-file pattern: pi_help() returns a full markdown reference that Claude reads once per session, then routes all queries through 8 entity-named tools.
| Tool | Description |
|------|-------------|
| pi_help | Returns the full skill reference: actions, modes, time syntax, workflows |
| pi_session | Manage session state — set active database, save WebId aliases, list or clear |
| pi_system | PI system info, AF/PI servers, databases, tables, enumerations, batch |
| pi_element | AF elements and templates — list, search, get, hierarchy diagram |
| pi_attribute | AF attributes — list, search, get, children, current value |
| pi_eventframe | Event frames — list, search, get, attributes, children, timeline/hierarchy diagrams |
| pi_point | PI data server points — list, search, get |
| pi_stream | Time-series data — current, recorded, interpolated, summary, plot, or PI performance equations |
pi_element actions
list, search, get, templates, template, template_attributes, diagram
pi_attribute actions
list, search, get, children, value
pi_eventframe actions
list, search, get, attributes, children, element, timeline, hierarchy
pi_point actions
list, search, get
pi_system resources
home, status, versions, userinfo, servers, server, server_units, databases, database, data_servers, data_server, tables, table_data, enumerations, enum_values, batch
pi_stream modes
end, recorded, recorded_at_time, recorded_at_times, interpolated, interpolated_at_times, summary, plot, calc_intervals, calc_summary, calc_recorded, calc_at_times
Architecture
| File | Purpose |
|------|---------|
| server.js | Stdio entry point — connects MCP server to Claude via stdin/stdout |
| tools.js | 8 MCP tools + 2 prompts + PI Web API client + skill reference |
