Bayou's MCP Server

The Bayou Energy Model Context Protocol (MCP) server lets AI coding tools like Claude Code, Cursor, and Windsurf, plus general-purpose assistants like Claude Desktop, work directly with Bayou's API and documentation.

What is MCP?

Model Context Protocol (MCP) is an open standard that allows AI applications to securely access external data sources and tools. Bayou hosts a remote MCP server (no local installation required) at:

https://docs.bayou.energy/mcp

The server exposes four tools:

  • search-endpoints — search Bayou's API reference by keyword
  • list-endpoints — list every API path and method
  • get-endpoint — get the full schema for a specific endpoint, including parameters, response models, and authentication requirements
  • execute-request — make live calls to the Bayou API

The three documentation tools work with no credentials, so a connected AI tool can immediately search Bayou's API reference and generate integration code. Live API calls through execute-request require your Bayou API key — see Authentication below.

Connect your AI tool

Run:

claude mcp add --transport http bayou https://docs.bayou.energy/mcp

To authenticate live API calls automatically, include your API key as a header (see Authentication for how to generate the base64 value):

claude mcp add --transport http bayou https://docs.bayou.energy/mcp \
  --header "Authorization: Basic YOUR_BASE64_ENCODED_API_KEY"

Authentication

The MCP server itself requires no credentials. Live API calls made through execute-request authenticate the same way as any Bayou API request: HTTP Basic authentication with your API key as the username and an empty password.

The recommended setup is to configure the key once as a header on the MCP connection, as shown in the tabs above. The server validates the header and forwards it with every API call it executes, so your key never needs to appear in your conversations. Generate the header value from your API key.

On macOS or Linux:

printf '%s' 'YOUR_API_KEY:' | base64

On Windows (PowerShell):

[Convert]::ToBase64String([Text.Encoding]::UTF8.GetBytes("YOUR_API_KEY:"))

Note the trailing colon after the key — it represents the empty password. Use the output wherever the examples above show YOUR_BASE64_ENCODED_API_KEY.

Two things to keep in mind:

  • Base64 is encoding, not encryption. Your API key is recoverable from the configuration file, so protect that file like any credentials file.
  • Without the header, the documentation tools still work, but execute-request calls fail with a "Missing Security Schemes" error until you either add the header or give the AI your API key in the conversation.

Test your setup

Start a new chat in your AI tool and try prompts like these:

  • "Which endpoints does the Bayou API have for retrieving interval data?" — tests documentation access; works without an API key
  • "List my Bayou customers" — tests live API access through execute-request
  • "Create a Bayou customer for Pacific Gas and Electric and give me their onboarding link"
  • "Write a Python script that polls the Bayou API until a customer's bills are ready, then prints the latest bill"

Did this page help you?