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 Exchange results.

Use this page when building external tools, agentic clients, or automation around the same Source Shares state that Terminal reads.

After reading

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

MCP

01

Bitcode MCP is a connected Exchange interface

MCP tools should expose current Bitcode actions and reads: attach source, express Read, admit AssetPack intent, read activity, inspect proof posture, and return write-admission evidence.

The MCP surface should be narrow and explicit. Non-admitted generic tools are support or reference surfaces until the Protocol, Exchange, and Terminal can read their effects.

Why this matters

MCP makes Bitcode programmable, but programmability is only valuable if it keeps source-to-shares proof parity.

  • Tool calls must be confirmation-gated when they write.
  • Tool results must point back to Exchange-readable activity.
  • PromptPart and attachment structures preserve source and Read context.

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 Exchange state.

Docs for MCP should therefore teach request shape, expected result, failure posture, and which Terminal read confirms the write.

Why this matters

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

Disclosure limits

03

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 AssetPack source. Source-bearing AssetPack 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 Source Shares 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 AssetPack source.
  • Docs QA fails closed when public docs, internal docs, route docs, interface docs, generated artifacts, proof posture, or workflow checks drift.
  • Deferred boundaries stay explicit: V35 documents Exchange and Conversations usage while deeper product depth remains future-canon work.

Interface preview

Learn with the same UI grammar used in Terminal

These embedded specimens reuse the Terminal card and explainer pattern so docs readers become familiar with the real product surfaces before they operate against them.

API result

A good tool result points back to Terminal

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

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 Terminal or Exchange should verify the result.

MCP call lifecycle

The Exchange-facing MCP server exposes tools/list and tools/call over the Model Context Protocol, authenticates each call, applies rate/resource limits, and dispatches by bitcode:// prefix.

packages/executions-mcp/src/mcp-server/src/server.ts
tools/listMCP request

Discover the active default Bitcode MCP tools available to a client.

packages/executions-mcp/src/mcp-server/src/server.ts

How to use

Call tools/list after connecting. The default server registers pipeline, analysis, intelligence, enterprise, LSP, and observability categories.

Inputs

  • No body is required for discovery.

Expected outputs

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

Execute one Exchange-facing MCP feature.

packages/executions-mcp/src/mcp-server/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:// 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.

Pipeline tools

Pipeline tools write bounded AssetPack intent into Exchange-facing execution, require pipeline create permission, and return rereadable run/admission metadata.

packages/executions-mcp/src/mcp-server/src/tools/pipeline-tools.ts
bitcode://pipelines/asset-pack/createtools/callconfirmed write

Create an AssetPack pipeline for implementation, review, issue work, docs, diagrams, API specs, scaffolding, planning, or refactoring.

packages/executions-mcp/src/mcp-server/src/tools/pipeline-tools.ts

How to use

Pass task, repository, subtype, and optional attachments/connections. Use streaming for queued run reread or wait for completion when streaming is false.

Inputs

  • task: required detailed task, minimum 10 characters.
  • repository: required RepositoryContext, including provider/owner/name/branch or local path.
  • subtype: pull_request, pr_review, issue, comment, blog_post, diagram, api_spec, frontend_scaffolder, scope_analysis, implementation_plan, or refactor_proposal.
  • attachments: optional multimodal source context.
  • connections: optional repository/provider ingress context.
  • mcpConfig, streaming, organizationId, modelPreferences, and options.

Expected outputs

  • runId and assetPackEvidenceId.
  • status, interfaceSurface, inputContext, writeAdmission, and outputMeaning.
  • When completed: result, AssetPack synthesis artifacts, Shippables, measuredBtd, BTC-fee posture, timestamps, and events.

Verify

Open the returned run/activity and inspect AssetPack, proof, delivery, and settlement posture.

Failure posture

  • Requires pipelines.create permission.
  • Rejects incoherent repository_connection ingress.
  • Rejects non-local providers without matching connection or provider credential.

Analysis tools

Analysis tools read repository, dependency, pattern, and trend evidence for Exchange and Terminal users.

packages/executions-mcp/src/mcp-server/src/tools/analysis-tools.ts
bitcode://analysis/repository/analyzetools/call

Analyze one repository for architecture, dependencies, security, performance, quality, complexity, patterns, or technical debt.

packages/executions-mcp/src/mcp-server/src/tools/analysis-tools.ts

How to use

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

Inputs

  • repository: { owner, name, branch? }.
  • analysisType: architecture, dependencies, security, performance, quality, complexity, patterns, or technical_debt.
  • depth: surface, medium, or deep.
  • includeMetrics and outputFormat.

Expected outputs

  • repository, branch, analysisType, timestamp, analyst.
  • results and metadata with analysisId, duration, confidence, lines/files analyzed.
bitcode://analysis/intelligence/synthesizetools/call

Synthesize trends across repository, organization, or user scope.

packages/executions-mcp/src/mcp-server/src/tools/analysis-tools.ts

How to use

Pass scope/timeframe and optional repositories, analysisTypes, recommendation, and confidence settings.

Inputs

  • scope: repository, organization, or user.
  • timeframe: 7d, 30d, 90d, or all.
  • repositories and analysisTypes.
  • includeRecommendations and confidenceThreshold.

Expected outputs

  • insights, recommendations, trends, and metadata.
  • Confidence-scored strategic guidance for engineering decisions.
bitcode://analysis/patterns/detecttools/call

Find design patterns, anti-patterns, architecture patterns, testing patterns, security patterns, or performance patterns.

packages/executions-mcp/src/mcp-server/src/tools/analysis-tools.ts

How to use

Pass repository/path plus pattern type filters and severity.

Inputs

  • repository: { owner, name, path? }.
  • patternTypes: optional array.
  • language, includeExamples, and severity.

Expected outputs

  • patterns with type, name, confidence, locations, examples, severity, and recommendations.
  • summary totals and average confidence.
bitcode://analysis/dependencies/analyzetools/call

Analyze dependency graph, vulnerabilities, licenses, updates, and dependency risk.

packages/executions-mcp/src/mcp-server/src/tools/analysis-tools.ts

How to use

Pass repository plus depth and inclusion toggles.

Inputs

  • repository: { owner, name }.
  • analysisDepth: direct, transitive, or full.
  • includeVulnerabilities, includeLicenses, includeUpdates.
  • outputFormat: json, graph, or report.

Expected outputs

  • dependency counts, vulnerabilities, license summary, update recommendations, and risk posture.

Intelligence tools

Intelligence tools turn measured code, repositories, research, and attachments into higher-level recommendations.

packages/executions-mcp/src/mcp-server/src/tools/intelligence-tools.ts
bitcode://intelligence/effectiveness/tracktools/call

Measure, predict, learn, or optimize code-change effectiveness.

packages/executions-mcp/src/mcp-server/src/tools/intelligence-tools.ts

How to use

Choose operation and provide the matching metrics, proposedChanges, outcomes, or targetMetrics.

Inputs

  • operation: measure, predict, learn, or optimize.
  • pipelineId, beforeMetrics, afterMetrics, repository, proposedChanges, outcomes, targetMetrics, constraints, timeframe, includeConfidence.

Expected outputs

  • Effectiveness scores, predictions, learning results, or optimization recommendations with confidence data.
bitcode://intelligence/cross-repo/learntools/call

Extract, propagate, analyze, or recommend cross-repository patterns.

packages/executions-mcp/src/mcp-server/src/tools/intelligence-tools.ts

How to use

Choose operation and provide source repositories, patterns, targets, analysisType, or repositoryContext.

Inputs

  • operation: extract, propagate, analyze, or recommend.
  • sourceRepositories, patterns, targetRepositories, analysisType, repositoryContext, includeVisualization, maxResults.

Expected outputs

  • Extracted patterns, propagation results, cross-repo insights, visualization data, and recommendations.
bitcode://intelligence/research/advancedtools/call

Run multi-provider research with URL credibility and synthesis.

packages/executions-mcp/src/mcp-server/src/tools/intelligence-tools.ts

How to use

Pass a detailed query, researchType, provider list, filters, and synthesis options.

Inputs

  • query, researchType, providers, filters, synthesisType, maxResults, includeUrlIntelligence, contextAware.

Expected outputs

  • research_results, synthesis, url_intelligence, and credibility_scores.
bitcode://intelligence/multimodal/processtools/call

Process images, audio, video, documents, Figma files, or URLs into technical knowledge evidence.

packages/executions-mcp/src/mcp-server/src/tools/intelligence-tools.ts

How to use

Pass at least one attachment, a processingType, and desired output format/synthesis settings.

Inputs

  • attachments: array of { type, content, metadata? }.
  • processingType, outputFormat, crossModalSynthesis, includeImplementationGuidance, contextRepository, qualityThreshold.

Expected outputs

  • processed_attachments, synthesis, implementation_guidance, and quality_scores.
bitcode://intelligence/enterprise/orchestratetools/call

Analyze team, organization, knowledge, skill-gap, collaboration, innovation, risk, or strategy posture.

packages/executions-mcp/src/mcp-server/src/tools/intelligence-tools.ts

How to use

Pass operation, organizationId, scope, time horizon, depth, recommendation, benchmarking, and confidentiality settings.

Inputs

  • operation, organizationId, scope, timeHorizon, analysisDepth, includeRecommendations, includeBenchmarking, confidentialityLevel.

Expected outputs

  • analysis, strategic_insights, benchmarking, and recommendations.
bitcode://intelligence/marketplace/analyzetools/call

Discover, assess, price, or risk-review marketplace solutions and providers.

packages/executions-mcp/src/mcp-server/src/tools/intelligence-tools.ts

How to use

Choose marketplace operation and provide requirements, listing/provider IDs, search query, filters, and risk settings.

Inputs

  • operation, requirements, listingId, providerId, searchQuery, filters, includeCompetitiveAnalysis, riskTolerance.

Expected outputs

  • solutions, quality_assessment, provider_analysis, and recommendations.

Enterprise interface tools

Enterprise tools configure webhooks, managed APIs, integration marketplace connectors, and observability surfaces.

packages/executions-mcp/src/mcp-server/src/tools/enterprise-tools.ts
bitcode://enterprise/webhook/orchestratetools/call

Create, update, delete, test, route, batch, or inspect enterprise webhooks.

packages/executions-mcp/src/mcp-server/src/tools/enterprise-tools.ts

How to use

Pass operation and the webhook/routing/test/analytics payload that matches it.

Inputs

  • operation plus webhook config, testPayload, analyticsTimeRange, webhookIds, or routingRules.

Expected outputs

  • Webhook operation result, analytics, delivery status, routing results, or audit-ready recommendations.
bitcode://enterprise/api/managetools/call

Manage API lifecycle: create, version, deploy, govern, document, rate-limit, monitor, or test APIs.

packages/executions-mcp/src/mcp-server/src/tools/enterprise-tools.ts

How to use

Pass operation and API config, environment, versioning strategy, governance rules, or test suite.

Inputs

  • operation plus api, versioningStrategy, environment, governanceRules, or testSuite.

Expected outputs

  • API operation result, governance score, documentation output, analytics, or test report.
bitcode://enterprise/integration/marketplacetools/call

Browse, install, configure, update, uninstall, analyze, develop, or publish enterprise integrations.

packages/executions-mcp/src/mcp-server/src/tools/enterprise-tools.ts

How to use

Pass operation and the relevant marketplace, integration, connector, or filter payload.

Inputs

  • operation plus filters, integration config, connector config, dataMapping, triggers, schedule, or tests.

Expected outputs

  • integrations, marketplace_analytics, installation_status, and custom_connectors.
bitcode://enterprise/observability/configuretools/call

Configure metrics, traces, logs, alerts, dashboards, and analysis settings for enterprise observability.

packages/executions-mcp/src/mcp-server/src/tools/enterprise-tools.ts

How to use

Pass monitoringConfig, alerts, dashboard, and analysisConfig.

Inputs

  • monitoringConfig, alerts, dashboard, analysisConfig.

Expected outputs

  • monitoring_status, dashboards, alerts, telemetry_endpoints, and related configuration results.

LSP and code-intelligence tools

LSP tools provide semantic analysis, navigation/refactoring, diagnostics, and workspace-wide intelligence.

packages/executions-mcp/src/mcp-server/src/tools/lsp-tools.ts
bitcode://lsp/semantic/analyzetools/call

Analyze symbols, types, dependency graphs, call graphs, semantic search, hover, or signatures.

packages/executions-mcp/src/mcp-server/src/tools/lsp-tools.ts

How to use

Pass repository, targets, optional position, analysisConfig, and filters.

Inputs

  • repository, targets, position, analysisConfig, filters.

Expected outputs

  • Semantic analysis, symbol relationships, dependency/call graph data, and contextual code intelligence.
bitcode://lsp/intelligence/navigatetools/call

Find references, rename symbols, extract methods, find implementations, get actions, or organize imports.

packages/executions-mcp/src/mcp-server/src/tools/lsp-tools.ts

How to use

Pass repository, symbol target, refactoring config, optional range, and formatting options.

Inputs

  • repository, symbol, refactoringConfig, range, formattingOptions.

Expected outputs

  • references, rename or refactor previews, implementations, code actions, quick fixes, and source actions.
bitcode://lsp/diagnostic/analyzetools/call

Run diagnostics across syntax, semantics, performance, security, complexity, tests, or dependencies.

packages/executions-mcp/src/mcp-server/src/tools/lsp-tools.ts

How to use

Pass repository, scope, diagnosticConfig, thresholds, preferences, and outputConfig.

Inputs

  • repository, scope, diagnosticConfig, qualityThresholds, analysisPreferences, outputConfig.

Expected outputs

  • diagnostics, quality_score, recommendations, and metrics.
bitcode://lsp/workspace/intelligencetools/call

Understand architecture, module dependencies, API surface, change impact, technical debt, and knowledge graph.

packages/executions-mcp/src/mcp-server/src/tools/lsp-tools.ts

How to use

Pass repository, analysisScope, changeAnalysis, architectureConfig, knowledgeGraphConfig, migrationConfig, and visualizationConfig.

Inputs

  • repository, analysisScope, changeAnalysis, architectureConfig, knowledgeGraphConfig, migrationConfig, visualizationConfig.

Expected outputs

  • workspace_analysis, architecture_insights, knowledge_graph, and recommendations.

Observability tools

Observability tools read and configure metrics, traces, business intelligence, and log analytics.

packages/executions-mcp/src/mcp-server/src/tools/observability-tools.ts
bitcode://observability/metrics/realtimetools/call

Collect/query metrics, configure alerts, build dashboards, or stream real-time data.

packages/executions-mcp/src/mcp-server/src/tools/observability-tools.ts

How to use

Pass metrics, query, alert, dashboard, and streamConfig depending on the operation.

Inputs

  • metrics, query, alert, dashboard, streamConfig.

Expected outputs

  • metrics result, alert status, dashboard data, stream configuration, anomalies, and benchmarks.
bitcode://observability/tracing/distributedtools/call

Analyze distributed traces, spans, service maps, profiling, bottlenecks, and request flow.

packages/executions-mcp/src/mcp-server/src/tools/observability-tools.ts

How to use

Pass trace/span data and analysis, profiling, and service-map config.

Inputs

  • trace, span, analysisConfig, profilingConfig, serviceMapConfig.

Expected outputs

  • trace analysis, bottlenecks, dependencies, health, and visualization data.
bitcode://observability/intelligence/businesstools/call

Read technical productivity, ROI, technical debt cost, velocity, quality, innovation, and benchmark metrics.

packages/executions-mcp/src/mcp-server/src/tools/observability-tools.ts

How to use

Pass scope, metricsConfig, analysisPreferences, outputConfig, and benchmarkConfig.

Inputs

  • scope, metricsConfig, analysisPreferences, outputConfig, benchmarkConfig.

Expected outputs

  • metrics, insights, recommendations, and forecasts.
bitcode://observability/logs/analyticstools/call

Run log search, pattern detection, anomaly analysis, security analysis, or compliance reporting.

packages/executions-mcp/src/mcp-server/src/tools/observability-tools.ts

How to use

Pass logs or searchQuery with analysis, pattern, anomaly, and compliance config.

Inputs

  • logs, analysisConfig, searchQuery, patternConfig, anomalyConfig, complianceConfig.

Expected outputs

  • analysis, patterns, anomalies, compliance, and correlated log intelligence.