How-toVersion 0.3.0
Connect an MCP client to Brightway MCP
Configure Brightway MCP over local stdio or a protected HTTP endpoint.
Connect over local stdio
Use stdio when the MCP client and Brightway run on the same machine. Install Brightway MCP in the Python environment that contains Brightway.
json
{
"mcpServers": {
"brightway": {
"command": "python",
"args": ["-m", "brightway_mcp.server"],
"env": { "BRIGHTWAY_READ_ONLY": "true" }
}
}
}Tip
If the client starts the wrong environment, replace python with the absolute Python executable from the intended Brightway environment.
Verify the connection
text
health_check
→ list_projects
→ list_databases(project=...)
→ list_methods(project=...)Resolve project, database, or method ambiguity before calculating.
Use read-only mode
text
BRIGHTWAY_READ_ONLY=trueRead-only mode is appropriate for inspection, benchmarks, and demonstrations where the client should not create or modify Brightway data.
Use HTTP only when needed
bash
python -m brightway_mcp.server --httpThe default local bind is port 8000. For remote clients, place the service behind an authenticated HTTPS gateway, VPN, or secure tunnel rather than exposing the raw Brightway runtime.