Inspiration

AI compute is exploding, but its energy cost is invisible to the people who use it. GreenAI Network exists to make that cost measurable and traceable: it is a distributed network of compute nodes coordinated by a swarm of AI agents, and every response it serves is metered on the hardware — real GPU watts, idle draw subtracted. We wanted anyone to be able to simply ask how the network is doing and what it consumed, the same way you ask about the weather. Alexa+ and the Model Context Protocol make that conversation possible.

What it does

This project is a self-hosted MCP server (Streamable HTTP, MCP spec 2025-11-25) that connects Alexa+ to the live GreenAI Network. It exposes three tools:

  • network_status — nodes online, active agents in the swarm, responses served today and success rate.
  • energy_report — measured energy (Wh and Wh per response) for today or the week, from metered responses only.
  • node_details — per-node GPU utilization, VRAM and live power draw.

All answers come in real time from the network's public telemetry endpoint (https://www.greenainetwork.com/api/sala). Nothing is cached, mocked or estimated: if a value cannot be measured, the network does not show it — and neither does Alexa+.

How we built it

The server is a small Python service built on the official MCP Python SDK (v2), serving the Streamable HTTP transport. Each tool fetches the live telemetry snapshot and renders a concise, speakable summary designed for voice: the numbers first, the methodology one sentence away ("measured on the hardware, never estimated"). The fetch layer uses only the Python standard library, so the server has a single dependency and runs anywhere with python server.py. A bundled test client performs the full MCP initialize handshake (negotiating protocol 2025-11-25), lists the tools and calls each one against the production network.

Challenges we ran into

  • The MCP Python SDK v2 renamed its high-level server API (FastMCP → MCPServer) and changed the client surface; most public examples still show v1. We migrated using the official migration guide and verified the negotiated protocol version is exactly 2025-11-25, as the Alexa+ track requires.
  • A popular HTTP library choked on proxy environment variables present on our build host. We replaced the fetch layer with the standard library, which made the server simpler and more portable.
  • Designing tool output for voice: raw telemetry JSON is unusable when spoken, so each tool returns a short structured summary instead.

Accomplishments that we're proud of

A working MCP server, built in a day on top of a production network, that negotiates the newest MCP spec and answers with real, metered data — including the honest parts (success rates, idle nodes, solar offline at night).

What we learned

MCP's Streamable HTTP transport is a genuinely good fit for voice assistants: stateless questions, structured tools, and the assistant does the talking. We also learned that "measured, not estimated" is a design constraint that improves every layer it touches.

What's next

  • Expose agent-level tools (ask the swarm to run a task and report back with its measured energy).
  • Add historical energy queries ("how much did we save this month vs. a cloud baseline?").
  • Package the server for one-command deployment so any small compute network can become Alexa+-queryable.

Built with

Python · Model Context Protocol (MCP) Streamable HTTP, spec 2025-11-25 · MCP Python SDK v2 · GreenAI Network public telemetry API

Built With

  • mcp
  • mcp-python-sdk-v2
  • python
  • streamable-http
Share this project:

Updates

Submission history