Skip to content

A desktop coding agent with free access to frontier models.

TypeScript
35.5 KB
Raw Blame
import { providerProfileSchema, type ProviderProfile, type ProviderProfileId } from "../contracts/profile.js"
import { deepFreeze } from "../immutability.js"

const profiles = deepFreeze(providerProfileSchema.array().parse([
  {
    id: "synthetic-enterprise-oauth-mcp",
    fixtureVersion: "2026-07-12.1",
    displayName: "Synthetic Enterprise OAuth MCP",
    provider: "synthetic",
    productSurface: "Standards-conformance profile for OAuth DCR and MCP testing",
    direction: "client-to-provider",
    endpointPath: "/mcp",
    canonicalEndpoint: "https://mcp.example.invalid/mcp",
    provenance: {
      fidelity: "spec-conformant",
      verifiedAt: "2026-07-10",
      providerRelease: "MCP 2025-11-25 and OAuth standards-oriented synthetic profile",
      preview: false,
      documentationUrls: [
        "https://modelcontextprotocol.io/specification/2025-11-25/basic/authorization",
        "https://modelcontextprotocol.io/specification/2025-11-25/basic/transports",
      ],
      limitations: [
        "This profile intentionally represents no Microsoft or ServiceNow product.",
        "Use it for DCR and protocol conformance; use a provider profile for provider topology and catalog assertions.",
      ],
      aspectFidelity: {
        endpoint: "synthetic",
        authorization: "spec-conformant",
        catalog: "synthetic",
        toolSchemas: "synthetic",
        providerResults: "synthetic",
        transport: "mcp-specification",
      },
    },
    oauth: {
      defaultRegistration: "dynamic",
      registrationModes: ["manual", "dynamic"],
      pkceRequired: true,
      issuer: "https://authorization.example.invalid",
      resource: "https://mcp.example.invalid/mcp",
      audience: "https://mcp.example.invalid/mcp",
      authorizationPath: "/oauth/authorize",
      tokenPath: "/oauth/token",
      revocationPath: "/oauth/revoke",
      registrationPath: "/oauth/register",
      authorizationScopes: ["mcp.read", "mcp.write", "offline_access"],
      requiredResourceScopes: ["mcp.read"],
      defaultClientAuthenticationMethod: "client_secret_post",
      clientAuthenticationMethods: ["none", "client_secret_post"],
    },
    protocol: {
      versions: ["2025-11-25", "2025-06-18"],
      responseModes: ["json", "sse"],
      sessionMode: "required",
      pageSize: 2,
      fidelity: "mcp-specification",
    },
    tools: [
      {
        name: "search_records",
        title: "Search records",
        description: "Returns bounded deterministic synthetic records.",
        kind: "read",
        inputSchema: {
          type: "object",
          properties: { query: { type: "string", minLength: 1, maxLength: 200 } },
          required: ["query"],
          additionalProperties: false,
        },
      },
      {
        name: "mutate_record",
        title: "Mutate record",
        description: "Records an approved deterministic mutation in memory.",
        kind: "mutation",
        inputSchema: {
          type: "object",
          properties: {
            value: { type: "string", minLength: 1, maxLength: 200 },
            approved: { type: "boolean" },
            idempotency_key: { type: "string", minLength: 8, maxLength: 128 },
          },
          required: ["value", "approved", "idempotency_key"],
          additionalProperties: false,
        },
      },
    ],
  },
  {
    id: "servicenow-inbound-quickstart",
    fixtureVersion: "2026-07-12.1",
    displayName: "ServiceNow Inbound MCP Quickstart",
    provider: "servicenow",
    productSurface: "ServiceNow MCP Server Console — inbound Quickstart server",
    direction: "client-to-provider",
    endpointPath: "/sncapps/mcp-server/mcp/sn_mcp_server_default",
    canonicalEndpoint: "https://example.service-now.com/sncapps/mcp-server/mcp/sn_mcp_server_default",
    provenance: {
      fidelity: "provider-documented",
      verifiedAt: "2026-07-10",
      providerRelease: "Documentation snapshot; customer family and patch must be reverified",
      preview: false,
      documentationUrls: [
        "https://www.servicenow.com/docs/r/intelligent-experiences/create-mcp-server.html",
        "https://www.servicenow.com/docs/r/intelligent-experiences/connect-mcp-server-client.html",
      ],
      limitations: [
        "Synthetic OAuth, roles, ACLs, domain separation, and incident data; this is not a ServiceNow instance.",
        "Patch-specific transport behavior and installed plugins must be checked against the target customer instance.",
      ],
      aspectFidelity: {
        endpoint: "provider-documented",
        authorization: "synthetic",
        catalog: "synthetic",
        toolSchemas: "synthetic",
        providerResults: "synthetic",
        transport: "mcp-specification",
      },
    },
    oauth: {
      defaultRegistration: "manual",
      registrationModes: ["manual"],
      pkceRequired: true,
      issuer: "https://example.service-now.com",
      resource: "https://example.service-now.com/sncapps/mcp-server/mcp/sn_mcp_server_default",
      audience: "https://example.service-now.com/sncapps/mcp-server/mcp/sn_mcp_server_default",
      authorizationPath: "/oauth_auth.do",
      tokenPath: "/oauth_token.do",
      revocationPath: "/oauth_revoke.do",
      registrationPath: null,
      authorizationScopes: ["mcp_server"],
      requiredResourceScopes: ["mcp_server"],
      defaultClientAuthenticationMethod: "client_secret_post",
      clientAuthenticationMethods: ["client_secret_post"],
    },
    protocol: {
      versions: ["2025-11-25", "2025-06-18"],
      responseModes: ["json", "sse"],
      sessionMode: "required",
      pageSize: 2,
      fidelity: "mcp-specification",
    },
    tools: [
      {
        name: "lookup_incidents",
        title: "Look up incidents",
        description: "Returns deterministic synthetic incidents visible to the mock runtime user.",
        kind: "read",
        inputSchema: {
          type: "object",
          properties: {
            active: { type: "boolean", description: "Only return active incidents." },
            limit: { type: "integer", minimum: 1, maximum: 20, description: "Maximum incident count." },
          },
          required: [],
          additionalProperties: false,
        },
      },
      {
        name: "get_incident",
        title: "Get incident",
        description: "Returns one synthetic incident by incident number.",
        kind: "read",
        inputSchema: {
          type: "object",
          properties: { number: { type: "string", minLength: 10, maxLength: 10 } },
          required: ["number"],
          additionalProperties: false,
        },
      },
      {
        name: "summarize_incident",
        title: "Summarize incident",
        description: "Builds a deterministic summary of a synthetic incident.",
        kind: "read",
        inputSchema: {
          type: "object",
          properties: { number: { type: "string", minLength: 10, maxLength: 10 } },
          required: ["number"],
          additionalProperties: false,
        },
      },
      {
        name: "create_incident",
        title: "Create incident",
        description: "Creates a synthetic incident in the in-memory mutation ledger.",
        kind: "mutation",
        inputSchema: {
          type: "object",
          properties: {
            short_description: { type: "string", minLength: 3, maxLength: 160 },
            idempotency_key: { type: "string", minLength: 8, maxLength: 128 },
            approved: { type: "boolean", description: "Explicit mock mutation approval." },
          },
          required: ["short_description", "idempotency_key", "approved"],
          additionalProperties: false,
        },
      },
    ],
  },
  {
    id: "microsoft-work-iq",
    fixtureVersion: "2026-07-12.1",
    displayName: "Microsoft Work IQ MCP",
    provider: "microsoft",
    productSurface: "Microsoft Work IQ MCP",
    direction: "client-to-provider",
    endpointPath: "/mcp",
    canonicalEndpoint: "https://workiq.svc.cloud.microsoft/mcp",
    provenance: {
      fidelity: "provider-documented",
      verifiedAt: "2026-07-12",
      providerRelease: "Work IQ overview updated 2026-06-25; permissions updated 2026-06-17; tool reference updated 2026-06-03",
      preview: true,
      documentationUrls: [
        "https://learn.microsoft.com/en-us/microsoft-365/copilot/extensibility/work-iq/mcp/overview",
        "https://learn.microsoft.com/en-us/microsoft-365/copilot/extensibility/work-iq/permissions",
        "https://learn.microsoft.com/en-us/microsoft-365/copilot/extensibility/work-iq/mcp/tool-reference",
      ],
      limitations: [
        "Synthetic Entra authorization and synthetic Microsoft 365 content; no Copilot or Graph services are called.",
        "The ten tool names and input parameters follow the 2026-06-03 Microsoft reference; mock-only approval and idempotency fields are explicit safety extensions on mutations.",
        "The restricted mock schema supports the documented path variant of get_schema and requires path plus operationType; it does not claim the provider's operationIds/path exclusive-or constraint.",
        "Provider responses, tenant policy, entitlement, Graph behavior, and transport/version support remain synthetic or specification-driven, not provider-observed.",
      ],
      aspectFidelity: {
        endpoint: "provider-documented",
        authorization: "synthetic",
        catalog: "provider-documented",
        toolSchemas: "synthetic",
        providerResults: "synthetic",
        transport: "mcp-specification",
      },
    },
    oauth: {
      defaultRegistration: "manual",
      registrationModes: ["manual"],
      pkceRequired: true,
      issuer: "https://login.microsoftonline.com/mock-tenant-id/v2.0",
      resource: "api://workiq.svc.cloud.microsoft",
      audience: "api://workiq.svc.cloud.microsoft",
      authorizationPath: "/mock-tenant-id/oauth2/v2.0/authorize",
      tokenPath: "/mock-tenant-id/oauth2/v2.0/token",
      revocationPath: "/mock-tenant-id/oauth2/v2.0/logout",
      registrationPath: null,
      authorizationScopes: ["api://workiq.svc.cloud.microsoft/WorkIQAgent.Ask", "offline_access"],
      requiredResourceScopes: ["api://workiq.svc.cloud.microsoft/WorkIQAgent.Ask"],
      defaultClientAuthenticationMethod: "none",
      clientAuthenticationMethods: ["none", "client_secret_post"],
    },
    protocol: {
      versions: ["2025-11-25"],
      responseModes: ["json", "sse"],
      sessionMode: "required",
      pageSize: 4,
      fidelity: "mcp-specification",
    },
    tools: [
      {
        name: "fetch",
        title: "Fetch work data",
        description: "Reads one or more Microsoft 365 entities by relative resource path; mock responses remain synthetic.",
        kind: "read",
        inputSchema: {
          type: "object",
          properties: {
            entityUrls: {
              type: "array",
              items: { type: "string" },
              minItems: 1,
              maxItems: 20,
              description: "Documented relative resource paths to fetch in parallel.",
            },
            agentId: { type: "string", minLength: 1, maxLength: 200, description: "Reserved by Work IQ for future use." },
          },
          required: ["entityUrls"],
          additionalProperties: false,
        },
      },
      {
        name: "create_entity",
        title: "Create entity",
        description: "Creates an entity in a documented parent collection; the mock records only a synthetic approved mutation.",
        kind: "mutation",
        inputSchema: {
          type: "object",
          properties: {
            parentUrl: { type: "string", minLength: 1, maxLength: 2048, description: "Documented relative collection path." },
            jsonBody: { type: "string", minLength: 2, maxLength: 65536, description: "Documented JSON-encoded entity body string." },
            agentId: { type: "string", minLength: 1, maxLength: 200, description: "Reserved by Work IQ for future use." },
            approved: { type: "boolean", description: "Mock-only explicit mutation approval." },
            idempotency_key: { type: "string", minLength: 8, maxLength: 128, description: "Mock-only replay-safety key." },
          },
          required: ["parentUrl", "jsonBody", "approved", "idempotency_key"],
          additionalProperties: false,
        },
      },
      {
        name: "update_entity",
        title: "Update entity",
        description: "Updates an entity at a documented relative path; the mock records only a synthetic approved mutation.",
        kind: "mutation",
        inputSchema: {
          type: "object",
          properties: {
            entityUrl: { type: "string", minLength: 1, maxLength: 2048, description: "Documented relative entity path." },
            jsonBody: { type: "string", minLength: 2, maxLength: 65536, description: "Documented JSON-encoded entity body string." },
            agentId: { type: "string", minLength: 1, maxLength: 200, description: "Reserved by Work IQ for future use." },
            approved: { type: "boolean", description: "Mock-only explicit mutation approval." },
            idempotency_key: { type: "string", minLength: 8, maxLength: 128, description: "Mock-only replay-safety key." },
          },
          required: ["entityUrl", "jsonBody", "approved", "idempotency_key"],
          additionalProperties: false,
        },
      },
      {
        name: "delete_entity",
        title: "Delete entity",
        description: "Deletes an entity at a documented relative path; the mock records only a synthetic approved mutation.",
        kind: "mutation",
        inputSchema: {
          type: "object",
          properties: {
            entityUrl: { type: "string", minLength: 1, maxLength: 2048, description: "Documented relative entity path." },
            agentId: { type: "string", minLength: 1, maxLength: 200, description: "Documented optional agent identifier." },
            approved: { type: "boolean", description: "Mock-only explicit mutation approval." },
            idempotency_key: { type: "string", minLength: 8, maxLength: 128, description: "Mock-only replay-safety key." },
          },
          required: ["entityUrl", "approved", "idempotency_key"],
          additionalProperties: false,
        },
      },
      {
        name: "do_action",
        title: "Perform action",
        description: "Executes a documented side-effect action path; the mock records only a synthetic approved mutation.",
        kind: "mutation",
        inputSchema: {
          type: "object",
          properties: {
            actionUrl: { type: "string", minLength: 1, maxLength: 2048, description: "Documented relative action path." },
            jsonBody: { type: "string", minLength: 2, maxLength: 65536, description: "Optional documented JSON-encoded action body string." },
            agentId: { type: "string", minLength: 1, maxLength: 200, description: "Reserved by Work IQ for future use." },
            approved: { type: "boolean", description: "Mock-only explicit mutation approval." },
            idempotency_key: { type: "string", minLength: 8, maxLength: 128, description: "Mock-only replay-safety key." },
          },
          required: ["actionUrl", "approved", "idempotency_key"],
          additionalProperties: false,
        },
      },
      {
        name: "call_function",
        title: "Call function",
        description: "Calls a documented Microsoft Graph function path and returns deterministic synthetic data.",
        kind: "read",
        inputSchema: {
          type: "object",
          properties: {
            functionUrl: { type: "string", minLength: 1, maxLength: 2048, description: "Documented relative function path." },
            agentId: { type: "string", minLength: 1, maxLength: 200, description: "Reserved by Work IQ for future use." },
          },
          required: ["functionUrl"],
          additionalProperties: false,
        },
      },
      {
        name: "ask",
        title: "Ask Work IQ",
        description: "Models the documented Microsoft 365 Copilot question contract with deterministic synthetic answers.",
        kind: "read",
        inputSchema: {
          type: "object",
          properties: {
            question: { type: "string", minLength: 1, maxLength: 4000, description: "Documented natural-language question." },
            agentId: { type: "string", minLength: 1, maxLength: 200, description: "Optional documented agent identifier." },
            fileUrls: {
              type: "array",
              items: { type: "string" },
              maxItems: 20,
              description: "Optional documented OneDrive or SharePoint context URLs.",
            },
            conversationId: { type: "string", minLength: 1, maxLength: 256, description: "Optional documented conversation continuation identifier." },
            timeZone: { type: "string", minLength: 1, maxLength: 100, description: "Optional documented IANA time zone identifier." },
          },
          required: ["question"],
          additionalProperties: false,
        },
      },
      {
        name: "list_agents",
        title: "List agents",
        description: "Lists deterministic synthetic agents using the documented parameterless contract.",
        kind: "read",
        inputSchema: {
          type: "object",
          properties: {},
          required: [],
          additionalProperties: false,
        },
      },
      {
        name: "get_schema",
        title: "Get schema",
        description: "Models the documented Work IQ schema lookup contract and returns a bounded synthetic schema.",
        kind: "read",
        inputSchema: {
          type: "object",
          properties: {
            operationIds: { type: "string", minLength: 1, maxLength: 500, description: "Documented operation ID; use this or path, not both." },
            path: { type: "string", minLength: 1, maxLength: 2048, description: "Documented API path; use this or operationIds, not both." },
            operationType: { type: "string", enum: ["fetch", "create", "update"], description: "Documented operation type." },
            format: { type: "string", enum: ["jsonschema", "typescript"], description: "Optional documented output format." },
            backend: { type: "string", minLength: 1, maxLength: 100, description: "Reserved by Work IQ for future use." },
            agentId: { type: "string", minLength: 1, maxLength: 200, description: "Reserved by Work IQ for future use." },
          },
          required: ["path", "operationType"],
          additionalProperties: false,
        },
      },
      {
        name: "search_paths",
        title: "Search paths",
        description: "Searches deterministic synthetic paths using the documented Work IQ filter contract.",
        kind: "read",
        inputSchema: {
          type: "object",
          properties: {
            filter: { type: "string", minLength: 1, maxLength: 500, description: "Documented prefix or regular-expression path filter." },
            backend: { type: "string", minLength: 1, maxLength: 100, description: "Reserved by Work IQ for future use." },
            agentId: { type: "string", minLength: 1, maxLength: 200, description: "Reserved by Work IQ for future use." },
          },
          required: ["filter"],
          additionalProperties: false,
        },
      },
    ],
  },
  {
    id: "microsoft-enterprise",
    fixtureVersion: "2026-07-12.1",
    displayName: "Microsoft MCP Server for Enterprise",
    provider: "microsoft",
    productSurface: "Microsoft MCP Server for Enterprise — read-only directory surface",
    direction: "client-to-provider",
    endpointPath: "/enterprise",
    canonicalEndpoint: "https://mcp.svc.cloud.microsoft/enterprise",
    provenance: {
      fidelity: "provider-documented",
      verifiedAt: "2026-07-12",
      providerRelease: "Microsoft MCP Registry and Microsoft Graph documentation snapshot rechecked 2026-07-12",
      preview: true,
      documentationUrls: [
        "https://github.com/mcp/io.github.microsoft/EnterpriseMCP",
        "https://learn.microsoft.com/en-us/graph/mcp-server/get-started",
        "https://learn.microsoft.com/en-us/graph/mcp-server/use-enterprise-mcp-server-copilot-studio",
      ],
      limitations: [
        "Synthetic delegated Entra identity and directory data; no Microsoft Graph requests are performed.",
        "App-only identity and sovereign-cloud behavior are intentionally not claimed by this profile.",
        "The documented token-request scope is api://e8c77dc2-69b3-43f4-bc51-3213c9d915b4/.default; the tenant grant must separately contain enabled MCP.* delegated permissions such as MCP.User.Read.All.",
        "The manual OAuth fields mirror Microsoft's connection guidance, but real Entra sign-in, consent, federation, token claims, and refresh behavior are not emulated.",
        "The local revocation route, tool input schemas, MCP transport/version behavior, and provider results are synthetic test contracts rather than Microsoft-observed wire fixtures.",
      ],
      aspectFidelity: {
        endpoint: "provider-documented",
        authorization: "synthetic",
        catalog: "provider-documented",
        toolSchemas: "synthetic",
        providerResults: "synthetic",
        transport: "mcp-specification",
      },
    },
    oauth: {
      defaultRegistration: "manual",
      registrationModes: ["manual"],
      pkceRequired: true,
      issuer: "https://login.microsoftonline.com/organizations/v2.0",
      resource: "api://e8c77dc2-69b3-43f4-bc51-3213c9d915b4",
      audience: "api://e8c77dc2-69b3-43f4-bc51-3213c9d915b4",
      authorizationPath: "/organizations/oauth2/v2.0/authorize",
      tokenPath: "/organizations/oauth2/v2.0/token",
      revocationPath: "/organizations/oauth2/v2.0/logout",
      registrationPath: null,
      authorizationScopes: ["api://e8c77dc2-69b3-43f4-bc51-3213c9d915b4/.default"],
      requiredResourceScopes: ["api://e8c77dc2-69b3-43f4-bc51-3213c9d915b4/.default"],
      defaultClientAuthenticationMethod: "client_secret_post",
      clientAuthenticationMethods: ["client_secret_post"],
    },
    protocol: {
      versions: ["2025-11-25"],
      responseModes: ["json", "sse"],
      sessionMode: "required",
      pageSize: 2,
      fidelity: "mcp-specification",
    },
    tools: [
      {
        name: "microsoft_graph_suggest_queries",
        title: "Suggest Graph queries",
        description: "Suggests deterministic read-only Graph query templates.",
        kind: "read",
        inputSchema: {
          type: "object",
          properties: { intent: { type: "string", minLength: 1, maxLength: 300 } },
          required: ["intent"],
          additionalProperties: false,
        },
      },
      {
        name: "microsoft_graph_get",
        title: "Get Graph resource",
        description: "Returns deterministic synthetic directory data for an allowlisted path.",
        kind: "read",
        inputSchema: {
          type: "object",
          properties: { path: { type: "string", minLength: 1, maxLength: 300 } },
          required: ["path"],
          additionalProperties: false,
        },
      },
      {
        name: "microsoft_graph_list_properties",
        title: "List Graph properties",
        description: "Lists deterministic properties available for a synthetic resource.",
        kind: "read",
        inputSchema: {
          type: "object",
          properties: { resource: { type: "string", minLength: 1, maxLength: 120 } },
          required: ["resource"],
          additionalProperties: false,
        },
      },
    ],
  },
  {
    id: "agent-365-mail-v1-2026-07",
    fixtureVersion: "2026-07-12.1",
    displayName: "Work IQ Mail MCP — V1 manifest snapshot (July 2026)",
    provider: "microsoft",
    productSurface: "Microsoft Work IQ Mail / Agent 365 mcp_MailTools — V1 manifest permission generation",
    direction: "client-to-provider",
    endpointPath: "/agents/tenants/mock-tenant-id/servers/mcp_MailTools",
    canonicalEndpoint: "https://agent365.svc.cloud.microsoft/agents/tenants/example-tenant-id/servers/mcp_MailTools",
    provenance: {
      fidelity: "provider-documented",
      verifiedAt: "2026-07-12",
      providerRelease: "Work IQ Mail preview reference updated 2026-06-03; tooling manifest documentation snapshot",
      preview: true,
      documentationUrls: [
        "https://learn.microsoft.com/en-us/microsoft-copilot-studio/mcp-mail-work-iq",
        "https://learn.microsoft.com/en-us/microsoft-agent-365/developer/tooling",
      ],
      limitations: [
        "Microsoft marks this surface preview and explicitly warns that tool names and parameters may change.",
        "Tool names, endpoint pattern, V1 manifest scope, and audience follow the dated sources; argument schemas are bounded synthetic test contracts, not claimed vendor schema replicas.",
        "Synthetic mailbox, identity, and guardian behavior; no Agent 365 or Exchange service is contacted.",
      ],
      aspectFidelity: {
        endpoint: "provider-documented",
        authorization: "synthetic",
        catalog: "provider-documented",
        toolSchemas: "synthetic",
        providerResults: "synthetic",
        transport: "mcp-specification",
      },
    },
    oauth: {
      defaultRegistration: "manual",
      registrationModes: ["manual"],
      pkceRequired: true,
      issuer: "https://login.microsoftonline.com/mock-tenant-id/v2.0",
      resource: "api://05879165-0320-489e-b644-f72b33f3edf0",
      audience: "api://05879165-0320-489e-b644-f72b33f3edf0",
      authorizationPath: "/mock-tenant-id/oauth2/v2.0/authorize",
      tokenPath: "/mock-tenant-id/oauth2/v2.0/token",
      revocationPath: "/mock-tenant-id/oauth2/v2.0/logout",
      registrationPath: null,
      authorizationScopes: ["McpServers.Mail.All", "offline_access"],
      requiredResourceScopes: ["McpServers.Mail.All"],
      defaultClientAuthenticationMethod: "none",
      clientAuthenticationMethods: ["none"],
    },
    protocol: {
      versions: ["2025-11-25"],
      responseModes: ["json", "sse"],
      sessionMode: "required",
      pageSize: 4,
      fidelity: "mcp-specification",
    },
    tools: [
      {
        name: "mcp_MailTools_graph_mail_createMessage",
        title: "Create message draft",
        description: "Creates a deterministic synthetic draft after explicit mock approval.",
        kind: "mutation",
        inputSchema: {
          type: "object",
          properties: {
            subject: { type: "string", minLength: 1, maxLength: 200 },
            approved: { type: "boolean" },
            idempotency_key: { type: "string", minLength: 8, maxLength: 128 },
          },
          required: ["subject", "approved", "idempotency_key"],
          additionalProperties: false,
        },
      },
      {
        name: "mcp_MailTools_graph_mail_deleteMessage",
        title: "Delete message",
        description: "Deletes a deterministic synthetic message after explicit mock approval.",
        kind: "mutation",
        inputSchema: {
          type: "object",
          properties: {
            message_id: { type: "string", minLength: 1, maxLength: 120 },
            approved: { type: "boolean" },
            idempotency_key: { type: "string", minLength: 8, maxLength: 128 },
          },
          required: ["message_id", "approved", "idempotency_key"],
          additionalProperties: false,
        },
      },
      {
        name: "mcp_MailTools_graph_mail_getMessage",
        title: "Get message",
        description: "Returns one deterministic synthetic message.",
        kind: "read",
        inputSchema: {
          type: "object",
          properties: { message_id: { type: "string", minLength: 1, maxLength: 120 } },
          required: ["message_id"],
          additionalProperties: false,
        },
      },
      {
        name: "mcp_MailTools_graph_mail_listSent",
        title: "List sent messages",
        description: "Lists deterministic synthetic sent messages.",
        kind: "read",
        inputSchema: {
          type: "object",
          properties: { limit: { type: "integer", minimum: 1, maximum: 20 } },
          required: [],
          additionalProperties: false,
        },
      },
      {
        name: "mcp_MailTools_graph_mail_reply",
        title: "Reply",
        description: "Records a synthetic reply after explicit mock approval.",
        kind: "mutation",
        inputSchema: {
          type: "object",
          properties: {
            message_id: { type: "string", minLength: 1, maxLength: 120 },
            approved: { type: "boolean" },
            idempotency_key: { type: "string", minLength: 8, maxLength: 128 },
          },
          required: ["message_id", "approved", "idempotency_key"],
          additionalProperties: false,
        },
      },
      {
        name: "mcp_MailTools_graph_mail_replyAll",
        title: "Reply all",
        description: "Records a synthetic reply-all after explicit mock approval.",
        kind: "mutation",
        inputSchema: {
          type: "object",
          properties: {
            message_id: { type: "string", minLength: 1, maxLength: 120 },
            approved: { type: "boolean" },
            idempotency_key: { type: "string", minLength: 8, maxLength: 128 },
          },
          required: ["message_id", "approved", "idempotency_key"],
          additionalProperties: false,
        },
      },
      {
        name: "mcp_MailTools_graph_mail_searchMessages",
        title: "Search messages",
        description: "Searches deterministic synthetic messages.",
        kind: "read",
        inputSchema: {
          type: "object",
          properties: { query: { type: "string", minLength: 1, maxLength: 300 } },
          required: ["query"],
          additionalProperties: false,
        },
      },
      {
        name: "mcp_MailTools_graph_mail_sendDraft",
        title: "Send draft",
        description: "Records a synthetic draft send after explicit mock approval.",
        kind: "mutation",
        inputSchema: {
          type: "object",
          properties: {
            message_id: { type: "string", minLength: 1, maxLength: 120 },
            approved: { type: "boolean" },
            idempotency_key: { type: "string", minLength: 8, maxLength: 128 },
          },
          required: ["message_id", "approved", "idempotency_key"],
          additionalProperties: false,
        },
      },
      {
        name: "mcp_MailTools_graph_mail_sendMail",
        title: "Send mail",
        description: "Records a synthetic mail send after explicit mock approval.",
        kind: "mutation",
        inputSchema: {
          type: "object",
          properties: {
            to: { type: "array", items: { type: "string" }, minItems: 1, maxItems: 20 },
            subject: { type: "string", minLength: 1, maxLength: 200 },
            approved: { type: "boolean" },
            idempotency_key: { type: "string", minLength: 8, maxLength: 128 },
          },
          required: ["to", "subject", "approved", "idempotency_key"],
          additionalProperties: false,
        },
      },
      {
        name: "mcp_MailTools_graph_mail_updateMessage",
        title: "Update message",
        description: "Updates a deterministic synthetic message after explicit mock approval.",
        kind: "mutation",
        inputSchema: {
          type: "object",
          properties: {
            message_id: { type: "string", minLength: 1, maxLength: 120 },
            subject: { type: "string", minLength: 1, maxLength: 200 },
            approved: { type: "boolean" },
            idempotency_key: { type: "string", minLength: 8, maxLength: 128 },
          },
          required: ["message_id", "approved", "idempotency_key"],
          additionalProperties: false,
        },
      },
    ],
  },
  {
    id: "slack-user-mcp",
    fixtureVersion: "2026-07-12.1",
    displayName: "Slack User MCP",
    provider: "synthetic",
    productSurface: "Slack remote MCP server with user-token OAuth behavior",
    direction: "client-to-provider",
    endpointPath: "/mcp",
    canonicalEndpoint: "https://mcp.slack.com/mcp",
    provenance: {
      fidelity: "provider-observed",
      verifiedAt: "2026-08-05",
      providerRelease: "Live Slack remote MCP OAuth and initialize behavior observed 2026-08-05",
      preview: false,
      documentationUrls: [
        "https://docs.slack.dev/ai/slack-mcp-server/",
        "https://api.slack.com/authentication/oauth-v2",
      ],
      limitations: [
        "OAuth response and MCP version-negotiation shapes are provider-observed; identities, messages, search results, and credentials remain synthetic.",
        "The local mock serves Slack authorization and token paths from its loopback origin instead of contacting slack.com.",
      ],
      aspectFidelity: {
        endpoint: "provider-documented",
        authorization: "provider-observed",
        catalog: "synthetic",
        toolSchemas: "synthetic",
        providerResults: "synthetic",
        transport: "provider-observed",
      },
    },
    oauth: {
      defaultRegistration: "manual",
      registrationModes: ["manual"],
      pkceRequired: true,
      issuer: "https://mcp.slack.com",
      resource: "https://mcp.slack.com/mcp",
      audience: "https://mcp.slack.com/mcp",
      authorizationPath: "/oauth/v2/authorize",
      tokenPath: "/api/oauth.v2.access",
      revocationPath: "/api/auth.revoke",
      registrationPath: null,
      authorizationScopes: [
        "search:read.public",
        "search:read.private",
        "chat:write",
        "channels:history",
        "groups:history",
        "im:history",
        "mpim:history",
        "users:read",
        "channels:read",
      ],
      requiredResourceScopes: ["search:read.public"],
      defaultClientAuthenticationMethod: "client_secret_post",
      clientAuthenticationMethods: ["client_secret_post"],
      tokenResponseStyle: "slack-user",
    },
    protocol: {
      versions: ["2025-06-18"],
      responseModes: ["json", "sse"],
      sessionMode: "required",
      pageSize: 2,
      fidelity: "provider-observed",
      versionNegotiation: "strict",
    },
    tools: [
      {
        name: "slack_search_public",
        title: "Search public Slack messages",
        description: "Returns bounded synthetic public-channel search results.",
        kind: "read",
        inputSchema: {
          type: "object",
          properties: { query: { type: "string", minLength: 1, maxLength: 200 } },
          required: ["query"],
          additionalProperties: false,
        },
      },
      {
        name: "slack_search_private",
        title: "Search private Slack messages",
        description: "Returns bounded synthetic private-channel search results.",
        kind: "read",
        inputSchema: {
          type: "object",
          properties: { query: { type: "string", minLength: 1, maxLength: 200 } },
          required: ["query"],
          additionalProperties: false,
        },
      },
      {
        name: "slack_send_message",
        title: "Send a Slack message",
        description: "Records an approved synthetic Slack message in the mock mutation ledger.",
        kind: "mutation",
        inputSchema: {
          type: "object",
          properties: {
            channel_id: { type: "string", minLength: 1, maxLength: 80 },
            message: { type: "string", minLength: 1, maxLength: 4000 },
            approved: { type: "boolean" },
            idempotency_key: { type: "string", minLength: 8, maxLength: 128 },
          },
          required: ["channel_id", "message", "approved", "idempotency_key"],
          additionalProperties: false,
        },
      },
    ],
  },
]))

export function listProviderProfiles(): readonly ProviderProfile[] {
  return profiles
}

export function getProviderProfile(profileId: ProviderProfileId): ProviderProfile {
  const profile = profiles.find((candidate) => candidate.id === profileId)
  if (!profile) throw new Error(`Unknown enterprise MCP profile '${profileId}'`)
  return profile
}