Getting Started
Getting Started
Prerequisites
- .NET 10 SDK
- Network access to a Beckhoff TwinCAT PLC
- (Optional) An OIDC identity provider (Keycloak, Entra ID, etc.)
Quick Start
1. Clone and build
git clone https://github.com/patdhlk/adsify.git
cd adsify
dotnet build Adsify.sln2. Configure your PLC connection
Edit src/Adsify.Api/appsettings.Development.json:
{
"AmsRouter": {
"Name": "Adsify",
"NetId": "192.168.1.78.1.1",
"TcpPort": 48898,
"LoopbackIP": "127.0.0.1",
"LoopbackPort": 48898,
"ChannelPortType": "Loopback",
"RemoteConnections": [
{
"Name": "MyPLC",
"Address": "192.168.1.136",
"NetId": "192.168.1.136.1.1",
"Type": "TCP_IP"
}
]
},
"PlcTargets": {
"MyPLC": {
"AmsNetId": "192.168.1.136.1.1",
"Port": 851,
"DisplayName": "My TwinCAT PLC"
}
}
}Replace the IP addresses and AMS Net IDs with your actual PLC values.
3. Run
ASPNETCORE_ENVIRONMENT=Development dotnet run --project src/Adsify.Api --urls "http://localhost:5000"4. Test
# List connected PLCs
curl http://localhost:5000/api/plcs
# Read a variable
curl http://localhost:5000/api/plcs/MyPLC/variables/MAIN.nCounter
# Browse symbols
curl http://localhost:5000/api/plcs/MyPLC/symbols
# Device info
curl http://localhost:5000/api/plcs/MyPLC/device/info5. Explore the API
Open the Swagger UI at http://localhost:5000/swagger to see all available endpoints with AI-optimized descriptions.
In Development mode without an OIDC Authority configured, authentication is bypassed with full admin access. See Authentication to set up proper auth for production.
MCP for AI Assistants
Adsify includes a built-in Model Context Protocol (MCP) server that lets AI assistants interact with PLCs through natural language.
Enable the MCP server in your configuration:
{
"Features": {
"Mcp": { "Enabled": true }
}
}Then configure your AI assistant to connect to the /mcp endpoint. See the MCP Server documentation for client setup instructions and the full list of available tools and resources.
Try asking your AI assistant: “List all PLCs and show their status.”