Naftiko · Capability

Asyncapi Mocked Event Stream Capability

A capability that turns an AsyncAPI document into a mocked event stream usable as REST-poll + MCP tools, so consumers can develop against a contract before broker access exists.

Run with Naftiko NaftikoAsyncAPIMocking

What You Can Do

GET
Poll events
/streams/{{mock_id}}/events

MCP Tools

create-asyncapi-mock

poll-events

read-only

Capability Spec

asyncapi-mocked-event-stream-capability.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  title: Asyncapi Mocked Event Stream Capability
  description: A capability that turns an AsyncAPI document into a mocked event stream usable as REST-poll + MCP tools, so consumers can develop against a contract before broker access exists.
  tags: [Naftiko, AsyncAPI, Mocking]
  created: '2026-05-01'
  modified: '2026-05-04'
binds:
- namespace: naftiko-env
  keys: {NAFTIKO_API_KEY: NAFTIKO_API_KEY}
capability:
  consumes:
  - namespace: naftiko-mock
    type: http
    baseUri: https://api.naftiko.com
    authentication: {type: bearer, token: '{{NAFTIKO_API_KEY}}'}
    resources:
    - name: asyncapi-mocks
      path: /v1/asyncapi-mocks
      operations:
      - {name: create-asyncapi-mock, method: POST, description: Create a mocked event stream from an AsyncAPI doc.}
    - name: stream-events
      path: /v1/asyncapi-mocks/{{mock_id}}/events
      operations:
      - {name: poll-events, method: GET, inputParameters: [{name: mock_id, in: path}]}
  exposes:
  - type: rest
    address: 0.0.0.0
    port: 8080
    namespace: asyncapi-mocked-event-stream-capability-rest
    description: REST-poll surface over mocked AsyncAPI event streams.
    resources:
    - name: poll
      path: /streams/{{mock_id}}/events
      operations:
      - {method: GET, name: poll-events, inputParameters: [{name: mock_id, in: path, type: string}], call: naftiko-mock.poll-events}
  - type: mcp
    address: 0.0.0.0
    port: 3010
    namespace: asyncapi-mocked-event-stream-capability-mcp
    description: MCP exposing AsyncAPI mock streams.
    tools:
    - {name: create-asyncapi-mock, call: naftiko-mock.create-asyncapi-mock}
    - name: poll-events
      hints: {readOnly: true}
      inputParameters: [{name: mock_id, type: string, required: true}]
      call: naftiko-mock.poll-events
  - type: skill
    address: 0.0.0.0
    port: 3011
    namespace: asyncapi-mocked-event-stream-capability-skills
    description: Skill bundle for AsyncAPI mock streams.
    skills:
    - name: asyncapi-mocked-event-stream-capability
      description: AsyncAPI mocked event stream consumption.
      location: file:///opt/naftiko/skills/asyncapi-mocked-event-stream-capability
      allowed-tools: create-asyncapi-mock,poll-events
      tools:
      - {name: create-asyncapi-mock, from: {sourceNamespace: asyncapi-mocked-event-stream-capability-mcp, action: create-asyncapi-mock}}
      - {name: poll-events, from: {sourceNamespace: asyncapi-mocked-event-stream-capability-mcp, action: poll-events}}