openLCA MCP Server

io.github.Below280由 GitHub 账号 Below280 发布v1.16.0更新于 Oct 24, 2026

Connect AI assistants to openLCA. 35 tools for database search, model building, and LCIA.

已验证STDIO仅桌面开发者工具数据与分析

概览

AI 生成的概览

将 AI 助手连接到正在运行的 openLCA 实例,使其能够浏览 LCA 数据库、构建模型、审核模型并运行影响计算。

可以做什么
浏览数据库:统计和搜索流程、流、产品系统、影响评价方法与参数,查询单位与化学同义词,并自动识别数据库系列(ecoinvent 或 FLCAC)。构建与编辑模型:创建或更新全局参数、流、流程和产品系统,并在确认后删除实体。审核模型:提取模型文件夹、检查结构、验证链接与参数、查看数据质量并查找流的使用位置。计算:基线影响评价、贡献分析、上游贡献树、蒙特卡洛不确定性、清单流、情景与敏感性分析,包括从 CSV 文件运行。读取数据库信息、助手规则等内置资源。
适用场景
适合已在 openLCA 中工作的 LCA 与 EPD 从业者,希望通过对话完成数据库浏览、模型构建、验证和影响计算,包括情景、敏感性和蒙特卡洛分析。
运行要求
以本地 Python 进程运行(pip install b280-olca-mcp,用 python -m b280_olca_mcp 启动),需要正在运行的 openLCA 并启动其 IPC 服务器(端口 8080),通过环境变量 OLCA_PORT 配置。需要支持 stdio 的 MCP 客户端;ChatGPT 需另配隧道。
安装前请注意
该服务器为测试版软件,连接生产数据库前请先在数据库副本上测试。构建类工具会修改数据库,delete_entity 具有破坏性。工具结果(包括流程名称、交换数据、参数和影响结果)会发送给 AI 服务商,因此不要用个人或免费账户连接机密客户数据库。CSV 工具会写入文件,chemical_synonyms 会访问外部 PubChem 服务。

安装

在 SourceWeft 中

  1. 打开 控制台中的 openLCA MCP Server,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

openLCA MCP Server

An MCP (Model Context Protocol) server that connects AI assistants to a running openLCA instance. Developed and tested with Claude Desktop; compatible with any MCP client that supports stdio transport. Built by Below280, the UK partner for openLCA.

The server exposes 35 tools covering the full LCA workflow: exploring databases, building and editing models, running calculations (scenarios, sensitivity, Monte Carlo, contribution analysis), auditing and validating models, and extracting data quality assessments. All calculation patterns are tested against production ecoinvent databases.

The server works with both ecoinvent-family databases (ecoinvent, EN15804GD, HiQLCD, BAFU) and FLCAC-family databases (LCA Commons, US LCI, USEEIO). It asks which family you are using, or auto-detects from the flow property names.

Available on PyPI and the MCP Registry.

Install

Quick setup (PyPI)

pip install b280-olca-mcp

This installs the server and its dependencies (mcp, olca-ipc) in one step. The server runs from anywhere with python -m b280_olca_mcp.

Development setup (GitHub)

Clone the repository for the latest code, the React dashboard, or if you want to modify the server:

git clone https://github.com/Below280/B280-olca-MCP.gitcd B280-olca-MCPpip install -r requirements.txt

The server entry point is b280_olca_mcp/server.py.

What it does

Someone using this MCP can say things like:

  • 'Make me a model with 34 kWh UK electricity, 5 kg sodium hydroxide, and 34 kWh steam'
  • 'Build an EPD model from this LCI'
  • 'Run two scenarios, one with transport at 100 km and one at 500 km'
  • 'Which processes contribute most to climate change in my system?'
  • 'Vary the electricity and PET resin parameters by 10%'
  • 'Validate my product system and check if the linking is correct'
  • 'Run 1000 Monte Carlo iterations and show me the uncertainty'
  • 'Help me connect to openLCA from R / Go / Rust'
  • 'What can you do?' (the help tool)

The AI assistant handles the conversation, builds the tool calls, and presents results visually with charts, tables, and exportable data.

Connect your MCP client

The server uses stdio transport. Any MCP client that can spawn a local Python process will work.

Claude Desktop

In Claude Desktop, go to Settings > Developer > Edit Config. Add an openLCA entry to the mcpServers section.

If you installed via PyPI:

json
{  "mcpServers": {    "openLCA": {      "command": "python",      "args": ["-m", "b280_olca_mcp"],      "env": {        "OLCA_PORT": "8080"      }    }  }}

If you cloned from GitHub:

json
{  "mcpServers": {    "openLCA": {      "command": "python",      "args": ["C:/path/to/B280-olca-MCP/b280_olca_mcp/server.py"],      "env": {        "OLCA_PORT": "8080"      }    }  }}

On Windows, if Claude Desktop cannot find Python, use the full path to your Python executable.

Restart Claude Desktop after saving.

Cursor

Go to Settings > Tools & MCP > Add MCP Server. Choose stdio transport, set the command to python and the argument to -m b280_olca_mcp (PyPI) or the path to b280_olca_mcp/server.py (GitHub clone). Cursor picks up config changes without restarting.

VS Code

Add the server to .vscode/mcp.json in your workspace or user settings:

json
{  "servers": {    "openLCA": {      "type": "stdio",      "command": "python",      "args": ["-m", "b280_olca_mcp"],      "env": {        "OLCA_PORT": "8080"      }    }  }}

Note: VS Code uses servers as the root key, not mcpServers. If using GitHub Copilot, switch Copilot Chat to Agent mode.

ChatGPT

ChatGPT cannot directly launch a local stdio server. OpenAI provides the Secure MCP Tunnel, which bridges ChatGPT to a local MCP server without exposing anything publicly. The architecture is:

text
ChatGPT → Secure MCP Tunnel → B280 MCP (stdio) → openLCA IPC localhost:8080

The tunnel launches the B280 server (python -m b280_olca_mcp) on your machine. No changes to the B280 server are needed; it remains stdio throughout. No additional search or fetch tools are required for ChatGPT custom MCP servers.

B280's existing tool annotations (read-only, destructive, idempotent) are used by ChatGPT when deciding whether to auto-approve or prompt for confirmation.

For the full setup guide, including installation, configuration, troubleshooting and security considerations, see docs/chatgpt.md.

ChatGPT support is currently experimental. A remote Streamable HTTP transport option may be added in future for users who prefer not to run the local tunnel.

Other MCP clients

Any client that spawns a local Python process over stdin/stdout should work. With PyPI: python -m b280_olca_mcp. With GitHub clone: python path/to/b280_olca_mcp/server.py.

Beta software. This server is under active development. Test it on a copy of your database before connecting a production database. Report issues on GitHub or at [email protected].

Start it

  1. Open your database in openLCA
  2. Start the IPC server (Tools > Developer Tools > IPC Server > green play button, port 8080)
  3. Restart your MCP client (or reconnect)
  4. Ask something like 'what can you do?' or 'what's in my openLCA database?'

After creating or modifying anything, press the Refresh button in openLCA's toolbar to see changes in the GUI.

Data security

The MCP server runs locally and communicates with openLCA on localhost. The AI client (Claude Desktop or equivalent) sends tool results to its provider's servers for processing. This means process names, exchange data, parameter values, and impact results from your database will be in the conversation.

Do not connect a confidential client database through a personal or free-tier AI account. Use a business or enterprise account with appropriate data retention controls, and check your provider's data processing terms before connecting any database containing sensitive information.

Tools

Explore (11 tools)

ToolPurpose
database_infoCounts of systems, processes, flows, methods, parameters. Auto-detects database family
set_database_familySet ecoinvent or FLCAC naming conventions
list_systemsList/search product systems
list_methodsList/search impact assessment methods
search_processesFind processes by name, location, or category
search_flowsFind flows by name and/or category folder
process_detailsFull process info: exchanges, parameters, providers
system_parametersList parameters for a product system
global_parametersLook up database-level parameters
find_unitLook up units and their flow properties
chemical_synonymsPubChem synonym search to find database matches

Build (8 tools)

ToolPurpose
create_global_parameterCreate or update a database-level parameter, as a value or a formula
create_flowCreate product, waste, or elementary flows
edit_flowAdd or update flow properties, or change the reference property
create_bridgeCreate a bridge flow + process in one call
create_processBuild a process with exchanges, parameters, and providers
edit_processEdit an existing process: add/update/remove exchanges and parameters
create_systemCreate a product system from a process
delete_entityDelete a process, flow, or product system (requires user confirmation; refuses to delete a flow that is still in use)

Audit (6 tools)

ToolPurpose
extract_modelPull everything from a model folder for inspection
audit_modelStructural checks: missing qrefs, zero amounts, unit mismatches
validate_systemMirrors openLCA's Validate button: linking, parameters, test calculation
get_system_linksShow which providers are linked for each exchange
data_qualityExtract pedigree matrices and uncertainty from a process
find_flow_usageFind the processes and impact categories that use a flow

Calculate (9 tools)

ToolPurpose
calculateBaseline impact assessment
contribution_analysisProcess-level contribution breakdown per impact category
upstream_treeMulti-level contribution tree for one category, with pedigree scores on every branch
monte_carloUncertainty simulation with statistics
inventory_flowsRaw elementary flow results (LCI level)
scenariosScenario calculations from conversational parameter values
scenarios_csvScenario calculations from a CSV file
sensitivityParameter sensitivity analysis
sensitivity_csvSensitivity analysis from a CSV file

Meta (1 tool)

ToolPurpose
helpShow capabilities grouped by workflow, with optional topic filter

Tool annotations

Every tool carries MCP tool annotations (readOnlyHint, destructiveHint, idempotentHint, openWorldHint) so clients can decide whether to auto-approve or prompt for confirmation. Explore and Calculate tools are read-only. Build tools signal that they modify the database. delete_entity is marked destructive. CSV tools are marked as writing files to disk. chemical_synonyms is marked as reaching an external service (PubChem).

Resources

The server exposes four MCP resources that AI clients can read on demand:

ResourceURIPurpose
Database infolca://database/infoLive database overview
Assistant instructionslca://knowledge/instructionsOperational rules, workflows, and conventions
IPC protocol referencelca://knowledge/ipc-protocolComplete JSON-RPC spec for all 60 IPC methods
openLCA resourceslca://knowledge/openlca-resourcesLinks to databases, docs, forums, and training

The IPC protocol reference enables AI clients to help users connect to openLCA from any programming language by generating client code from the protocol specification.

EPD model building

The server includes a guided workflow for building EN15804 EPD models from LCI data. The AI maps LCI items to lifecycle modules (A1-D), creates the folder structure, bridge processes, module processes, and product systems. Ask 'build an EPD from this LCI' to start.

Standalone scripts

For repeated analyses, the server recommends standalone Python scripts that run without AI tokens. After a scenario or sensitivity calculation, it offers to generate the CSV file needed to run the equivalent script from the openLCA-IPC-tools-python repository.

Related repositories

RepositoryDescription
openLCA-IPC-tools-pythonStandalone Python scripts for scenarios, sensitivity, parameters, prospective LCA
openLCA-IPC-tools-rR client for openLCA IPC (first R package for openLCA)
openLCA-IPC-tools-fortranFortran IPC client and batch calculator

About

Built by Below280 Limited, a UK LCA, EPD and CBAM consultancy and official UK partner for openLCA. The calculation patterns in this server are derived from production scripts used in EPD and LCA consulting work, tested against ecoinvent 3.10/3.11/3.12, EN15804GD, and US Federal LCA Commons (FLCAC) databases.

For issues: GitHub Issues or [email protected]

Documentation

Licence

MPL-2.0

mcp-name: io.github.Below280/b280-olca-mcp

来源:README.md,提交 191f3d3

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

3
  1. v1.16.0最新Sep 27, 2026
  2. v1.15.0Sep 25, 2026
  3. v1.14.0Sep 16, 2026

评分

已满足适用检查项的 40%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分

    请在仓库或注册中心条目中声明许可证。