Skip to main content

MCP server for python-snap7, enabling MCP clients to interact with Siemens PLCs

Project description

mcp-snap7

MCP server for python-snap7, enabling MCP clients to interact with Siemens PLCs

PyPI Python Coverage Ruff

Install

pip install mcp-snap7

Requirements

  • python-snap7 requires the libsnap7 library to be installed on your system. See python-snap7 documentation for installation instructions.

Usage

As MCP Server

Configure your MCP client to use mcp-snap7 as a stdio server:

{
  "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

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/

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mcp_snap7-0.1.0.tar.gz (4.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mcp_snap7-0.1.0-py3-none-any.whl (6.1 kB view details)

Uploaded Python 3

File details

Details for the file mcp_snap7-0.1.0.tar.gz.

File metadata

  • Download URL: mcp_snap7-0.1.0.tar.gz
  • Upload date:
  • Size: 4.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for mcp_snap7-0.1.0.tar.gz
Algorithm Hash digest
SHA256 b30a8e0b6b89b22f8c5eda368cb1cfcaa153f3988cbfccd3dacc572de13fa866
MD5 348d2332a5a990357ade7b65c1f29804
BLAKE2b-256 4f9d2e4269368eaa78a0a3570c01daf516025de57b46910b84c1a86c98f2eed0

See more details on using hashes here.

Provenance

The following attestation bundles were made for mcp_snap7-0.1.0.tar.gz:

Publisher: pypi-publish.yml on daedalus/mcp-snap7

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mcp_snap7-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: mcp_snap7-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 6.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for mcp_snap7-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4db9d50841fcae09022d8969641ab48a8ef1b13bb58ca17aee85417893f152e3
MD5 a379ae7bd70104d2e0aa4231006aadf3
BLAKE2b-256 5973d2dde73c3799d32179490a88ab80d9faa3d6e501d53cf5de1c0e32357812

See more details on using hashes here.

Provenance

The following attestation bundles were made for mcp_snap7-0.1.0-py3-none-any.whl:

Publisher: pypi-publish.yml on daedalus/mcp-snap7

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page