# Connect TendBase to Muse

This guide is for Meta's Muse personal assistant. For the terminal coding agent, use [Muse Code](https://usetendbase.com/docs/muse-code).

Connect through Muse's custom connector flow using TendBase's hosted MCP server and browser OAuth.

## Ask Muse to connect

Paste this into Muse:

> Create a reusable custom connector for TendBase. Read https://usetendbase.com/docs/muse. Connect to https://usetendbase.com/mcp using Streamable HTTP and guide me through browser OAuth authorization. Discover the tools and call tendbase_help to verify access. Save the connector and its usage instructions for future conversations. Only store information when I explicitly ask. Do not write or delete test records during setup.

Complete email verification in the browser handoff. If you already use TendBase elsewhere, use the same verified email to connect to the same account. Credentials belong in Muse's supported secure credential flow, never in chat or a saved skill.

## Instructions for the agent building the connector

1. Use the remote endpoint `https://usetendbase.com/mcp`. A local stdio database would not connect to the user's hosted TendBase account. Muse runs on a cloud computer; a callback on the user's laptop is not a callback on that computer.
2. Use an MCP client with Streamable HTTP and OAuth support. On an unauthenticated request, expect HTTP 401. Follow the `resource_metadata` URL in `WWW-Authenticate`, or read `https://usetendbase.com/.well-known/oauth-protected-resource/mcp`. Discover authorization endpoints from its `authorization_servers` entry. Do not guess login URLs or scrape a signed-in client's credentials.
3. Use the advertised dynamic registration endpoint, a public OAuth client, authorization code flow and PKCE with S256. The OAuth resource is exactly `https://usetendbase.com/mcp`. Request the scopes in protected-resource metadata: `tendbase:read`, `tendbase:write`, `tendbase:export`, and `tendbase:delete`. TendBase currently requires all four; requesting only read scope fails with HTTP 403. User instructions and Muse approvals control which operations you perform after authorization.
4. Use a redirect URI supported by Muse's actual browser handoff and register that exact URI. Keep OAuth state and the PKCE verifier inside the client. Use the supported credential store for access and refresh tokens, and retain registration details for later connections. If the connector cannot securely complete the handoff or retain and refresh authorization, report that limitation and stop setup. Never ask for a raw token, email code, or final redirect URL in chat.
5. Finish the MCP initialization handshake, discover tools with `tools/list`, and call `tendbase_help` with `{}`. Check for a successful tool result; listing tools alone is not verification. Keep tool schemas from discovery rather than inventing argument names. Do not test every tool, because some write, export, delete, or send a support ticket.
6. Save the connector and the operating rules below as a reusable skill through Muse's supported mechanism. Confirm availability by calling `tendbase_help` from a fresh conversation. Report initial access and fresh-conversation reuse separately.

## Operating rules to retain

- Save information only when the user asks. Call `tendbase_help` before the first write and follow its current contract.
- Carry truthful provenance, use a stable idempotency key for each logical write, and report success only after a TendBase receipt.
- Use `tendbase_recall` for the user's question and `tendbase_analyze` for inventories or timelines. Explain retrieval limitations.
- Preview maintenance before applying it. Memory deletion requires the resolved scope and the user's exact confirmation phrase. Application-record deletion is a separate revision-guarded operation; follow [application records](https://usetendbase.com/docs/application-records).
- Refresh expired authorization through the client. If refresh fails or access is revoked, return to browser sign-in instead of retrying indefinitely.

## If setup fails

An HTTP 401 before login is expected. A 403 after login can mean missing scopes. A failed browser callback or unavailable credential store means the custom connector is incomplete. A successful Muse Code connection does not prove the app connection works.

Report the Muse client, failed step, and safe error text. Do not work around an OAuth failure by creating an unauthenticated proxy or copying credentials from another client. Muse's built-in connector directory is a separate distribution path reviewed by Meta.

## Sources

- [Meta: how Muse works with connectors](https://www.meta.com/help/artificial-intelligence/1687253048996149/)
- [Meta: Muse architecture and custom connectors](https://research.meta.ai/blog/security-and-safety-for-ai-agents-our-approach-with-muse)
- [Muse Connector Platform](https://muse.ai/platform)
- [TendBase authentication](https://usetendbase.com/docs/authentication)