Skip to main content
Glama

TOCA MCP Server

Deterministic execution layer for ChatGPT governed by the TOCA_OS business source of truth in Google Drive.

Production status

The repository is beyond bootstrap. The production foundation currently includes:

  • private Streamable HTTP MCP transport at /mcp;

  • health/readiness boundaries;

  • Meta OAuth, webhook and secret-management boundaries;

  • provider-backed Instagram history/insights reads;

  • Meta Ads read capabilities;

  • persistent PostgreSQL scheduling;

  • TOCA-managed Instagram scheduling tools;

  • an autonomous singleton Cloud Run daemon that claims due jobs from PostgreSQL;

  • idempotent Instagram publication with provider-backed reconciliation before retry;

  • private GCS asset delivery through short-lived signed URLs;

  • audit, dead-letter and fail-closed execution controls;

  • a single Autonomy Gate, Autopilot Readiness Gate, scoped kill switches, shadow/canary governance and provider-backed capability evidence gating.

TOCA_OS / Google Drive remains the business source of truth. GitHub is the source of truth for code, schemas, tests and infrastructure. External providers remain authoritative for external side effects.

Related MCP server: agentraas

Active production topology

ChatGPT
  -> TOCA_OS business policy/context
  -> private TOCA MCP service
       -> typed MCP tools
       -> PostgreSQL scheduled_jobs / audit_events / provider_publications
  -> TOCA-managed Instagram daemon (singleton Cloud Run service)
       -> claimDue()
       -> approval/audit gate
       -> provider reconciliation
       -> idempotent Instagram publication
       -> provider confirmation

Scheduling is an application operation and must use the protected instagram.toca_schedule.* MCP surface. Git commits and application redeploys are not the normal publication clock or scheduling API.

Quality gate

Every promoted change must pass:

pnpm install --frozen-lockfile
pnpm format:check
pnpm architecture:check
pnpm lint
pnpm typecheck
pnpm test
pnpm build

See docs/architecture/README.md, docs/architecture/routes-capabilities-v1.md, docs/architecture/toca-managed-instagram-scheduler-v1.md, docs/operations/infrastructure-control-plane.md and docs/operations/autonomy-readiness-closeout-2026-08-26.md for the current contracts and release evidence.

AG-09 analytics source (native TOCA)

AG-09 / R08 / R31 must query Meta Ads through the TOCA-owned meta_ads.insights.get route backed by MetaAdsReadProvider and the Meta Marketing API. Adplane, Windsor.ai or any other external reporting connector is not an AG-09 data source or automatic fallback. Missing data must not be converted to zero or invented revenue/ROAS. See docs/operations/ag09-native-analytics-source.md.

The owner confirmed luizanunciostoca/toca-mcp-server as the canonical repository for this native TOCA Meta Ads route. AG-09 does not require a separate toca-media-server repository or an external reporting service.

Available Tools

12 tools
toca.approval.getGet TOCA ApprovalA
Read-onlyIdempotent

Read one ApprovalRecord owned by the authenticated requester.

Inputs: approvalId (required).

toca.approval.requestRequest TOCA ApprovalB

Create a formal ApprovalRecord bound to the exact typed execution payload and authenticated requester.

Inputs: payload (required), evidence (required), expiresAt (required), capabilityId (required), +1 more.

toca.audit.queryQuery TOCA AuditB
Read-onlyIdempotent

Read immutable audit-ledger records by correlation inside the authenticated tenant boundary.

Inputs: correlationId (required), limit, executionId.

toca.capabilities.describeDescribe TOCA CapabilityA
Read-onlyIdempotent

Resolve aliases and return the canonical typed, policy and lifecycle contract for one capability.

Inputs: capabilityId (required).

toca.capabilities.searchSearch TOCA CapabilitiesB
Read-onlyIdempotent

Search the canonical capability catalog without materializing one MCP tool per capability.

Inputs: limit, query, routeId, provider, +1 more.

toca.event.getGet TOCA EventRecordA
Read-onlyIdempotent

Read one canonical EventRecord inside the authenticated tenant boundary.

Inputs: eventId (required).

toca.executeExecute TOCA CapabilityC

Resolve identity, capability, typed schema, policy, risk, approval, idempotency, handler, provider read-back and audit before reporting success.

Inputs: payload (required), capabilityId (required), correlationId (required), approvalId.

toca.system.healthTOCA Core HealthA
Read-onlyIdempotent

Return deterministic TOCA Core MCP surface and persistence readiness metadata.

Inputs: no named parameters.

toca.verifyVerify TOCA ExecutionB
Read-onlyIdempotent

Verify the immutable audit chain, exact execution descriptor and fresh provider state for side effects.

Inputs: result (required), payload (required), executionId (required), capabilityId (required), +1 more.

toca.workflow.advanceAdvance TOCA WorkflowD

Apply one explicit, evidence-bearing transition through the existing durable workflow engine.

toca.workflow.createCreate TOCA WorkflowB
Idempotent

Create a durable tenant-scoped workflow using the existing workflow engine and transactional outbox.

Inputs: steps (required), routeId (required), definitionId (required), correlationId (required), +3 more.

toca.workflow.getGet TOCA WorkflowA
Read-onlyIdempotent

Read one durable workflow inside the authenticated tenant boundary.

Inputs: workflowId (required).

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    B3.1/5.0

    Scored across 12 tools

    Disambiguation4/5

    Most tools have clearly distinct purposes (e.g., toca.workflow.create vs toca.workflow.get vs toca.workflow.advance). The exception is toca.system.health versus toca.verify—both touch on readiness/state but from different angles. Minor overlap is acceptable.

    Naming Consistency5/5

    All tool names follow a consistent pattern of 'toca.<domain>.<verb>' with clear verbs (get, create, advance, query) and nouns (capability, workflow, approval, audit, event). No mixing of styles or conventions.

    Tool Count5/5

    12 tools is well within the ideal 3-15 range. Each tool covers a distinct operation across core domains (system, capabilities, workflows, approvals, audit, events), and the count feels appropriately scoped for the server's purpose.

    Completeness3/5

    The server covers key operations but has notable gaps: workflow lacks an update/abort/delete, approval only has create/get (no approve/deny), and there is no event publishing—only reading. The execute tool is comprehensive but may serve as a generic workaround, yet missing lifecycle operations could still cause agent failures in certain flows.

    Maintenance

    ActivityActive
    ResponsivenessLimited data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      F
      maintenance
      Enables AI assistants to interact with Instagram by scraping profiles, posts, reels, DMs, and business insights through a robust, DOM-agnostic browser orchestration engine that bypasses Instagram's anti-automation measures.
      28
      1
      Apache 2.0
    • F
      license
      Not graded
      quality
      B
      maintenance
      Enables AI agents to execute real-world API actions with exactly-once reliability, deduplication, auditing, and human-in-the-loop safeguards via MCP.
      3
      -
    • A
      license
      B
      quality
      C
      maintenance
      Enables Claude to manage Instagram professional accounts through the official API: exporting account data, publishing reels, photos, carousels and stories, reading and replying to comments and DMs, and pulling analytics, plus a unified inbox of unanswered comments and messages. Includes multi-account support, dry-run previews, read-only mode, blocklists and audit logging for safe operation.
      24
      1
      MIT
    • F
      license
      Not graded
      quality
      C
      maintenance
      Enables AI clients to operate Instagram Business and Creator accounts through Meta's official API with OAuth 2.1 authentication, covering publishing images, carousels, reels and stories, content scheduling, comment moderation, Direct messaging, and account and media insights across multiple connected accounts. An optional read-only private-session reader exposes Direct inbox threads, and a webhook-backed archive accumulates conversation history that Meta's API cannot return on demand.
      -