Reference

MCP server

Connect your AI agent to RawTree using the hosted MCP server.

MCP server

MCP is an open protocol that lets AI applications use external tools. RawTree offers a hosted MCP server and an open-source local server for querying and ingesting data, inspecting tables and logs, and managing RawTree resources.

Hosted MCP server

RawTree hosts a Streamable HTTP MCP server at:

https://mcp.rawtree.com/mcp

There is nothing to install and no local process to run. When you connect, your MCP client opens RawTree in your browser so you can sign in and approve access using OAuth. You do not need to create or copy an API key.

Codex

codex mcp add rawtree --url https://mcp.rawtree.com/mcp

Codex prompts you to complete OAuth when it first connects. You can also start the flow explicitly with codex mcp login rawtree.

Claude Code

claude mcp add --transport http rawtree https://mcp.rawtree.com/mcp

Run /mcp in Claude Code and select rawtree to complete OAuth.

Claude

In Claude web or desktop, open Settings > Connectors > Add custom connector and enter:

https://mcp.rawtree.com/mcp

Cursor

Open the command palette and choose Cursor Settings > MCP > Add new global MCP server.

{
  "mcpServers": {
    "rawtree": {
      "url": "https://mcp.rawtree.com/mcp"
    }
  }
}

For another OAuth-capable client, add the endpoint as a remote or Streamable HTTP MCP server. The client discovers RawTree's authorization server automatically.

Choose RawTree resources

One OAuth connection can work across every organization, cluster, and database your RawTree user can access. Resource context belongs to each tool call rather than the MCP URL:

  • Organization tools take organization.
  • Cluster tools take organization and a cluster name or ID, depending on the operation.
  • Data, table, log, and API-key tools take organization and cluster. database is optional and uses the cluster's default database when omitted.

Start with list-organizations, then use list-clusters and list-databases to discover the exact names available to the signed-in user.

The OAuth connection grants broad RawTree access, including destructive operations. Tools that delete, provision, or change resources require explicit confirmation when the operation supports it. Revoke the connection at any time from Profile > OAuth apps.

Available tools

The server covers the full RawTree workflow. The RawTree API enforces the signed-in user's role and resource access on every call.

AreaTools
Datarun-query, insert-json, insert-from-url
Tables and logslist-tables, create-table, describe-table, delete-table, list-logs
Databaseslist-databases, delete-database
Organizationslist-organizations, list-organization-members, add-organization-member, update-organization-member, remove-organization-member
Clusterslist-clusters, get-cluster, list-cluster-sizes, verify-cluster-s3-access, create-cluster, update-cluster, pause-cluster, resume-cluster
Appslist-apps, install-app, uninstall-app
API keyslist-api-keys, create-api-key, delete-api-key

Hosted MCP with an API key

If your client runs where browser login is unavailable, such as a server, CI job, or headless agent, send a RawTree API key as a Bearer token instead of using OAuth.

Create a key with the least permission that fits the task:

rtree key create --name mcp --permission read_write
TaskPermission
Query data, inspect tables, and read logsread_only
Insert and query dataread_write
Insert onlywrite_only
Manage databases or API keys, or delete tablesadmin

Claude Code

claude mcp add --transport http rawtree https://mcp.rawtree.com/mcp \
  --header "Authorization: Bearer rt_xxxxxxxxx"

API-key calls may omit organization, cluster, and database to use the key's bound cluster and default database. Explicit resource values must match the key's binding. User-level tools such as list-organizations require OAuth.

Local MCP server

The hosted server uses the same open-source @rawtree/mcp package available on npm. Run it locally when your client cannot connect to a hosted MCP server or when you are developing the server itself. Local clients authenticate with a RawTree API key.

Claude Code

claude mcp add rawtree \
  -e RAWTREE_API_KEY=rt_xxxxxxxxx \
  -- npx -y @rawtree/mcp

Codex

codex mcp add rawtree \
  --env RAWTREE_API_KEY=rt_xxxxxxxxx \
  -- npx -y @rawtree/mcp

The package also supports self-hosted Streamable HTTP. See the RawTree MCP repository for server options and development setup.

Next steps