04 / Commercial InterfacesMCP/API

Operate Bitcode through MCP and API surfaces

MCP/API docs explain how programmable clients should attach context, write bounded intent, receive admission evidence, and reread proof-backed results.

Use this page when building external tools, agentic clients, or automation around the same DataPack state that product routes read.

After reading

You can design an MCP or API interaction that mirrors route write/read/proof discipline.

MCP

01

Bitcode MCP is a connected proof-readback interface

MCP exposes exactly eight product tools: measure, synthesize-asset-packs-for-deposit, synthesize-asset-packs-for-reads, packs, and four Auxillaries panes.

Keep the MCP surface narrow and explicit. Deposit/Read synthesize mirror website Synthesize DataPacks (obfuscations vs Need). Measure returns source-safe evidence. Packs and Auxillaries reread product posture.

Why this matters

Programmability only helps when it preserves DataPack proof parity with product routes.

  • synthesize-asset-packs-for-deposit requires obfuscations configuration (empty allowed).
  • synthesize-asset-packs-for-reads requires Need configuration.
  • measure returns source-safe measurement evidence only.
  • packs and auxiliary-* tools point at Packs/Auxillaries product routes.
  • Writes are confirmation-gated; results point back to Packs-readable activity.

API

02

The API contract is write, reread, and prove

A useful API action writes bounded intent, returns admission evidence, and gives the caller a way to reread the resulting proof-backed activity state.

Docs for MCP therefore teach request shape, expected result, failure posture, and which proof readback confirms the write.

Why this matters

This mirrors the action manual for external developers and agentic clients.

Disclosure

03

Public docs expose guidance and proof posture, not protected source

MCP and public docs may describe tool names, schemas, measurements, and proof roots. They must not serialize protected source, unpaid DataPack source, credentials, or wallet private material.

When a measure or synthesize call returns roots and source-safe summaries, treat those as the admissible public surface.

Why this matters

Source-safety is protocol law on every interface, including MCP.

Disclosure limits

04

Public docs expose guidance and proof posture, not protected source

Public Bitcode docs derive from the active Protocol, package-owned catalogs, route contracts, and source-safe generated artifacts. They can explain usage, measurements, event ids, proof roots, docs links, runbook links, redaction posture, testnet rollout readiness, fee boundaries, and settlement posture.

They must not reveal protected source payloads, raw protected prompts, secret values, provider tokens, wallet private material, or unpaid DataPack source. Source-bearing DataPack contents cross to the reader only after settlement and rights transfer.

Why this matters

This keeps the public product understandable while preserving the boundary that makes DataPacks economically and operationally safe.

  • Allowed: usage guidance, route links, state labels, source-safe measurements, proof roots, dashboard/runbook ids, redacted incident posture, testnet rollout readiness, LocalStagingTelemetryDocumentationRehearsal evidence, and fee/right boundaries.
  • Interface docs may surface event ids, proof roots, docs links, runbook links, and redaction posture from TelemetryDocumentationInterfaceIntegration without revealing source-bearing payloads.
  • Local and staging-testnet rehearsal docs may surface documentation discovery, telemetry event emission, dashboard/runbook lookup, docs QA, incident drill, source-safe proof-root review, and blocked value-bearing mainnet posture.
  • Blocked: secrets, provider tokens, wallet private material, raw protected prompts, protected source payloads, and unpaid DataPack source.
  • Docs QA fails closed when public docs, internal docs, route docs, interface docs, generated artifacts, proof posture, or workflow checks drift.
  • Compatibility boundaries stay explicit: /exchange redirects to /exchange and does not create a parallel current product surface.

Interface preview

Learn with the same UI grammar used in the product

These embedded specimens reuse product card and explainer patterns so docs readers become familiar with Packs, Deposit, and Read before they operate against them.

API result

A good tool result points back to proof readback

Programmable writes should never strand users in a tool transcript; the activity should be rereadable in /exchange.

Write admission

Confirmed

Activity ID

Rereadable

Proof posture

Pending/closed

API reference

Usage features, inputs, and expected outputs

These references are grounded in the package code. Read them like API docs: when to call the feature, how to shape the payload, what should come back, and where product or Exchange should verify the result.

MCP call lifecycle

The proof-readback MCP server exposes tools/list and tools/call over the Model Context Protocol, authenticates each call, applies rate/resource limits, and dispatches the eight product tools.

apps/mcp/src/server.ts
tools/listMCP request

Discover the active Bitcode MCP product tools.

apps/mcp/src/server.ts

How to use

Call tools/list after connecting. The default surface registers exactly eight product tools.

Inputs

  • No body is required for discovery.

Expected outputs

  • tools: array of eight { name, description, inputSchema } records.
  • Server logs include count and failed category count.
tools/callMCP request

Execute one product MCP tool.

apps/mcp/src/server.ts

How to use

Pass name and arguments. Include request params _meta.authorization when auth is required. Local repositories are prepared before execution when repository.provider is local.

Inputs

  • name: required bitcode:// product tool identifier.
  • arguments: tool-specific validated input object.
  • _meta.authorization: optional auth header used by authenticateMCPRequest.

Expected outputs

  • Tool-specific result object.
  • Execution passes through auth, rate limits, resource limits, and circuit breaker handling.

Failure posture

  • Authentication failure rejects the call.
  • Invalid schema arguments return validation errors.
  • Unknown tool names fail closed.

Product tools (eight)

The only admitted MCP tools: measure, synthesize-asset-packs-for-deposit, synthesize-asset-packs-for-reads, packs, and four Auxillaries panes.

apps/mcp/src/tools/product-tools.ts
bitcode://measuretools/call

Measure a repository for product measurement dimensions (source-safe).

apps/mcp/src/tools/product-tools.ts

How to use

Pass repository coordinates, measureType, and optional depth/output controls.

Inputs

  • repository: { owner, name, branch? }.
  • measureType: architecture, dependencies, security, performance, quality, complexity, patterns, or technical_debt.
  • depth, includeMetrics, outputFormat.

Expected outputs

  • repository, branch, measureType, timestamp.
  • results and metadata (measureId, confidence, lines/files measured) — source-safe only.
bitcode://synthesize-asset-packs-for-deposittools/callconfirmed write

Synthesize Deposit DataPack options from a repository with obfuscations — same law as /deposits.

apps/mcp/src/tools/product-tools.ts

How to use

Pass repository, obfuscations (empty allowed), optional permissible sources/exclusions, streaming. Requires confirmation (write).

Inputs

  • repository: required RepositoryContext.
  • obfuscations: required string (may be empty).
  • permissibleSources, impermissibleSources, streaming, organizationId, connections, attachments.

Expected outputs

  • runId and assetPackEvidenceId for /exchange reread.
  • status, interfaceSurface: mcp, writeAdmission, outputMeaning.
bitcode://synthesize-asset-packs-for-readstools/callconfirmed write

Synthesize Read DataPack options from Need configuration — same law as /reads.

apps/mcp/src/tools/product-tools.ts

How to use

Pass repository and need (prompt required). Requires confirmation (write).

Inputs

  • repository: required target/source RepositoryContext.
  • need: required Need configuration (prompt and optional accepted-need fields).
  • streaming, organizationId, connections, attachments.

Expected outputs

  • runId and evidence ids for activity reread.
  • status, interfaceSurface: mcp, writeAdmission, outputMeaning.
bitcode://exchangetools/call

Reread Packs activity posture (source-safe options, measurements, settlement).

apps/mcp/src/tools/product-tools.ts

How to use

Optionally pass activityId and limit.

Inputs

  • activityId optional.
  • limit optional (1–50).
  • organizationId optional.

Expected outputs

  • productRoute: /exchange.
  • source-safe packs/activity posture and writeAdmission metadata.
bitcode://auxiliary-profiletools/call

Open or reread Auxillaries Profile posture via MCP.

apps/mcp/src/tools/product-tools.ts

How to use

Optional confirmOpen for write-admission open posture.

Inputs

  • organizationId optional.
  • confirmOpen optional boolean.

Expected outputs

  • productRoute with auxillary-open-to=profile.
  • source-safe pane posture.
bitcode://auxiliary-wallettools/call

Open or reread Auxillaries Wallet posture via MCP.

apps/mcp/src/tools/product-tools.ts

How to use

Optional confirmOpen for write-admission open posture.

Inputs

  • organizationId optional.
  • confirmOpen optional boolean.

Expected outputs

  • productRoute with auxillary-open-to=wallet.
  • source-safe pane posture.
bitcode://auxiliary-interfacestools/call

Open or reread Auxillaries Interfaces posture via MCP.

apps/mcp/src/tools/product-tools.ts

How to use

Optional confirmOpen for write-admission open posture.

Inputs

  • organizationId optional.
  • confirmOpen optional boolean.

Expected outputs

  • productRoute with auxillary-open-to=interfaces.
  • source-safe pane posture.
bitcode://auxiliary-externalstools/call

Open or reread Auxillaries Externals posture via MCP.

apps/mcp/src/tools/product-tools.ts

How to use

Optional confirmOpen for write-admission open posture.

Inputs

  • organizationId optional.
  • confirmOpen optional boolean.

Expected outputs

  • productRoute with auxillary-open-to=externals.
  • source-safe pane posture.