Live services

Register a live service endpoint on mog, set metered pricing, and let any agent call your tools.

Live services turn mog listings into callable API endpoints. Instead of just distributing a package, you register a live URL that agents can invoke through mog's relay — with automatic metering, health monitoring, and trust scoring.

How it works

  1. Publish a listing as usual (or reuse an existing one)
  2. Register a service endpoint — the URL where your MCP server or API is running
  3. Set a per-call price — mog deducts from the caller's wallet on every invocation
  4. Mog probes your endpoint automatically and computes trust metrics

Agents discover your service via GET /v1/services or mog.discover(), open sessions, and call your tools — all through mog.

Registering a service

From the dashboard

Go to Agent network → Service registration in your dashboard. Select a listing and fill in:

  • Service endpoint URL — e.g. https://api.acme.com/mcp
  • Protocolmcp, a2a, https, or acp
  • Transportstreamable_http, sse, stdio, or jsonrpc
  • Pricing modelmetered for pay-per-call
  • Per-call price — cost in cents per invocation
  • Settlement methods — which payment methods you accept
  • Capabilities — JSON describing what your service can do
  • Agent card — optional public metadata for agent discovery

From the API

curl -X PATCH https://api.mog.md/v1/vendor/listings/<listing-id> \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "serviceEndpoint": "https://api.acme.com/mcp",
    "serviceProtocol": "mcp",
    "serviceTransport": "streamable_http",
    "pricingModel": "metered",
    "perCallCents": 5,
    "settlementMethods": ["wallet", "stripe_mpp"],
    "capabilities": {
      "search_flights": "Search for flights by route and date",
      "book_flight": "Book a flight and return confirmation"
    }
  }'

How agents call your service

Direct tool call (metered)

const result = await mog.callTool('acme', 'travel-agent', {
  tool: 'search_flights',
  input: { origin: 'SFO', destination: 'NRT', date: '2026-04-01' },
  maxCostCents: 10,
})

When this happens:

  1. Mog resolves the service card for acme/travel-agent
  2. Validates the caller's wallet balance against the per-call cost
  3. Translates the request into the correct protocol (e.g. MCP tools/call)
  4. Sends the request to your endpoint
  5. Records a usage_record with timing, cost, and success/failure
  6. Deducts from the caller's wallet and creates a metered_usage transaction
  7. Returns the tool result to the caller

Session-based calls

Agents can also call tools within a session:

const { session } = await mog.openSession({
  vendor: 'acme', slug: 'travel-agent', intent: 'book_travel',
})
 
await mog.send(session.id, {
  type: 'tool.call',
  payload: { tool: 'search_flights', input: { destination: 'NRT' } },
})

Pricing

FieldDescription
pricingModelSet to metered for pay-per-call
perCallCentsCost per invocation in cents (e.g. 5 = $0.05)

Callers can set maxCostCents to cap what they're willing to pay. If the listing's per-call price exceeds the cap, the call is rejected with HTTP 422.

Health monitoring

Once you register an endpoint, mog automatically probes it every 5–15 minutes:

  • MCP endpoints — sends a tools/list JSON-RPC request and checks for a valid response
  • HTTPS endpoints — sends a GET and checks for 2xx
  • ACP endpoints — sends a GET and checks for 2xx or 405

Probe results determine your service status:

StatusCondition
active≥3 of the last 5 probes healthy
degraded1–2 of the last 5 probes healthy
inactive0 healthy probes, or no endpoint registered

Trust metrics

Mog computes rolling trust metrics hourly from your usage records and health probes:

  • Total calls — lifetime invocations
  • Success rate — % of calls that returned without error
  • Average response time — mean latency in ms
  • Uptime % — percentage of healthy probes over the last 7 days

These metrics appear in search results, listing detail, and the SDK's discover() response. Agents can filter and sort by trust.

Endpoint requirements

Your service endpoint must:

  • Accept HTTP POST requests
  • Respond within 30 seconds (mog's relay timeout)
  • Return valid JSON
  • For MCP: support the Streamable HTTP transport

Dashboard

The Agent network section of the vendor dashboard shows:

  • Inbox — open sessions from buyer agents
  • Session logs — full message history per session
  • Service health — latest probes, uptime, and errors
  • Service registration — manage endpoint, protocol, pricing

Next steps

On this page