Services
A service exposes Go methods over RPC. Go Micro registers it so other programs can find it by name.
The getting-started guide builds a notes service and calls it over RPC. Continue with that service here.
Call from Go
Other Go programs can call the same endpoint using a client:
req := service.Client().NewRequest("notes", "Notes.List", &ListRequest{})
var rsp ListResponse
if err := service.Client().Call(ctx, req, &rsp); err != nil {
return err
}
Discovery
The default registry uses multicast DNS. Processes must be on the same network with multicast enabled. A registry such as NATS works where multicast is blocked.
For NATS, run a NATS server and add this import to your service:
import _ "go-micro.dev/v6/cmd/defaults"
Then select the same registry for each process:
export MICRO_REGISTRY=nats
export MICRO_REGISTRY_ADDRESS=127.0.0.1:4222
go run .
Set those variables in each terminal running micro call, micro chat, or
micro gateway, and in your MCP client’s process environment. The CLI already
includes the registry plugins. This changes discovery; the service still uses RPC.
For a custom Go agent, pass the registry and client explicitly as shown in the
agent guide.
Contracts
Go handlers work without code generation. For shared protobuf contracts, use protoc-gen-micro.
Use the service with an external agent through MCP, terminal chat, or your own Go agent.