Back to Home
dgaida icon

PyADM1ODE

by dgaida

Overview

Modeling, simulating, and optimizing agricultural biogas plants using the Anaerobic Digestion Model No. 1 (ADM1), with an MCP server for LLM-driven configuration and control.

Installation

Run Command
python -m pyadm1.configurator.mcp.server

Environment Variables

  • OPENAI_API_KEY
  • PG_HOST
  • PG_PORT
  • PG_DATABASE
  • PG_USERNAME
  • PG_PASSWORD

Security Notes

CRITICAL: The project relies on dynamic loading and execution of external C# DLLs (`biogas`, `substrates`, `plant`, `physchem` DLLs) using Pythonnet (`clr`). The source code for these DLLs is referenced as a separate repository and is not provided for audit within this codebase, introducing a significant supply chain security risk. A malicious or compromised DLL could execute arbitrary code on the system. Additionally, the `pg_dump` utility is called via `subprocess` for database backups, which can be a command injection risk if inputs (like `filepath` or connection string components) are not thoroughly sanitized. While the FastMCP LLM integration appears to expose well-defined tools, potential vulnerabilities in these underlying functions could be exploited by a malicious LLM prompt or compromised LLM.

Similar Servers

Stats

Interest Score28
Security Score3
Cost ClassMedium
Avg Tokens1000
Stars1
Forks1
Last Update2025-11-22

Tags

BiogasADM1SimulationOptimizationLLMPlant ModelingData Management