Platform sample
Not signed in

Connecting to Platform

Every way an application outside Platform can reach it. Each card runs a live test from this app's server and shows what was sent and what came back. A card that needs something you have not set up yet tells you what to do.

CredentialMCP gatewayREST APIFlow Machine and Advisor
Sign-in token (page 1)refusedrefusedrefused
Gateway token (OAuth, mcp scope)worksrefusedrefused
API keyworksworksworks

You are not signed in. The tests that need no credential have run. The rest run once you sign in.

Sign in with Platform

3 PASS
1 REFUSED AS EXPECTED

READY and SIGN IN FIRST mean nothing is missing: the card runs when you press its button or sign in. NOT CONFIGURED means a setting has to be added.

No credential

What anyone can reach. Start here when something does not work.

C1

Health

PASS

What this is

Three addresses that answer without any credential. Use them to tell "Platform is down" apart from "my credential is wrong" before debugging anything else.

Setup required

  • ✓PLATFORM_ISSUER is set.

Request and response

GET https://shared-staging.heartwoodguild.com/health 200 295 ms
Request
GET https://shared-staging.heartwoodguild.com/health
accept: */*
Response
200
content-type: application/json

{
  "status": "ok"
}
GET https://shared-staging.heartwoodguild.com/ready 200 295 ms
Request
GET https://shared-staging.heartwoodguild.com/ready
accept: */*
Response
200
content-type: application/json

{
  "status": "ok"
}
GET https://shared-staging.heartwoodguild.com/mcp-health 200 840 ms
Request
GET https://shared-staging.heartwoodguild.com/mcp-health
accept: */*
Response
200
content-type: application/json

{
  "status": "healthy",
  "summary": {
    "ok": 2,
    "error": 0,
    "not_checked": 8
  },
  "checks": [
    {
      "tool": "gcp_logs_health_check",
      "status": "ok",
      "message": "Google Cloud Logging accessible for project multi-org-staging."
    },
    {
      "tool": "media_health_check",
      "status": "not_checked",
      "reason": "no_organization",
      "message": "MCP proxy tools require an organization context. Select an organization and try again."
    },
    {
      "tool": "fiip_health_check",
      "status": "not_checked",
      "reason": "no_organization",
      "message": "MCP proxy tools require an organization context. Select an organization and try again."
    },
    {
      "tool": "github_health_check",
      "status": "not_checked",
      "reason": "no_organization",
      "message": "MCP proxy tools require an organization context. Select an organization and try again."
    },
    {
      "tool": "monday_health_check",
      "status": "not_checked",
      "reason": "no_organization",
      "message": "MCP proxy tools require an organization context. Select an organization and try again."
    },
    {
      "tool": "qbo_health_check",
      "status": "not_checked",
      "reason": "no_organization",
      "message": "MCP proxy tools require an organization context. Select an organization and try again."
    },
    {
      "tool": "r365pub_health_check",
      "status": "not_checked",
      "reason": "no_organization",
      "message": "MCP proxy tools require an organization context. Select an organization and try again."
    },
    {
      "tool": "weather_health_check",
      "status": "not_checked",
      "reason": "no_organization",
      "message": "MCP proxy tools require an organization context. Select an organization and try again."
    },
    {
      "tool": "spo_health_check",
      "status": "not_checked",
      "reason": "no_organization",
      "message": "SharePoint belongs to an organization and none is active. Select an organization and try again."
    },
    {
      "tool": "platform_describe_schema_health_check",
      "status": "ok",
      "message": "platform schema introspection healthy (88 objects)"
    }
  ],
  "organization_id": null
}

Result

All three answered 200.

C2

Discovery

PASS

What this is

The three published documents. The first describes sign-in (OpenID Connect). The second describes the same server as an OAuth authorization server. The third says which authorization server protects the MCP gateway, which is how an MCP client finds where to sign in.

Setup required

  • ✓PLATFORM_ISSUER is set.

Request and response

GET https://shared-staging.heartwoodguild.com/.well-known/openid-configuration 200 290 ms
Request
GET https://shared-staging.heartwoodguild.com/.well-known/openid-configuration
accept: */*
Response
200
content-type: application/json
cache-control: no-store

{
  "issuer": "https://shared-staging.heartwoodguild.com",
  "authorization_endpoint": "https://shared-staging.heartwoodguild.com/mcp-oauth/authorize",
  "token_endpoint": "https://shared-staging.heartwoodguild.com/mcp-oauth/token",
  "registration_endpoint": "https://shared-staging.heartwoodguild.com/mcp-oauth/register",
  "revocation_endpoint": "https://shared-staging.heartwoodguild.com/mcp-oauth/revoke",
  "introspection_endpoint": "https://shared-staging.heartwoodguild.com/mcp-oauth/introspect",
  "jwks_uri": "https://shared-staging.heartwoodguild.com/mcp-oauth/jwks",
  "response_types_supported": [
    "code"
  ],
  "grant_types_supported": [
    "authorization_code",
    "refresh_token"
  ],
  "token_endpoint_auth_methods_supported": [
    "none",
    "client_secret_basic",
    "client_secret_post"
  ],
  "revocation_endpoint_auth_methods_supported": [
    "none",
    "client_secret_basic",
    "client_secret_post"
  ],
  "introspection_endpoint_auth_methods_supported": [
    "client_secret_basic",
    "client_secret_post"
  ],
  "code_challenge_methods_supported": [
    "S256"
  ],
  "scopes_supported": [
    "mcp",
    "openid",
    "profile",
    "email",
    "roles",
    "entitlements"
  ],
  "userinfo_endpoint": "https://shared-staging.heartwoodguild.com/mcp-oauth/userinfo",
  "end_session_endpoint": "https://shared-staging.heartwoodguild.com/mcp-oauth/end-session",
  "subject_types_supported": [
    "public"
  ],
  "id_token_signing_alg_values_supported": [
    "RS256"
  ],
  "claims_supported": [
    "iss",
    "sub",
    "aud",
    "exp",
    "iat",
    "nonce",
    "auth_time",
    "at_hash",
    "act",
    "email",
    "email_verified",
    "name",
    "preferred_username",
    "picture",
    "updated_at",
    "roles",
    "orgs",
    "entitlements"
  ]
}
GET https://shared-staging.heartwoodguild.com/.well-known/oauth-authorization-server 200 233 ms
Request
GET https://shared-staging.heartwoodguild.com/.well-known/oauth-authorization-server
accept: */*
Response
200
content-type: application/json
cache-control: no-store

{
  "issuer": "https://shared-staging.heartwoodguild.com",
  "authorization_endpoint": "https://shared-staging.heartwoodguild.com/mcp-oauth/authorize",
  "token_endpoint": "https://shared-staging.heartwoodguild.com/mcp-oauth/token",
  "registration_endpoint": "https://shared-staging.heartwoodguild.com/mcp-oauth/register",
  "revocation_endpoint": "https://shared-staging.heartwoodguild.com/mcp-oauth/revoke",
  "introspection_endpoint": "https://shared-staging.heartwoodguild.com/mcp-oauth/introspect",
  "jwks_uri": "https://shared-staging.heartwoodguild.com/mcp-oauth/jwks",
  "response_types_supported": [
    "code"
  ],
  "grant_types_supported": [
    "authorization_code",
    "refresh_token"
  ],
  "token_endpoint_auth_methods_supported": [
    "none",
    "client_secret_basic",
    "client_secret_post"
  ],
  "revocation_endpoint_auth_methods_supported": [
    "none",
    "client_secret_basic",
    "client_secret_post"
  ],
  "introspection_endpoint_auth_methods_supported": [
    "client_secret_basic",
    "client_secret_post"
  ],
  "code_challenge_methods_supported": [
    "S256"
  ],
  "scopes_supported": [
    "mcp",
    "openid",
    "profile",
    "email",
    "roles",
    "entitlements"
  ],
  "userinfo_endpoint": "https://shared-staging.heartwoodguild.com/mcp-oauth/userinfo",
  "end_session_endpoint": "https://shared-staging.heartwoodguild.com/mcp-oauth/end-session"
}
GET https://shared-staging.heartwoodguild.com/.well-known/oauth-protected-resource 200 198 ms
Request
GET https://shared-staging.heartwoodguild.com/.well-known/oauth-protected-resource
accept: */*
Response
200
content-type: application/json
cache-control: no-store

{
  "resource": "https://shared-staging.heartwoodguild.com/mcp",
  "authorization_servers": [
    "https://shared-staging.heartwoodguild.com"
  ],
  "bearer_methods_supported": [
    "header"
  ],
  "scopes_supported": [
    "mcp"
  ]
}

Result

All three documents are published.

C3

The MCP gateway's challenge

PASS

What this is

Calling the MCP gateway with no credential is refused, and the refusal says where to go: the WWW-Authenticate header points at the document describing how to get a token. This is the first step every MCP client takes.

Setup required

  • ✓PLATFORM_ISSUER is set.

Request and response

POST https://shared-staging.heartwoodguild.com/mcp 401 209 ms
Request
POST https://shared-staging.heartwoodguild.com/mcp
accept: application/json, text/event-stream
content-type: application/json

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "initialize",
  "params": {
    "protocolVersion": "2024-11-05",
    "capabilities": {},
    "clientInfo": {
      "name": "agency-oauth-sample",
      "version": "0.1.0"
    }
  }
}
Response
401
content-type: application/json
www-authenticate: Bearer resource_metadata="https://shared-staging.heartwoodguild.com/.well-known/oauth-protected-resource/mcp"

{
  "detail": {
    "error": {
      "type": "auth_failed",
      "message": "Authentication required. Use X-API-Key or an Authorization: Bearer token."
    }
  }
}

Result

Refused with 401, and the header says where to get a token.

API key

For a program acting on its own. One key works at the REST API, the MCP gateway, and through Platform to Flow Machine and the Advisor.

C4

Platform REST API, with an API key

What this is

An API key is the credential for a program with no person at the keyboard. It acts as the user who owns it, limited to the organizations chosen when it was made. It is sent as Authorization: Bearer <key> or X-API-Key: <key>. This is the only credential that Platform's REST API accepts from outside.

Setup required

  • ✓PLATFORM_API_KEY is set. Make a key in Platform: the application's Keys tab → Create a key, or your profile → Personal access tokens.
  • ○You are signed in to this app. Results from the app's own key are shown only to signed-in users.

Result

Nothing is missing. Sign in at the top of the page.

C5

MCP gateway, with an API key

What this is

The MCP gateway at /mcp is one address for every tool Platform offers to an AI agent: its own, Flow Machine's, the Advisor's, and the integrations it proxies. It speaks JSON-RPC over HTTP POST. The list of tools depends on who is asking: a caller sees only what its organizations and permissions allow.

Setup required

  • ✓PLATFORM_API_KEY is set.
  • ○You are signed in to this app.

Result

Nothing is missing. Sign in at the top of the page.

C6

Flow Machine, through Platform

What this is

Flow Machine has no public address of its own. Platform forwards anything under /api/flow-machine/ to it, after checking the caller and attaching a short-lived signed statement of who they are. The same API key works here.

Setup required

  • ✓PLATFORM_API_KEY is set, and its owner may use Flow Machine.
  • ○You are signed in to this app.

Result

Nothing is missing. Sign in at the top of the page.

C7

AI Advisor, through Platform

What this is

The Advisor is reached the same way, under /api/advisor/. Platform is the only way in to either app.

Setup required

  • ✓PLATFORM_API_KEY is set.
  • ○You are signed in to this app.

Result

Nothing is missing. Sign in at the top of the page.

MCP gateway as the signed-in user

For an app that acts as each of its users. It needs a second client.

C8

Connect the MCP gateway as you

What this is

Instead of one shared API key, an app can act as each signed-in user. It runs the same sign-in flow with a second client that holds the mcp scope. The token that comes back is a real Platform key for the gateway, acting as you, valid for 30 days. That is far more than a sign-in needs, which is why it is a separate client and a separate button. Platform never gives mcp to an application's sign-in client: an administrator adds a second client for it, on the application's Keys tab.

Setup required

  • ✓MCP_CLIENT_ID and MCP_CLIENT_SECRET are set, for a second client, added on the application's Keys tab, with scopes openid and mcp and redirect URI https://agency-oauth-sample.heartwoodguild.com/connect/mcp/callback.
  • ○You are signed in to this app.

Result

Nothing is missing. Sign in at the top of the page.

C9

MCP gateway, as you

What this is

The same tool list as the API-key card, but for your own account. Compare the two counts: each caller sees only the tools it is entitled to.

Setup required

  • ✓The second client is set up (see C8).
  • ○You are signed in to this app.
  • ○You have pressed Connect the MCP gateway as me.

Result

Nothing is missing. Sign in at the top of the page.

C10

Introspect the gateway token

What this is

Asks Platform about the token just issued. This is how to learn who a token belongs to and what it is for without calling the gateway with it.

Setup required

  • ✓The second client is set up (see C8).
  • ○You are signed in to this app.
  • ○You have pressed Connect the MCP gateway as me.

Result

Nothing is missing. Sign in at the top of the page.

C11

Disconnect

What this is

Revokes the gateway token and then tries to use it. The key disappears from Platform's API Keys page at the same moment.

Setup required

  • ✓The second client is set up (see C8).
  • ○You are signed in to this app.
  • ○You have pressed Connect the MCP gateway as me.

Result

Nothing is missing. Sign in at the top of the page.

Boundaries

Each of these must be refused. A refusal is the pass; an accepted request is the failure.

N1

A sign-in token cannot open the MCP gateway

What this is

The access token from page 1 proves who signed in and nothing more. The gateway must refuse it. If this card ever shows the gateway accepting it, the sign-in client has been given the mcp scope and every sign-in is handing out a gateway key.

Setup required

  • ○You are signed in, and your sign-in token still answers at /userinfo.

Result

Nothing is missing. Sign in at the top of the page.

N2

A sign-in token cannot call the REST API

What this is

The same token against Platform's REST API. Signing in to an app does not let that app act as you on Platform.

Setup required

  • ○You are signed in, and your sign-in token still answers at /userinfo.

Result

Nothing is missing. Sign in at the top of the page.

N3

A gateway token cannot call the REST API

What this is

The token from "Connect the MCP gateway as you" works at /mcp and nowhere else. REST refuses it. To call REST, an app needs an API key.

Setup required

  • ✓The second client is set up (see C8).
  • ○You are signed in to this app.
  • ○You have pressed Connect the MCP gateway as me.

Result

Nothing is missing. Sign in at the top of the page.

N4

The REST API refuses a caller with no credential

REFUSED AS EXPECTED

What this is

The baseline. Nothing on Platform's REST API answers an anonymous caller.

Setup required

  • ✓PLATFORM_ISSUER is set.

Request and response

GET https://shared-staging.heartwoodguild.com/api/platform/user/organizations 401 204 ms
Request
GET https://shared-staging.heartwoodguild.com/api/platform/user/organizations
accept: */*
Response
401
content-type: application/json

{
  "detail": "Authentication required"
}

Result

Refused with 401.

Also worth knowing

Explained, not tested.

E1 Self-registrationHow Claude, ChatGPT and other MCP clients connect with no operator involved. The client registers itself at /mcp-oauth/register, gets a public client id (PKCE, no secret) with the mcp scope only, and the user is shown a consent screen. The registration expires after 90 days without use. Not tested here because every test would leave a client behind.
E2 A token from the upstream identity providerWhere a Platform signs users in through its own identity provider (Authentik or Dex), a token from that provider is accepted as a Bearer. Where Platform runs its own sign-in, it is not. New work should not depend on it.
E3 Platform calling your MCP serverThe opposite direction. An operator registers your MCP server on Platform's MCP Proxies page, with the credential Platform should present to it, and your tools appear in the gateway's list for that organization.
E4 Choosing an organizationA caller that belongs to several organizations says which one a request is for with the X-Target-Organization-Id header, or with the gateway tools list_my_organizations and set_active_organization.
E5 Not availableThere is no client_credentials grant: a program with no user uses an API key. There are no outbound webhooks. There is no CORS on /mcp or the REST API, so a page running in a browser on another address cannot call them: every call on this page is made by this app's server. And an OAuth access token is not accepted on REST.