RawTree MCP Server
OfficialClick on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@RawTree MCP Servershow me the tables in my project"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
RawTree MCP Server
An MCP server for RawTree, an analytics database for unstructured data. Query data with SQL, insert JSON, inspect table schemas, review RawTree logs, and manage project credentials from MCP clients like Claude Code, Cursor, and Claude Desktop.
Features
Queries — Run read-only SQL against a RawTree project and receive JSON rows, metadata, statistics, and hints.
Ingest — Insert a single JSON object, arrays of JSON objects, or public URL data. Supports RawTree built-in transforms for OTLP traces/logs/metrics, CloudWatch Logs, CloudTrail, and Firehose.
Tables — List tables, describe table columns and sizes, and delete tables after explicit confirmation.
Logs — Inspect RawTree query and insert history with structured filters for type, status, origin, table, hints, time window, and pagination.
API Keys — List, create, and revoke RawTree API keys for a project. Creation responses include the one-time token.
Projects — Get the current project from API-key context.
Transports — Supports stdio for local MCP clients and Streamable HTTP for remote or multi-client deployments.
Setup
Create a RawTree API key from the RawTree CLI, dashboard, or API. A project API key starts with rt_ and is enough for data tools such as run-query, insert-json, list-tables, and list-logs.
The get_project tool uses the current token to read project identity from RawTree's keys endpoint, with a tables endpoint fallback for non-admin read-capable project API keys.
Usage
The server supports two transport modes: stdio (default) and HTTP.
Stdio Transport
Quick Setup
npx add-mcp @rawtree/mcp --name rawtree --env "RAWTREE_API_KEY=rt_xxxxxxxxx"Claude Code
claude mcp add rawtree -e RAWTREE_API_KEY=rt_xxxxxxxxx -- npx -y @rawtree/mcpCursor
Open the command palette and choose "Cursor Settings" > "MCP" > "Add new global MCP server".
{
"mcpServers": {
"rawtree": {
"command": "npx",
"args": ["-y", "@rawtree/mcp"],
"env": {
"RAWTREE_API_KEY": "rt_xxxxxxxxx"
}
}
}
}Claude Desktop
Open Claude Desktop settings > "Developer" tab > "Edit Config".
{
"mcpServers": {
"rawtree": {
"command": "npx",
"args": ["-y", "@rawtree/mcp"],
"env": {
"RAWTREE_API_KEY": "rt_xxxxxxxxx"
}
}
}
}HTTP Transport
Run the server over HTTP for remote or web-based integrations. In HTTP mode, each MCP client authenticates by passing its RawTree API key as a Bearer token in the Authorization header.
Start the server:
npx -y @rawtree/mcp --http --port 3000The server listens on http://127.0.0.1:3000 and exposes the MCP endpoint at /mcp using Streamable HTTP.
Claude Code
claude mcp add rawtree --transport http http://127.0.0.1:3000/mcp --header "Authorization: Bearer rt_xxxxxxxxx"Cursor
{
"mcpServers": {
"rawtree": {
"url": "http://127.0.0.1:3000/mcp",
"headers": {
"Authorization": "Bearer rt_xxxxxxxxx"
}
}
}
}You can also set the port via the MCP_PORT environment variable:
MCP_PORT=3000 npx -y @rawtree/mcp --httpScoped Routes
Project API keys are already scoped to one project, so most users do not need these settings.
When using scoped routes, set both organization and project:
RAWTREE_API_KEY=rt_xxx \
RAWTREE_ORG=my_org \
RAWTREE_PROJECT=analytics \
npx -y @rawtree/mcpOptions
--key: RawTree project API key for stdio mode--token: Alias for--key--api-url: RawTree API URL, defaults tohttps://api.rawtree.com--url: Alias for--api-url--org: Organization name for scoped routes--organization: Alias for--org--project: Project name for scoped routes--http: Use HTTP transport instead of stdio--port: HTTP port when using--http, default3000orMCP_PORT
Environment variables:
RAWTREE_API_KEY: RawTree project API keyRAWTREE_TOKEN: Alias forRAWTREE_API_KEYRAWTREE_URL: RawTree API URLRAWTREE_ORG: Organization name for scoped routesRAWTREE_PROJECT: Project name for scoped routesMCP_PORT: HTTP port when using--http
Tools
Data
check-health— Check that the configured RawTree API endpoint is reachable.run-query— Run read-only SQL and return RawTree's JSON query response.insert-json— Insert JSON object(s) into a table, optionally with a RawTree transform.insert-from-url— Ingest data from a public URL and return RawTree's NDJSON progress stream.
Tables
list-tables— List tables in the configured project.describe-table— Inspect columns, row count, byte count, project, and organization.delete-table— Delete a table after explicit confirmation. Requires admin permission.
Logs
list-logs— Read RawTree query and insert logs. Defaults to the last hour when no time window is provided.
Structured log filters include:
{
"statuses": ["error"],
"types": ["insert"],
"tables": ["events"],
"origins": ["api"],
"hints": "any",
"limit": 50
}API Keys
list-api-keys— List API keys for the configured project.create-api-key— Create a key withadmin,read_write,write_only, orread_onlypermission.delete-api-key— Revoke a key after explicit confirmation.
Projects
get_project— Return the current project as{ "name": "...", "organization": { "name": "..." } }.
Examples
Query
{
"sql": "SELECT count() AS rows FROM events"
}Insert JSON
{
"table": "events",
"data": [
{
"event": "signup",
"user_id": "user_123",
"source": "mcp"
}
]
}Insert OTLP Traces
{
"table": "traces",
"transform": "otlp-traces",
"data": {
"resource": {
"attributes": [
{
"key": "service.name",
"value": {
"stringValue": "api"
}
}
]
},
"scopeSpans": [
{
"spans": [
{
"name": "GET /health",
"spanId": "abc"
}
]
}
]
}
}Debug Failed Inserts
{
"statuses": ["error"],
"types": ["insert"],
"startTime": "2026-05-28T09:00:00.000Z",
"endTime": "2026-05-28T10:00:00.000Z",
"limit": 25
}Local Development
Install and build:
pnpm install
pnpm buildUse the local build from an MCP client:
claude mcp add rawtree -e RAWTREE_API_KEY=rt_xxxxxxxxx -- node /absolute/path/to/rawtree-mcp/dist/index.jsLive Testing with an MCP Client
Run TypeScript in watch mode, then point a separate MCP client at the built server:
pnpm tsc --watch{
"mcpServers": {
"rawtree-dev": {
"command": "node",
"args": ["/absolute/path/to/rawtree-mcp/dist/index.js"],
"env": {
"RAWTREE_API_KEY": "rt_xxxxxxxxx"
}
}
}
}Restart the MCP client session after each rebuild.
Testing with MCP Inspector
Build first:
pnpm buildStart the inspector:
RAWTREE_API_KEY=rt_xxxxxxxxx pnpm inspectorIn the Inspector UI, choose stdio:
Command:
nodeArgs:
dist/index.jsEnvironment:
RAWTREE_API_KEY=rt_xxxxxxxxx
RawTree References
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/rawtreedb/rawtree-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server