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/mcpTo 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"Add to ~/.cursor/mcp.json (Windows: %USERPROFILE%\.cursor\mcp.json):
{
"mcpServers": {
"bayou": {
"url": "https://docs.bayou.energy/mcp",
"headers": {
"Authorization": "Basic YOUR_BASE64_ENCODED_API_KEY"
}
}
}
}Omit the headers block if you only need documentation access.
Add to ~/.codeium/windsurf/mcp_config.json (Windows: %USERPROFILE%\.codeium\windsurf\mcp_config.json):
{
"mcpServers": {
"bayou": {
"serverUrl": "https://docs.bayou.energy/mcp",
"headers": {
"Authorization": "Basic YOUR_BASE64_ENCODED_API_KEY"
}
}
}
}Omit the headers block if you only need documentation access.
Claude Desktop's configuration file does not support remote server URLs directly. Connect one of these two ways:
Option 1 — Custom connector (simplest): Go to Settings → Connectors → Add custom connector and enter https://docs.bayou.energy/mcp. Custom connectors do not support custom headers, so for live API calls provide your API key in the conversation when the assistant needs it.
Option 2 — mcp-remote bridge (supports automatic authentication): Add to claude_desktop_config.json (macOS: ~/Library/Application Support/Claude/, Windows: %APPDATA%\Claude\):
{
"mcpServers": {
"bayou": {
"command": "npx",
"args": [
"mcp-remote",
"https://docs.bayou.energy/mcp",
"--header",
"Authorization:${AUTH_HEADER}"
],
"env": {
"AUTH_HEADER": "Basic YOUR_BASE64_ENCODED_API_KEY"
}
}
}
}The header value is passed through an environment variable because Claude Desktop does not handle spaces inside args entries correctly.
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:' | base64On 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-requestcalls 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"
Updated 12 days ago

