You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
FastMCP server exposing the IRI Facility API as MCP tools, designed to connect with LiteLLM.
Features
Full coverage of IRI endpoints: Facility, Status, Compute, Filesystem
Dynamic OpenAPI spec learning (learn_iri_api) from any live IRI deployment URL
Smart elicitation: asks for resource_id, path, or executable when missing
Secure Bearer token flow: user provides their IRI token once via elicitation; never stored on disk
Async task polling for filesystem operations
Three transport modes: HTTP (default), SSE, STDIO
Setup
cd amsc-mcp
uv venv
uv pip install -e .
Environment Variables
Variable
Default
Description
IRI_BASE_URL
https://iri-dev.ppg.es.net/api/v1
IRI Facility API base URL
IRI_MCP_API_KEY
(unset = auth disabled)
Static key for LiteLLM → MCP auth
MCP_HOST
0.0.0.0
Bind host
MCP_PORT
8006
Bind port
LOG_LEVEL
INFO
Python logging level
Running the Server
# HTTP (default, for LiteLLM)
IRI_MCP_API_KEY=mysecretkey uv run server.py
# SSE transport
IRI_MCP_API_KEY=mysecretkey uv run server.py --sse
# STDIO (for Claude Desktop / local MCP clients)
uv run server.py --stdio
Connecting with LiteLLM
Add to your LiteLLM config.yaml:
mcp_servers:
- name: amsc-iriurl: http://localhost:8006/mcptransport: httpauth:
type: bearertoken: "mysecretkey"# matches IRI_MCP_API_KEY on the server
The server will elicit your personal IRI Bearer token the first time you call any IRI tool. That token is forwarded to the IRI API and held in server memory only — it is never written to disk.
User: Show me what compute resources are available
→ discover_resources(resource_type="compute")
Returns table: nersc-perlmutter | compute | ✅ ok | ...
User: Submit a quick test job on perlmutter that runs hostname
→ submit_job(resource_id="nersc-perlmutter", executable="/bin/hostname",
job_name="test", walltime_minutes=5)
Returns: job_id = "12345678"
User: Check if it's done
→ get_job_status(resource_id="nersc-perlmutter", job_id="12345678")
Returns: ✅ COMPLETED, exit code 0
User: Download the output file
→ download(resource_id="nersc-perlmutter-fs", path="/scratch/user/hostname.out")
Returns: file content as text