https://github.com/daedalus/mcp-snap7
https://github.com/daedalus/mcp-snap7
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/daedalus/mcp-snap7
- Owner: daedalus
- License: mit
- Created: 2026-03-28T06:02:01.000Z (3 months ago)
- Default Branch: master
- Last Pushed: 2026-03-28T06:08:16.000Z (3 months ago)
- Last Synced: 2026-04-03T02:59:21.730Z (3 months ago)
- Language: Python
- Size: 10.7 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# mcp-snap7
> MCP server for python-snap7, enabling MCP clients to interact with Siemens PLCs
[](https://pypi.org/project/mcp-snap7/)
[](https://pypi.org/project/mcp-snap7/)
[](https://codecov.io/gh/daedalus/mcp-snap7)
[](https://github.com/astral-sh/ruff)
## Install
```bash
pip install mcp-snap7
```
## Requirements
- python-snap7 requires the libsnap7 library to be installed on your system.
See [python-snap7 documentation](https://python-snap7.readthedocs.io/) for installation instructions.
## Usage
### As MCP Server
Configure your MCP client to use `mcp-snap7` as a stdio server:
```json
{
"mcpServers": {
"mcp-snap7": {
"command": "mcp-snap7"
}
}
}
```
### Available Tools
- `connect_plc` - Connect to a Siemens PLC
- `disconnect_plc` - Disconnect from PLC
- `get_connected` - Check connection status
- `db_read` / `db_write` - Read/write data blocks
- `mb_read` / `mb_write` - Read/write memory bytes
- `tm_read` / `tm_write` - Read/write timers
- `ct_read` / `ct_write` - Read/write counters
- `eb_read` / `eb_write` - Read/write edge inputs
- `ab_read` / `ab_write` - Read/write absolute bytes
- `get_cpu_info` - Get CPU information
- `get_cpu_state` - Get CPU state
- `get_protection` - Get PLC protection level
- `plc_cold_start` - Trigger cold start
- `plc_hot_start` - Trigger hot start
- `plc_stop` - Stop PLC
- `get_error_text` - Get error description
## Development
```bash
git clone https://github.com/daedalus/mcp-snap7.git
cd mcp-snap7
pip install -e ".[test]"
# run tests
pytest
# format
ruff format src/ tests/
# lint
ruff check src/ tests/
# type check
mypy src/
```