k11 Integration QA: MCP server and CI tool
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
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.
Metadata
Release files for k11-integration-qa-mcp 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| k11_integration_qa_mcp-0.1.0.tar.gz | 20.8 kB | With provenance | Details for k11_integration_qa_mcp-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| k11_integration_qa_mcp-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for k11_integration_qa_mcp-0.1.0-py3-none-any.whl |
Total release size: 47.0 kB
Release files / k11_integration_qa_mcp-0.1.0.tar.gz
| Download URL | k11_integration_qa_mcp-0.1.0.tar.gz |
|---|---|
| Size | 20.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fc1aba0f6de96173d4bf61a78ee82fdbe44da64cb21842045c27247ece3d0763
|
|
BLAKE2b-256 checksum How to use checksums |
d0d575dfea5cd3de35292235f1b112d6314575b39722d5d1450b9fc9ffde61f4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 17, 2026.
Transparency logRelease files / k11_integration_qa_mcp-0.1.0-py3-none-any.whl
| Download URL | k11_integration_qa_mcp-0.1.0-py3-none-any.whl |
|---|---|
| Size | 26.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
21db284b1717ff642d2cec46885b04acab1db468eee9f2e6b277933d36d46384
|
|
BLAKE2b-256 checksum How to use checksums |
ecce7fcbbf9f6e0f395632359e6d042ddcd14fc847b822c008dfc143197b6045
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 17, 2026.
Transparency logSecurity for k11-integration-qa-mcp 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for k11_integration_qa_mcp-0.1.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 17, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.