Skip to main content
Glama

k11 Integration QA: MCP server and CI tool

PyPI CI License: MIT

The API returned 201. Did the consumer actually reserve the stock?

In event-driven and batch systems the bugs live between the parts: the event is published with the wrong quantity, a consumer drops a message it can't read instead of dead-lettering it, a nightly job double-counts when it's retried. Unit tests and API tests each pass. k11 Integration QA tests the whole chain in one flow: the API call, the Kafka message, the consumer's effect in the database, the dead-letter queue and the batch job, with evidence for the release decision.

name: An order reserves stock through the inventory consumer
fixtures: [sku]                                   # a fresh SKU in the test database, deleted afterwards
steps:
  - listen: { broker: main, topic: orders.events, as: events }    # subscribe BEFORE acting
  - call: POST /orders
    body: { sku: "${fixture.sku.sku}", qty: 3 }
    expect: { status: 201 }
    save: { orderId: "$.id" }
  - name: OrderCreated is published and matches the AsyncAPI contract
    expect_message:
      from: events
      match: { "$.type": OrderCreated, "$.orderId": "${orderId}" }
      schema: OrderCreated
      within: 10s
  - name: the inventory consumer reserves all 3
    expect_message: { from: events, match: { "$.type": StockReserved, "$.orderId": "${orderId}", "$.qty": 3 }, within: 10s }
  - name: the reservation is in the database
    wait_until:
      db: SELECT reserved FROM inventory WHERE sku = :sku
      params: { sku: "${fixture.sku.sku}" }
      expect: { row: { reserved: 3 } }
      within: 10s

See it work

The included demo, K11 Shop, has an order API, two consumers, a dead-letter queue and a batch job, each with a bug you can switch on. With all three bugs on:

4 of 4 flow(s) did not pass: 0 passed, 4 failed (2 published, 6 message checks, 2 job runs)
  - An order reserves stock through the inventory consumer — the inventory consumer reserves all 3:
      0 of 1 matching message(s) within 10s (2 message(s) on orders.events); closest: $.qty: expected 3, got 1
  - Cancelling an order releases its stock — the stock is released: reserved 0: expected 0, got -1; not met after 41 check(s)
  - An unreadable command goes to the dead-letter queue — it is dead-lettered with the reason:
      0 of 1 matching message(s) within 10s (0 message(s) on orders.dlq)
  - The sku_totals batch job is safe to run twice — the total is still 2: qty 2: expected 2, got 4

When nothing matches, the report shows the closest message and how it differed, so "the event never came" and "the event came with the wrong quantity" are different findings. With the bugs off, all four flows pass. CI runs the same flows against a real Apache Kafka broker.

pip install "k11-integration-qa-mcp[kafka]"
python demo/shop/shop.py --bugs consumer          # in-process broker; add --kafka localhost:9092 for Kafka

Related MCP server: Spec Kit Acceptance Gate MCP

Step types

Everything from k11 API Functional QA (call, db, fixtures, cleanup, auth profiles, ${ENV:…} secrets, matchers like { gt: 0 }), plus:

Step

What it does

listen

Subscribe to a topic from now on, before the action that should produce the event

publish

Send a message (JSON or text, key, headers): commands, or a poison message for the DLQ

expect_message

A matching message arrives within the time limit; match on JSON paths, key, header:Name, value; count, save, AsyncAPI schema

expect_no_message

Nothing matching arrives (no OrderFailed, no duplicate) for the given time

run_job

Run a batch job: a command (a list, no shell) or an HTTP trigger with polling (until, fail_if)

wait_until

Poll a SELECT or GET until the expectation holds: eventual consistency without sleeps

Configure

.qa-mcp/integration.yaml (environments, auth, databases and fixtures come from .qa-mcp/api-test.yaml, shared with API Functional QA):

brokers:
  main: { type: kafka, bootstrap: "${ENV:KAFKA_BOOTSTRAP}" }     # extra keys go to kafka-python (security_protocol, sasl_*…)
jobs:
  sku_totals:
    command: [python, jobs/sku_totals.py]
    env: { SHOP_DB: shop.db }
    timeout: 60s
  reindex:
    http: { call: POST /admin/jobs/reindex, save: { jobId: "$.id" } }
    poll: { call: "GET /admin/jobs/${jobId}", until: { "$.status": done }, fail_if: { "$.status": failed } }
asyncapi: asyncapi.yaml
protected_topics: ["prod.*", "*.prod.*", "*production*"]

Safety

  • Publishing and jobs change data, so they follow API Functional QA's write rules: local hosts, test-named environments or allow_writes: true; production-like names are refused.

  • Protected topics (production-named by default) are never published to, on any environment.

  • Jobs run without a shell (the command is a list), inside the project, with a time limit.

  • Every wait has a time limit; listeners are closed and cleanup always runs.

  • Read-only listening: listeners use no consumer group, so they never take messages from your real consumers or move their offsets.

  • Secrets come from ${ENV:NAME} and are masked in reports.

Tools (MCP)

Tool

What it does

integration_config

Brokers, jobs, AsyncAPI contract, protected topics, environments (and whether publishing and jobs may run there), flows

run_integration_tests

Runs flows (all, by path or by tag); writes .qa-mcp/integration-report/ (Markdown, JSON, JUnit)

validate_flow

Checks a flow file's structure without running it

watch_topic

Listens to a topic for a few seconds and shows the messages, to learn their shape

get_report

The last report, or one flow's steps with full evidence (messages, queries, job output)

init_integration_config

Writes a starter .qa-mcp/integration.yaml and an example flow

Command: /integration-check.

Install and CI

pip install "k11-integration-qa-mcp[kafka]"
k11-integration-qa-mcp init                   # .qa-mcp/integration.yaml + tests/integration/example.yaml
k11-integration-qa-mcp run --env ci           # exit 1 when a flow fails (--fail-on never to only report)

Claude Code:

/plugin install integration-qa --marketplace K11-Software-Solutions/k11techlab-integration-qa-mcp

On Claude Code before 2.1.275: /plugin marketplace add K11-Software-Solutions/k11techlab-integration-qa-mcp, then /plugin install integration-qa@k11-integration-qa.

docs/integration-tests.yml starts Kafka and runs the flows on every pull request. integration-report.json is read by the k11 Release Gate as integration evidence.

Part of the K11 QA suite

Playwright QA · Selenium QA · Appium QA · API Contract QA · API Functional QA · API Security QA · Integration QA · Performance QA · LLM Assure · Release Gate · Release Readiness Agent

Roadmap

  • RabbitMQ, Amazon SQS/SNS and Google Pub/Sub brokers

  • Schema Registry (Avro, Protobuf) payloads

  • Ordering and exactly-once checks (per-key order, duplicate detection)

  • Generating flows from an AsyncAPI document


Built by K11 Software Solutions. MIT licensed.

Available Tools

6 tools
get_reportGet reportA

The last integration report, or one flow's steps with full evidence (requests, messages, queries, job output).

Inputs: flow.

init_integration_configCreate integration configB

Write a starter .qa-mcp/integration.yaml and, optionally, tests/integration/example.yaml.

Inputs: overwrite, example_flow.

integration_configIntegration configC

Brokers, jobs, AsyncAPI contract, protected topics, environments (and whether publishing and jobs may run there) and the flows found under tests/integration/.

Inputs: no named parameters.

run_integration_testsRun integration testsB

Run integration flows (default: all of tests/integration/) and write .qa-mcp/integration-report/ (JSON evidence for the Release Gate, Markdown for the PR, JUnit). Returns the summary and the failing steps with the closest message seen, query results or job output.

Inputs: tags, paths, environment.

validate_flowValidate flowA

Check a flow file's structure (step kinds and their keys) without running it.

Inputs: path (required).

watch_topicWatch topicA

Listen to a topic for a few seconds (read-only, from now on) and return the messages seen, to learn their shape before writing expect_message steps. Values are shown as sent; don't use it on topics carrying real personal data.

Inputs: topic (required), limit, broker, seconds.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.3/5.0

    Scored across 6 tools

    Disambiguation4/5

    Each tool maps to a distinct phase of the integration-QA workflow (read config, init config, validate a flow, run flows, watch a topic, fetch a report). The only real confusion is between integration_config and init_integration_config, which differ only by an 'init_' prefix, and get_report versus run_integration_tests, which both surface failing-step evidence.

    Naming Consistency4/5

    Five of six tools use a clean snake_case verb_noun pattern (run_integration_tests, validate_flow, watch_topic, get_report, init_integration_config). integration_config breaks the pattern as a bare noun, but the deviation is minor and readable.

    Tool Count5/5

    Six tools is well-scoped for a narrow integration-QA/Release-Gate domain, with no obvious filler. Each tool covers a distinct lifecycle step: configure, author, validate, observe, run, and report.

    Completeness4/5

    The surface covers the full loop from bootstrapping config through validating, running, inspecting, and reporting on flows. The main gap is that there is no way to update or edit an existing integration.yaml (only a one-shot init), forcing agents to rewrite the file blind.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables running YAML-defined test suites against MCP servers and agent workflows, with live or simulated execution, assertions, and regression reporting.
      72 npm
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Gives AI coding agents dereferenced OpenAPI facts about the backend being implemented, and verifies that implementation against a local server via ping probes, single requests, contract tests, and ordered multi-step scenarios with extraction and assertions. It also spins up loopback mocks for missing dependencies and derives a relational data model from the spec, reconciling it with optional live database evidence and emitting additive SQL that is never executed.
      125 npm
      MIT