scau-electricity-mcp
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@scau-electricity-mcpWhat's my dorm electricity balance and usage this month?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
SCAU Electricity MCP Server
简体中文 | English
A lightweight, read-only Model Context Protocol (MCP) server for querying dormitory electricity data at South China Agricultural University (SCAU).
The server runs locally over stdio, keeps authentication sessions in memory, and does not read Home Assistant configuration or persist tokens, cookies, room details, or query results.
Features
Query total and per-day electricity usage for an inclusive date range.
Read the current electricity balance, refresh time, and meter status.
Read lifetime electricity usage without supplying any parameters.
Calculate range and daily electricity costs using a configurable unit price.
Expose read-only, idempotent MCP tools with structured JSON results.
Related MCP server: MCP Student Assistant
Available tools
Tool | Parameters | Description |
|
| Returns total usage and per-day readings for an inclusive date range. |
| None | Returns the current balance, refresh time, and meter online status. |
| None | Returns cumulative electricity usage since the meter came online. |
|
| Returns range totals, daily readings and costs, lifetime usage as of the end date, and the current balance. |
Dates must use the YYYY-MM-DD format. start_date must not be later than end_date.
Requirements
Python 3.12 or newer
Network access to
http://cz.scau.edu.cnYour SCAU electricity room name and room ID
Installation
git clone https://github.com/xnbx2012/scau-electricity-mcp.git
cd scau-electricity-mcp
uv syncIf uv reports invalid peer certificate: UnknownIssuer behind a system or corporate certificate proxy, run uv --system-certs sync.
Running locally
Pass the room settings as command-line arguments:
uv run python server.py --room-name "Your room name" --room-id "Your room ID"Or use environment variables:
$env:SCAU_ROOM_NAME = "Your room name"
$env:SCAU_ROOM_ID = "Your room ID"
uv run python server.pyThe process communicates over stdio. It is normal for it to remain running without printing a prompt.
MCP client configuration
Replace the directory with the absolute path to your clone:
{
"mcpServers": {
"scau-electricity": {
"command": "uv",
"args": [
"--directory",
"C:\\absolute\\path\\to\\scau-electricity-mcp",
"run",
"python",
"server.py"
],
"env": {
"SCAU_ROOM_NAME": "Your room name",
"SCAU_ROOM_ID": "Your room ID"
}
}
}
}If the client cannot find uv, set command to the absolute path of uv.exe. Do not commit client configuration containing real room details to a public repository.
Configuration
Environment variable | CLI option | Default | Description |
|
| Required | Electricity account room name. |
|
| Required | Electricity account room ID. |
|
|
| Upstream service URL. |
|
|
| Upstream meter database ID. |
|
|
| Electricity price in CNY per kWh. |
Command-line options take precedence over environment variables.
Development
uv sync --group dev
uv run ruff check .
uv run pytestTests do not contact the university service and contain no real room information.
Privacy and security
Room details are sent only to the university electricity service.
Authentication tokens and cookies remain in memory and are not persisted.
The upstream service currently uses plain HTTP, so traffic is not protected by TLS.
All exposed MCP tools are read-only.
Disclaimer
This is an unofficial community project and is not affiliated with or endorsed by South China Agricultural University. The upstream interface may change without notice.
License
Licensed under the MIT License.
Available Tools
4 toolsget_balanceARead-onlyIdempotent
读取当前电费余额、余额刷新时间和电表在线状态。
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnlyHint=true, idempotentHint=true, and destructiveHint=false, covering the safety profile. The description adds the specific data points retrieved (balance, refresh time, online status), which provides useful scope but no additional behavioral traits such as caching, freshness, or error behavior. With annotations covering the core behavior, a 3 is appropriate.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
One concise sentence that front-loads the main action and lists all returned data elements with no filler or redundant detail. Every word earns its place.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given zero parameters, a comprehensive output schema, and annotations covering the read-only/idempotent behavior, the description provides all necessary context. An agent can invoke this tool correctly without any further information.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool has zero parameters, so the schema is trivially complete. The baseline is 4 for no params, and the description does not need to explain any parameter semantics.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses the specific verb '读取' (read) and clearly names the resources: current electricity balance, balance refresh time, and meter online status. This is distinct from the sibling tools (get_daily_energy, get_lifetime_energy, get_electricity_summary), which focus on energy consumption rather than balance, so an agent can easily tell it apart.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description makes it clear that this tool is for balance-related queries, which implicitly distinguishes it from the energy-focused siblings. It does not explicitly name alternatives or provide when-not-to-use guidance, but the context is sufficiently clear that an agent can infer the correct usage.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_daily_energyBRead-onlyIdempotent
读取指定日期范围的用电量; 起止日期均为 YYYY-MM-DD (含首尾)。
| Name | Required | Description | Default |
|---|---|---|---|
| end_date | Yes | ||
| start_date | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already cover the safety profile with readOnlyHint, idempotentHint, and destructiveHint false. The description adds useful behavioral context by specifying YYYY-MM-DD format and inclusive endpoints, but does not disclose granularity, timezone handling, or response shape.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is one tight sentence that front-loads the action and scope and then adds the necessary date-format detail. There is no redundancy or filler.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple read-only tool, the description plus annotations and output schema give enough information to call it correctly. The only notable gaps are explicit sibling guidance and timezone/unit nuance, which are minor here.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description must compensate. It does specify that both dates use YYYY-MM-DD and are inclusive, adding meaning beyond the raw schema. It does not clarify units, aggregation granularity, or timezone effects, which remain open.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states a specific verb '读取' (read) and resource '用电量' (electricity consumption) bounded by a date range, making the core purpose clear. However, it does not explicitly differentiate from siblings like get_lifetime_energy or get_electricity_summary.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is given on when to use this tool rather than a sibling, nor are alternatives mentioned. The date-range scope implies a daily view, but the description leaves selection criteria entirely to the agent's inference.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_electricity_summaryARead-onlyIdempotent
读取日期范围用电量、电费、累计用电量和当前余额 (含首尾)。
| Name | Required | Description | Default |
|---|---|---|---|
| end_date | Yes | ||
| start_date | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already cover read-only, idempotent, and non-destructive behavior. The description adds useful context beyond those annotations, notably that the date range is inclusive ('含首尾') and that the summary includes balance and cumulative usage. This helps the agent understand the tool's exact scope without contradicting the annotations.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single compact sentence that front-loads the main action and lists the key data points. Every element earns its place, and there is no redundant or filler content.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Complexity is low: two simple date parameters, rich annotations, and an output schema are present. The description adds the important inclusive-endpoint behavior and the summary's contents. It is slightly incomplete only in lacking explicit parameter format guidance and sibling differentiation, but the tool remains invocable correctly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema provides only type/required info with 0% description coverage, so the description must compensate. It clarifies that the two parameters define a date range and that both endpoints are inclusive, which adds meaning beyond the raw schema. However, it does not specify date formats, constraints, or the relationship between the cumulative usage and the date range.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description identifies a specific verb ('读取' / read) and a clear resource: an electricity summary covering date-range usage, bill, cumulative usage, and current balance. This clearly distinguishes it from the sibling tools like get_daily_energy, get_balance, and get_lifetime_energy, though it does not explicitly name them.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The intended use is implied by '读取日期范围...' — use it when a date-range electricity summary is needed. However, there is no explicit guidance about when to prefer this tool over get_balance or get_lifetime_energy, and no exclusions or alternatives are mentioned.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_lifetime_energyARead-onlyIdempotent
读取电表自上线以来截至当前日期的累计总用电量。
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already cover read-only, idempotent, and non-destructive behavior. The description adds the important temporal behavior—cumulative total from meter activation to the current date—which is useful context beyond the annotations and helps avoid misinterating the query with a daily or period-specific measurement.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The entire description is a single, focused sentence in Chinese with no redundant phrasing. It front-loads the action and immediately specifies the exact time horizon, so every part of the sentence adds value.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a parameterless, read-only, idempotent tool with an output schema and clear annotations, this description provides all essential operational context. The agent knows what action to take, what the scope is, and that no side effects or required arguments exist.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
There are zero parameters and schema description coverage is 100%, so the description has no parameter burden. The baseline of 4 for parameterless tools is appropriate; there are no parameters whose meaning needs clarification.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description names a specific verb ('读取' meaning 'read') and a precise resource: the meter's cumulative total electricity consumption from online activation through the current date. This clearly differentiates it from siblings like get_daily_energy which implies a daily scope.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The lifetime/date-range semantics are explicit, so an agent can infer this is appropriate when cumulative since-online data is needed. It does not explicitly mention alternatives or exclusions, but the scope language effectively routes around daily or summary siblings.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
TDQS
get_daily_energy and get_electricity_summary both cover date-range electricity usage, but the summary tool explicitly bundles fees, lifetime usage, and balance, making its purpose distinct. The other tools are clearly separated by their specific query targets.
All tool names follow a consistent get_<descriptive_noun> pattern, such as get_daily_energy and get_lifetime_energy. There are no mixed conventions or vague verbs.
Four tools is well-scoped for a read-only electricity meter server. Each tool either serves a specific query or provides a combined summary without unnecessary bloat.
The set covers daily usage, lifetime usage, current balance, and a combined summary, which is sufficient for typical electricity monitoring. A standalone fee breakdown or current power reading could be added, but agents will not encounter significant dead ends.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
MCP server providing attendance data queries via the CloudTime API.
Read-only MCP tools for AI agent discovery, structured resources, and NIULAI information.
Read-only MCP server for ClassQuill, a tutoring-business-management platform.
Remote MCP for TehProf Booking: browse resources & availability, create & cancel reservations.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceProvides MCP tools to read SJTU Canvas data, download course files, and access video/subtitle resources without authentication simulation.MIT
- FlicenseNot gradedqualityCmaintenanceEnables querying student information such as marks, attendance, pending assignments, and timetables from a MySQL database through MCP tools.
- AlicenseNot gradedqualityCmaintenanceThis MCP server provides a single read-only tool to query official CPFL (electric utility) bill download data via a hosted, prepaid service without requiring platform credentials.MIT
- AlicenseNot gradedqualityCmaintenanceRead-only MCP server for consulting Enel CE (Ceará, Brazil) energy bills and downloads from official sources via a single tool, using prepaid credit.MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/xnbx2012/scau-electricity-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server