Skip to content

spec: Define adapter onboarding pipeline — end-to-end workflow for new API targets #236

@mickdarling

Description

@mickdarling

Summary

Define a standardized, repeatable pipeline for onboarding new API targets into the MCPAQL ecosystem. The current tooling (interrogator, schema builder, generator) handles the mechanical steps, but there is no higher-level workflow that manages the full lifecycle from "we want to support API X" through to "the adapter is published, tested, and maintained."

As the adapter ecosystem scales, this pipeline becomes critical infrastructure — not a nice-to-have.

Problem

Today, creating a new adapter requires ad-hoc orchestration:

  1. Identify the target API and its transport/protocol characteristics
  2. Determine whether existing tooling supports it (HTTP? Native? New protocol?)
  3. Run the interrogator (if applicable) or hand-author the discovery bundle
  4. Review and override CRUDE classifications
  5. Build the adapter schema
  6. Generate the adapter package
  7. Run conformance tests
  8. Test against the live API
  9. Review security implications (danger levels, confirmation requirements)
  10. Document the adapter
  11. Publish / submit to collection

Each step is manual. There's no tracking, no standard checklist, no way to parallelize across multiple adapters, and no feedback loop from production usage back to the adapter definition.

Proposal: Adapter Onboarding Pipeline

Pipeline Stages

┌─────────────────────────────────────────────────────────────┐
│  Stage 0: TRIAGE                                            │
│  • Identify target API / application / protocol             │
│  • Classify: HTTP REST, GraphQL, gRPC, native-*, other      │
│  • Determine transport plugin requirements                  │
│  • Estimate scope (operation count, auth complexity)         │
│  • Decision: proceed / defer / reject                       │
└─────────────┬───────────────────────────────────────────────┘
              ↓
┌─────────────────────────────────────────────────────────────┐
│  Stage 1: DISCOVERY                                         │
│  • Run interrogator (MCP servers, sdef, OpenAPI, etc.)      │
│  • OR hand-author discovery bundle from docs/SDK            │
│  • Capture raw API surface                                  │
│  • Produce discovery bundle                                 │
└─────────────┬───────────────────────────────────────────────┘
              ↓
┌─────────────────────────────────────────────────────────────┐
│  Stage 2: CLASSIFICATION                                    │
│  • Review CRUDE endpoint assignments                        │
│  • Assign danger levels                                     │
│  • Identify confirmation requirements                       │
│  • Flag ambiguous operations for human review                │
│  • Produce overrides file                                   │
└─────────────┬───────────────────────────────────────────────┘
              ↓
┌─────────────────────────────────────────────────────────────┐
│  Stage 3: GENERATION                                        │
│  • Build adapter schema from discovery bundle + overrides   │
│  • Generate adapter package (server code, types, config)    │
│  • Generate tool names per naming convention (#235)         │
│  • Set annotations (title, hints)                           │
│  • Produce licensing artifacts                              │
└─────────────┬───────────────────────────────────────────────┘
              ↓
┌─────────────────────────────────────────────────────────────┐
│  Stage 4: VALIDATION                                        │
│  • Run conformance tests                                    │
│  • Run differential validator (source vs adapter)           │
│  • Test against live API (smoke tests)                      │
│  • Security review (injection vectors, auth handling)       │
│  • Performance benchmarks (latency, token usage)            │
└─────────────┬───────────────────────────────────────────────┘
              ↓
┌─────────────────────────────────────────────────────────────┐
│  Stage 5: PUBLICATION                                       │
│  • Documentation (README, usage examples, limitations)      │
│  • Submit to collection / npm / registry                    │
│  • Announce availability                                    │
└─────────────┬───────────────────────────────────────────────┘
              ↓
┌─────────────────────────────────────────────────────────────┐
│  Stage 6: MAINTENANCE                                       │
│  • Monitor upstream API changes                             │
│  • Re-interrogate periodically                              │
│  • Differential analysis (what changed since last capture)  │
│  • Version bump adapter schema                              │
│  • Regression testing                                       │
└─────────────────────────────────────────────────────────────┘

Pipeline Tooling

Stage Existing Tool Gap
Triage None Need triage checklist / intake form
Discovery mcpaql-interrogate (MCP), sdef parser Need OpenAPI/Swagger ingestion, GraphQL introspection
Classification Schema builder with overrides Need classification review UI or structured review workflow
Generation mcpaql-generate-adapter Need naming convention support (#235), annotation generation
Validation mcpaql-conformance, mcpaql-diff Need live API smoke test harness, security scanner
Publication Manual Need automated submission to collection, npm publish workflow
Maintenance mcpaql-diff Need scheduled re-interrogation, change detection, alerting

Discovery Source Expansion

The interrogator currently supports:

  • MCP servers (Streamable HTTP) ✅
  • macOS scripting dictionaries (.sdef) ✅ (PR in flight)

Future discovery sources needed:

  • OpenAPI / Swagger — parse spec files, map paths to CRUDE operations
  • GraphQL introspection — query schema, map queries/mutations to CRUDE
  • gRPC reflection — service discovery, map RPCs to CRUDE
  • SDK analysis — parse TypeScript/Python SDK types to infer operations
  • Documentation scraping — extract API surface from docs when no machine-readable spec exists

Each source type needs its own interrogation module that produces the same discovery-bundle.json output.

Automation Opportunities

  • Batch onboarding: Given a list of target APIs, run stages 0-3 in parallel, queue stage 4 for human review
  • CI/CD for adapters: Re-interrogate + diff + regenerate on schedule, auto-PR if changes detected
  • DollhouseMCP agent: The applescript-adapter-engineer agent pattern generalizes — a pipeline orchestrator agent that drives the full workflow
  • Collection integration: Auto-submit generated adapters to the DollhouseMCP collection for community review

Acceptance Criteria

  • Pipeline stages defined with clear inputs/outputs per stage
  • Triage checklist / intake form specified
  • Discovery source expansion roadmap documented
  • Validation stage requirements specified (conformance, security, smoke tests)
  • Maintenance / re-interrogation workflow specified
  • Automation strategy documented
  • Interaction with naming convention (spec: Define adapter-scoped tool naming convention and annotation requirements #235) and annotation requirements defined

Dependencies

References

  • Interrogator: @mcpaql/tools (src/interrogate.ts)
  • Schema Builder: @mcpaql/adapter-generator (src/schema-builder.ts)
  • Generator: @mcpaql/adapter-generator (src/generator.ts)
  • Conformance: @mcpaql/tools (src/conformance.ts)
  • Differential: @mcpaql/tools (src/differential.ts)
  • Discovery Bundle: docs/adapter/discovery-bundle.md

Metadata

Metadata

Assignees

No one assigned

    Labels

    adapterAdapter development relatedarchitectureArchitecture and designphase-3Adapter: Adapter specifications and interfacesspecCore specification content

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions