# Connect a third-party MCP service The keyring holder chooses **Services → Add service → Other**, enters the MCP address, reviews the discovered service identity, icon, connected accounts and supported permissions, and creates the service in Mementom's standalone secure window. The existing service editor owns permission changes, Timing, pause and revocation. A service never grants owner keyring-management authority. ## Publish your service description Your company first registers its app, HTTPS origin and exact return destinations through its existing Mementom integration. Enable account access and link your app's opaque account references through the existing verified account flow. A keyring holder must already have that app account right. No new person or keyring identifier is exposed. Publish RFC9728 protected-resource metadata for the exact MCP resource. Respond to its unauthenticated request with the normal Bearer resource_metadata challenge, or serve the standard path-specific/root well-known metadata. Add: ```json { "resource": "https://your-service.example/api/mcp", "authorization_servers": ["https://auth.mementom.app/oauth/application/app_YOUR_APP"], "https://mementom.app/service-manifest": "https://your-service.example/api/mcp/manifest" } ``` At that same-origin manifest URL publish: ```json { "schemaVersion": 1, "authorizationServer": "https://auth.mementom.app/oauth/application/app_YOUR_APP", "applicationId": "app_YOUR_APP", "resource": "https://your-service.example/api/mcp", "displayName": "Your service", "description": "What your service does.", "iconUrl": "https://your-service.example/icon-192.png", "categories": [{ "id": "items", "label": "Items", "capabilities": [{ "id": "items.read", "label": "View items", "read": "Read your items" }, { "id": "items.delete", "label": "Delete items", "write": "Delete selected items" }] }] } ``` The same fields may be registered server-to-server using `POST /api/v1/application-service/configure` on the authorization origin, with your company bearer credential and `version:0` initially. Later changes require the current returned version. Use declared category-prefixed capability IDs; read never implies write. Optional `description` and normalized `tools` may accompany the registered configuration. The manifest supplies dependencies in a tool's `_meta["https://mementom.app/capability"]`: ```json {"capability":"items.delete","access":"write","requires":[{"capability":"items.read","access":"read"}]} ``` The namespaced `https://mementom.app/service-permissions` object may also contain `tools:[{name,area,capability,access,requiredCapabilities}]`. Both forms must agree when describing the same operation. Registration stores only `tools:[{name,title?,capability,access,requiredCapabilities}]`; each dependency must name a declared capability and supported access. Read and write category fields are descriptions, not booleans. Stable IDs remain unchanged, including their case. Requirements belong to operations, since actions sharing a capability can need different additional rights. Your MCP server owns exact mappings and validates every required right on the exact account immediately before execution. Discovery permits manifests up to1MiB; metadata and icons remain bounded to64KiB. It uses HTTPS reads without credentials, cookies or redirects. Metadata, manifest, resource and icon must match the registered app origin; the manifest resource must equal the entered MCP URL. DNS answers are validated and pinned to the socket. Production blocks private/reserved network targets. Local development permits registered LAN addresses, while retaining normal TLS checks. Icons are optional bounded, verified raster images served through Mementom's own origin. Missing or unavailable artwork uses the existing key icon. An icon URL on an unregistered origin is rejected. Discovery also verifies the exact app-specific Mementom issuer in resource metadata and the manifest's `authorizationServer`, plus any advertised management return against registered redirects. Other begins with no capability permissions selected. Each grant stores exact capability IDs, never a capability wildcard. Newly declared capabilities remain off until the owner explicitly selects and saves them; existing selected IDs are retained. Operation dependencies appear in the same permission controls during creation, editing and authorization review. Opening **Actions requiring other rights** shows the action and every required right. Each right stays independently selected; requirements never enable additional access automatically. Discovery writes no service or grant. On reviewed Create, Mementom may register the initial authoritative same-origin manifest. It never replaces existing developer configuration from a holder's service: a difference requires a company server update. ## Connect the MCP host Read `GET /api/v1/application-service/configuration?applicationId=...` on the configured authorization origin. Use its resource, authorizationServer, authorizationMetadata, scope and transport. The app-specific OAuth issuer is `/oauth/application/{applicationId}`, with `register`, `authorize`, `token` and `revoke` endpoints. Issuer discovery is `/.well-known/oauth-authorization-server/oauth/application/{applicationId}`. Use authorization code, PKCE S256, exact resource and registered client redirect, state and issuer validation. Scope `application:capabilities` activates the service's existing policy; it grants no capability by itself. Access tokens last at most 15 minutes. Refresh rotation cannot extend the original service authentication window, restore uses or bypass permission changes. Personal and Marketing tokens are never valid application-service tokens. Authentication and private key work remain on Mementom's separate secure surface. Your app, MCP tools and model receive no photo, caption, numeric evidence, keyring-management session or global holder identity. ## Authorize every call Your backend calls `POST /api/v1/application-service/validate` with its company bearer credential and JSON: ```json { "applicationId": "app_YOUR_APP", "resource": "https://your-service.example/api/mcp", "token": "HOST_SUPPLIED_ACCESS_TOKEN", "accountRef": "EXACT_APP_OWNED_ACCOUNT_REFERENCE", "capability": "items.read", "access": "read" } ``` The response is `{active:true,applicationId,resource,expiresAt,accounts, capabilities,access}`. `expiresAt` is Unix milliseconds capped by token/service deadlines. Accounts contain only `{accountRef,resourceDigest,resourceLabel}`; capabilities are exact currently granted IDs. Resolve accountRef to your private account on your own server. Never accept caller-supplied owner IDs. Omitting capability requests connection/discovery metadata only. This supports write-only services and empty business grants; returned permissions across accounts do not authorize execution on a different account. Exact business calls require the exact accountRef/capability/access tuple, checked again on every invocation, including every operation dependency on that same account. A capability union across accounts never satisfies a dependency. Account admission is charged once per OAuth grant/account. Reads and subsequent validation do not spend it again. Source account restrictions, permission edits, pause, revocation and original deadlines remain live. Invalid/ended tokens return 401, insufficient permissions403, unavailable validation503. Fail closed. Your existing protected-action and destructive-action rules still apply. MCP schema visibility and descriptions never grant permission. Do not automatically retry an uncertain mutation. ## Return from service management From your server, create a request at `POST /api/v1/application-service/management-requests`, using the company bearer: `{applicationId,returnUri,clientState,windowRequestId}`. `returnUri` must exactly match a registered callback on the app's service origin; clientState is a fresh 32–128-character URL-safe token and windowRequestId is a fresh UUID. Open the returned authorizationUrl with the existing standalone window launcher. Mementom privately verifies and consumes the owner's result, then returns only `state=clientState&mementom=updated` to your callback. No provider code, token or private owner context is returned. Check the saved state and refresh live permissions. This completion is a notification, not new authority.