modbus-mcp
Modbus MCP 서버
Modbus 데이터를 표준화하고 상황에 맞게 조정하여 AI 에이전트와 산업용 IoT 시스템의 원활한 통합을 지원하는 MCP 서버입니다.
특징
Modbus 도구 :
읽기/쓰기 홀딩 레지스터(
read_register,write_register).코일 읽기/쓰기(
read_coils,write_coil).입력 레지스터를 읽습니다(
read_input_registers).여러 개의 홀딩 레지스터를 읽습니다(
read_multiple_holding_registers).
프롬프트 : 사용자 정의 가능한 프롬프트(
analyze_register)를 사용하여 Modbus 레지스터 값을 분석합니다.유연한 연결 : 환경 변수를 통해 구성된 TCP, UDP 또는 직렬을 통한 Modbus를 지원합니다.
Related MCP server: Industrial MCP
요구 사항
파이썬 : 3.10
종속성 및 가상 환경 관리를 위한 uv .
설치
uv설치 :지엑스피1
저장소 복제 :
git clone https://github.com/kukapay/modbus-mcp.git cd modbus-mcp종속성 설치 :
uv sync
구성
서버는 환경 변수를 통해 지정된 매개변수를 사용하여 Modbus 장치에 연결합니다. 이러한 변수는 .env 파일이나 셸 환경에서 설정하세요.
환경 변수
변하기 쉬운 | 설명 | 기본 | 필수의 |
| 연결 유형: |
| 예 |
| TCP/UDP의 호스트 주소 |
| TCP/UDP의 경우 |
| TCP/UDP용 포트 |
| TCP/UDP의 경우 |
| 직렬 포트(예: |
| 직렬용 |
| 직렬 통신 속도 |
| 직렬용 |
| 직렬 패리티: |
| 직렬용 |
| 직렬 정지 비트 |
| 직렬용 |
| 직렬 바이트 크기 |
| 직렬용 |
| 직렬 시간 초과(초) |
| 직렬용 |
예제 .env 파일
TCP의 경우:
MODBUS_TYPE=tcp
MODBUS_HOST=192.168.1.100
MODBUS_PORT=502직렬의 경우:
MODBUS_TYPE=serial
MODBUS_SERIAL_PORT=/dev/ttyUSB0
MODBUS_BAUDRATE=9600
MODBUS_PARITY=N
MODBUS_STOPBITS=1
MODBUS_BYTESIZE=8
MODBUS_TIMEOUT=1용법
Claude Desktop 설치
구성 파일:
{
"mcpServers": {
"Modbus MCP Server": {
"command": "uv",
"args": [ "--directory", "/path/to/modbus-mcp", "run", "modbus-mcp" ],
"env": { "MODBUS_TYPE": "tcp", "MODBUS_HOST": "127.0.0.1", "MODBUS_PORT": 502 },
}
}
}도구 사용
참고 : 자연어 지원은 클라이언트가 프롬프트를 구문 분석하고 도구에 매핑하는 능력에 따라 달라집니다. MCP Inspector는 구조화된 JSON을 요구하지만, 아래 예시에서는 대화형 입력이 어떻게 변환되는지 보여줍니다.
보류 등록부 읽기 :
즉각적인 :
Please read the value of Modbus holding register 0.MCP 검사기 JSON :
{ "tool": "read_register", "parameters": {"address": 0} }예상 출력 :
Value: <register_value>
보류 등록부에 쓰기 :
즉각적인 :
Set Modbus holding register 10 to the value 100.MCP 검사기 JSON :
{ "tool": "write_register", "parameters": {"address": 10, "value": 100} }예상 출력 :
Successfully wrote 100 to register 10
코일 읽기 :
즉각적인 :
Check the status of the first 5 Modbus coils starting at address 0.MCP 검사기 JSON :
{ "tool": "read_coils", "parameters": {"address": 0, "count": 5} }예상 출력 :
Coils 0 to 4: [False, False, False, False, False]
코일에 쓰기 :
즉각적인 :
Turn on Modbus coil 5.MCP 검사기 JSON :
{ "tool": "write_coil", "parameters": {"address": 5, "value": true} }예상 출력 :
Successfully wrote True to coil 5
입력 레지스터 읽기 :
즉각적인 :
Read the values of 3 Modbus input registers starting from address 2.MCP 검사기 JSON :
{ "tool": "read_input_registers", "parameters": {"address": 2, "count": 3} }예상 출력 :
Input Registers 2 to 4: [<value1>, <value2>, <value3>]
여러 개의 보류 레지스터 읽기 :
즉각적인 :
Get the values of Modbus holding registers 0 through 2.MCP 검사기 JSON :
{ "tool": "read_multiple_holding_registers", "parameters": {"address": 0, "count": 3} }예상 출력 :
Holding Registers 0 to 2: [<value1>, <value2>, <value3>]
특허
이 프로젝트는 MIT 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 라이선스를 참조하세요.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
No tool schema history has been recorded yet.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
An MCP server giving access to Grafana dashboards, data and more.
Cloud-hosted MCP server for secure AI access to enterprise data sources via CData Connect AI.
MCP server for querying and analyzing data from ad platforms, analytics tools, and spreadsheets
Hosted MCP server for AI-driven data ops. Create apps, manage schemas, and CRUD structured data.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceMCP server for Modbus TCP devices that enables AI agents to read/write PLC registers by name using YAML device profiles, with a built-in simulator.2MIT
- AlicenseNot gradedqualityDmaintenanceAn open-source MCP server that bridges AI models with industrial equipment, supporting multiple protocols like Modbus, OPC UA, and MQTT for reading data and controlling machines.2Apache 2.0
- AlicenseAqualityBmaintenanceMCP server that unifies real-time telemetry from industrial systems into a single queryable interface, enabling production visibility, anomaly detection, and operational insights.5190MIT
- AlicenseNot gradedqualityBmaintenanceMCP server for Modbus RTU/TCP instrument control, enabling query and write operations on Modbus registers through a standardized interface, supporting both standalone use and integration with lab-executor.MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/kukapay/modbus-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server