# RightMessage Agent Onboarding

Use this guide to choose the correct RightMessage source and workflow for a task.

## Choose the task

- **Evaluate RightMessage:** start with [AI knowledge index](https://rightmessage.com/ai/index.md).
- **Connect an assistant:** use the [MCP guide](https://rightmessage.com/mcp).
- **Install tracking:** call `get-snippet-code`, place the returned script in every page `<head>`, then verify with `get-data-status`.
- **Inspect or configure a project:** call `set-active-project`, then `get-project-context` before any mutation.
- **Personalize a page:** call `get-page-elements`, then `create-campaign`, then `get-preview-url`.
- **Build a survey or flow:** call `get-survey-builder-guide` before creating resources.
- **Publish or recover:** inspect `list-config-versions` and `get-config-version-changes`, then call `publish-config` only after explicit user direction.

## Connect

- Endpoint: `https://api.rightmessage.com/mcp/rightmessage`
- Transport: MCP over Streamable HTTP
- Preferred authentication: OAuth 2.1 with PKCE with the `mcp:use` scope.
- Bearer-token fallback: `Authorization: Bearer YOUR_API_TOKEN_HERE`
- See [MCP agent reference](https://rightmessage.com/mcp.md) for exhaustive connection and tool details.

## Safety contract

- **Confirm the exact project:** Start by reading the authenticated user’s available projects, then use the selected project ID with each tool.
- **Inspect before mutation:** read the project context and affected resources before proposing a change.
- **Protect credentials:** never commit or share OAuth credentials or bearer tokens.
- **Drafts are not live:** RightMessage configuration mutations are saved as drafts. Nothing changes on your live site until you explicitly publish with `publish-config` or through the app.
- **Explicit publishing:** Publishing is a separate, explicit action through `publish-config` or the RightMessage app.
- **Verify the changed surface:** use previews for personalizations and data-status checks for tracking installation.
- **Recover with version history:** Inspect version descriptions and diffs, undo the latest draft change, or restore a selected or last-published configuration when you need to recover.
- **Respect scoped access:** Hosted OAuth requests the `mcp:use` scope. OAuth connections and manually created API tokens can be revoked, and every project remains subject to the authenticated user’s RightMessage access.

## Canonical references

- [AI knowledge index](https://rightmessage.com/ai/index.md)
- [LLMs.txt](https://rightmessage.com/llms.txt)
- [MCP guide](https://rightmessage.com/mcp)
- [MCP agent reference](https://rightmessage.com/mcp.md)
- [Integrations](https://rightmessage.com/integrations)
- [Help](https://rightmessage.com/help)
