How-toVersion 0.4.1
Connect an MCP client
Use stdio for local clients or Streamable HTTP for remote clients.
Local clients: stdio
Use stdio when the client runs on the same machine and can launch a subprocess.
json
{
"command": "python",
"args": ["-m", "src"],
"cwd": "/absolute/path/to/openlca-mcp",
"env": {
"OPENLCA_HOST": "localhost",
"OPENLCA_PORT": "8080",
"OPENLCA_READ_ONLY": "true"
}
}The exact configuration file differs by client. The command, arguments, working directory, and environment must point to the Python environment where openLCA MCP is installed.
Remote clients: Streamable HTTP
bash
TRANSPORT=http MCP_HOST=0.0.0.0 MCP_PORT=8000 python -m srcThe local MCP endpoint is http://localhost:8000/mcp.
Warning
For remote use, place TLS and authentication in front of the server. Do not expose an unauthenticated, write-enabled MCP endpoint to the public internet.
First verification
- Refresh or discover tools in the client.
- Call test_connection.
- Confirm which openLCA database is active.
- Keep read-only mode enabled until you intentionally need writes.
After a server update
Restart the server, reconnect the client, refresh its tool catalog, and run a non-destructive connection check. Do not assume a client automatically refreshes cached tool schemas.