M3ter · Capability

m3ter API — Auth

m3ter API — Auth. 1 operations. Lead operation: Get Token. Self-contained Naftiko capability covering one M3ter business surface.

Run with Naftiko M3terAuth

What You Can Do

POST
Generatetoken — Get Token
/v1/oauth/token

MCP Tools

get-token

Get Token

read-only

Capability Spec

m3ter-auth.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: m3ter API — Auth
  description: 'm3ter API — Auth. 1 operations. Lead operation: Get Token. Self-contained Naftiko capability covering one
    M3ter business surface.'
  tags:
  - M3ter
  - Auth
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    M3TER_API_KEY: M3TER_API_KEY
capability:
  consumes:
  - type: http
    namespace: m3ter-auth
    baseUri: https://api.m3ter.com
    description: m3ter API — Auth business capability. Self-contained, no shared references.
    resources:
    - name: oauth-token
      path: /oauth/token
      operations:
      - name: generatetoken
        method: POST
        description: Get Token
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    authentication:
      type: bearer
      token: '{{env.M3TER_API_KEY}}'
  exposes:
  - type: rest
    namespace: m3ter-auth-rest
    port: 8080
    description: REST adapter for m3ter API — Auth. One Spectral-compliant resource per consumed operation, prefixed with
      /v1.
    resources:
    - path: /v1/oauth/token
      name: oauth-token
      description: REST surface for oauth-token.
      operations:
      - method: POST
        name: generatetoken
        description: Get Token
        call: m3ter-auth.generatetoken
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: m3ter-auth-mcp
    port: 9090
    transport: http
    description: MCP adapter for m3ter API — Auth. One tool per consumed operation, routed inline through this capability's
      consumes block.
    tools:
    - name: get-token
      description: Get Token
      hints:
        readOnly: true
        destructive: false
        idempotent: false
      call: m3ter-auth.generatetoken
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.