Skip to content
Engineering Decision Intelligence
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 src

The 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

  1. Refresh or discover tools in the client.
  2. Call test_connection.
  3. Confirm which openLCA database is active.
  4. 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.