1. Add the MCP packages
From the class-library project created in the package quickstart:Waher.IoTGateway reference. Match all package versions to the Neuron you will test against before deployment.
2. Add the server and module
netstandard2.1 and has been compiled with Waher.IoTGateway 3.10.2, MCP 1.1.0, and OAuth 1.0.1.
3. Build and package
4. Grant and test access
Create a role containing:MCP:Example:Tools:Read, then call Read Value. Confirm that removing the privilege causes the tool call to be rejected.
Before adding a write tool
- Give every operation its own privilege leaf.
- Describe the real side effect in the title and description.
- Set modification, destruction, idempotency, and open-world annotations accurately.
- Bound every input and validate it again in the method.
- Log the actor, target, and outcome without logging secrets.
- Test allowed, denied, invalid, repeated, and partial-failure calls.