loading…
Search for a command to run...
loading…
Enables querying, inserting, and managing unstructured data in RawTree via SQL, JSON ingestion, and log inspection through MCP clients like Claude Code, Cursor,
Enables querying, inserting, and managing unstructured data in RawTree via SQL, JSON ingestion, and log inspection through MCP clients like Claude Code, Cursor, and Claude Desktop.
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.
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 API key to read project identity from RawTree's keys endpoint, with a tables endpoint fallback for non-admin read-capable project API keys.
The server supports two transport modes: stdio (default) and HTTP.
npx add-mcp @rawtree/mcp --name rawtree --env "RAWTREE_API_KEY=rt_xxxxxxxxx"
claude mcp add rawtree -e RAWTREE_API_KEY=rt_xxxxxxxxx -- npx -y @rawtree/mcp
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"
}
}
}
}
Open Claude Desktop settings > "Developer" tab > "Edit Config".
{
"mcpServers": {
"rawtree": {
"command": "npx",
"args": ["-y", "@rawtree/mcp"],
"env": {
"RAWTREE_API_KEY": "rt_xxxxxxxxx"
}
}
}
}
Run the server over HTTP for remote or web-based integrations. In HTTP mode, each MCP client authenticates by passing its RawTree API key in the Authorization header.
Start the server:
npx -y @rawtree/mcp --http --port 3000
The server listens on http://127.0.0.1:3000 and exposes the MCP endpoint at /mcp using Streamable HTTP.
claude mcp add rawtree --transport http http://127.0.0.1:3000/mcp --header "Authorization: Bearer rt_xxxxxxxxx"
{
"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 --http
--api-key: RawTree project API key for stdio mode--http: Use HTTP transport instead of stdio--port: HTTP port when using --http, default 3000 or MCP_PORTEnvironment variables:
RAWTREE_API_KEY: RawTree project API keyMCP_PORT: HTTP port when using --httpcheck-health — Check that the 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.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.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
}
list-api-keys — List API keys for the configured project.create-api-key — Create a key with admin, read_write, write_only, or read_only permission.delete-api-key — Revoke a key after explicit confirmation.get_project — Return the current project as { "name": "...", "organization": { "name": "..." } }.{
"sql": "SELECT count() AS rows FROM events"
}
{
"table": "events",
"data": [
{
"event": "signup",
"user_id": "user_123",
"source": "mcp"
}
]
}
{
"table": "traces",
"transform": "otlp-traces",
"data": {
"resource": {
"attributes": [
{
"key": "service.name",
"value": {
"stringValue": "api"
}
}
]
},
"scopeSpans": [
{
"spans": [
{
"name": "GET /health",
"spanId": "abc"
}
]
}
]
}
}
{
"statuses": ["error"],
"types": ["insert"],
"startTime": "2026-05-28T09:00:00.000Z",
"endTime": "2026-05-28T10:00:00.000Z",
"limit": 25
}
pnpm install
pnpm build
claude mcp add rawtree -e RAWTREE_API_KEY=rt_xxxxxxxxx -- node /absolute/path/to/rawtree-mcp/dist/index.js
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.
Publishing is handled by the GitHub Actions Publish workflow.
Required repository secret:
NPM_TOKEN: npm automation token with permission to publish @rawtree/mcp.Release flow:
package.json to the new version.main.v0.2.0.The workflow verifies that the release tag matches package.json, runs lint, tests, and build, then publishes with npm provenance:
npm publish --provenance --access public
Build first:
pnpm build
Start the inspector:
RAWTREE_API_KEY=rt_xxxxxxxxx pnpm inspector
In the Inspector UI, choose stdio:
nodedist/index.jsRAWTREE_API_KEY=rt_xxxxxxxxxВыполни в терминале:
claude mcp add rawtree-mcp-server -- npx Query your database in natural language
автор: AnthropicRead-only database access with schema inspection.
автор: modelcontextprotocolInteract with Redis key-value stores.
автор: modelcontextprotocolDatabase interaction and business intelligence capabilities.
автор: modelcontextprotocolНе уверен что выбрать?
Найди свой стек за 60 секунд
Автор?
Embed-бейдж для README
Похожее
Все в категории data