Connect Phy to your AI assistant (MCP)
Add the Phy MCP server to Claude, ChatGPT, Claude Code, Cursor and other MCP clients to query your meters, tariffs, bills, PPAs and EV charging in plain language.
Phy provides a remote Model Context Protocol (MCP) server. Once connected, your AI assistant can look up your properties, meters, tariffs, invoices, solar PPA agreements and EV charging activity, and answer questions such as:
- "Which meters in Riverside Mall had no readings last week?"
- "What did the tenant in unit 4B pay for electricity last month?"
- "How much energy did our chargers deliver in October, grouped by driver?"
- "Preview next month's bill for meter 12345."
Everything the assistant sees is limited to what you can see in Phy. It signs in as you, using your own permissions.
Server details
| Server URL | https://phy.energy/api/mcp |
| Transport | Streamable HTTP |
| Authentication | OAuth 2.1 (sign in to Phy and approve; no API keys to copy) |
| Access granted | Read access to your Phy data, plus tariff management (see below) |
Connect your client
Claude (claude.ai and the Claude desktop app)
- Open Settings → Connectors.
- Choose Add custom connector.
- Enter the name
Phyand the URLhttps://phy.energy/api/mcp, then click Add. - Click Connect. A Phy sign-in window opens. Sign in, check the app name and callback address, and approve.
- In a new chat, enable the Phy connector from the tools menu and start asking questions.
On Team and Enterprise plans, an organization owner may need to add the connector for the workspace first.
Claude Code
Run this in your terminal:
claude mcp add --transport http phy https://phy.energy/api/mcp
Then start claude, type /mcp, select phy and choose Authenticate. Your browser opens so you can sign in and approve.
ChatGPT
- Open Settings → Connectors → Advanced and turn on Developer mode.
- Choose Create (add a custom connector).
- Enter the name
Phy, the URLhttps://phy.energy/api/mcp, and select OAuth as the authentication. - Save, then sign in to Phy and approve when prompted.
Menu names change from time to time. If you cannot find the setting, search your client's help for "custom connector" or "remote MCP server".
Cursor, VS Code and other clients
Any client that supports remote MCP servers over HTTP with OAuth will work. Add this to the client's MCP configuration (for example .cursor/mcp.json or .vscode/mcp.json):
{
"mcpServers": {
"phy": {
"url": "https://phy.energy/api/mcp"
}
}
}
VS Code uses the key servers instead of mcpServers, and needs "type": "http" alongside the URL:
{
"servers": {
"phy": {
"type": "http",
"url": "https://phy.energy/api/mcp"
}
}
}
The client discovers the sign-in details automatically and opens a browser window the first time you use it.
Using it
Start by asking something general. The assistant calls whoami first, which lists the organizations you belong to and whether you are also a customer of any property or charge point operator.
- If you belong to more than one organization, name the one you mean ("In Acme Properties, list the meters without a tariff").
- If you belong to exactly one, the assistant uses it automatically.
- Questions about your own usage as a tenant or driver use the My tools (my meters, my invoices, my payments, my wallets).
Dates, units and money
- Dates are South African time (SAST). Ask for a day (
2026-10-01) or an exact time (2026-10-01T08:00). A "to" day is included in the range. - Energy is in kWh.
- Money is returned in cents of the stated currency (so
150000is R1,500.00). The assistant normally converts this for you. - If a meter has gaps in its readings, totals are labelled as partial and missing periods are counted. They are never silently filled in.
What the assistant can do
Look things up (read-only)
| Area | Tools |
|---|---|
| Account | Who am I |
| Properties | List properties, Get property, List tenancies |
| Meters | List meters, Get meter, Get meter energy |
| Tariffs and billing | List tariffs, Get tariff, List invoices, Get invoice, List charges, Preview a meter's bill |
| Solar PPAs | List PPA agreements, Get PPA agreement, List PPA bills |
| EV charging | List charging stations, List charging sessions, Charging summary, List charger messages |
| Payments | List payments, Wallet balances |
| As a customer | My meters, My invoices, My PPA agreements, My charging sessions, My payments, My wallets |
| Search | Search Phy, Fetch from Phy |
Preview a meter's bill runs the real billing calculation as a dry run. It does not create charges, invoices or payments.
Manage tariffs (writes)
Tariffs are the only thing an assistant can change. You need permission to manage billing in the organization, exactly as in the Phy web app.
- Utility tariffs: create, update, copy from the Phy catalogue, set consumption tiers, delete
- EV charging tariffs: create, update, delete
- Helpers: list tariff item types and time-of-use schedules
Prices are in cents excluding VAT, per unit. A tariff that is in use on active meters or connectors cannot be deleted, only switched off. Deletions are marked destructive, so your client will ask you to confirm before it runs. The shared catalogue can never be edited; copy a catalogue tariff to your organization instead.
Invoices, payments, wallets and meters cannot be created, changed or removed through the connector.
Privacy and security
- You approve every connection. The consent screen shows the app that is asking and where it will send you back to.
- No passwords or API keys are shared with the assistant or its vendor. The assistant receives an opaque token that only works with the Phy MCP server.
- Your permissions apply. The assistant cannot see another organization's data or anything you could not open yourself in Phy.
- Sensitive details are removed. RFID tag identifiers, card and certificate details, passwords and similar secrets are stripped from charger messages and payment records before they are returned.
- Tokens are short-lived. Access expires within an hour and is refreshed in the background. Connections left unused for 30 days expire.
- Rate limits apply (about 240 requests per minute per user and app). If you hit one, the assistant is told when to retry.
Disconnecting
Go to Settings → Connected apps in Phy to see every app you have approved. Click Revoke to cut an app off immediately. You can also remove the connector in your AI client.
Troubleshooting
| Problem | What to try |
|---|---|
| The client says authentication failed or asks you to reconnect | Remove the connector and add it again with the URL above. Old browser or API tokens are not accepted. |
| "Too many requests" | Wait a minute and try again. |
| Tariff changes are refused | You need billing management permission in that organization. If you only have viewing rights, the write tools will not work. |
| The assistant cannot find a property or meter | Ask it to run whoami and confirm you are in the right organization, then name the organization in your question. |
| Results look cut off | Large results are truncated and marked as such. Narrow the date range or add a filter. |
Still stuck? Contact your Phy account manager or support with the time of the problem and the client you were using.