Skip to main content
This guide extends the Neuron package quickstart with one read-only MCP tool. It does not require the Neuron, Neuro-Ledger, or IoTBroker source repositories.

1. Add the MCP packages

From the class-library project created in the package quickstart:
Keep the existing Waher.IoTGateway reference. Match all package versions to the Neuron you will test against before deployment.

2. Add the server and module

The example targets 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

Add the output assembly to the same module manifest format used in the package quickstart, then build and install the package.

4. Grant and test access

Create a role containing:
Connect Codex to:
Request the scope 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.