@dashtray/mcp-server
v1.0.2
Published
Dashtray MCP Server - send notifications to your phone via MCP agents
Maintainers
Readme
Dashtray MCP Server
Model Context Protocol server for Dashtray - send notifications to your phone from AI agents, build scripts, and automation tools.
Features
- Single, focused tool:
send_notification- send alerts to your phone - No preset management: Notifications are automatically logged in history
- Auto-prefixed: All notifications prefixed with "MCP - " for clarity
- Rate-limited: Per-plan limits (Starter 100/min, Pro 1000/min)
- Secure: SHA256-hashed API keys, bearer token auth
- Lightweight: Minimal dependencies, ~30KB bundle
Installation
Option 1: From npm
npm install @dashtray/mcp-server
# or run directly:
npx @dashtray/mcp-serverSetup
1. Get Your API Key
- Open Dashtray on your phone
- Go to Settings → Integrations → API Keys
- Tap Generate New Key
- Give it a name (e.g., "Claude Desktop")
- Copy the full key (starts with
sk_test_) - Save it securely - you won't see it again
2. Set Environment Variables
Create a .env file or export in your shell:
export DASHTRAY_API_KEY="sk_test_your_key_here"
export DASHTRAY_API_ENDPOINT="https://api.dashtray.app" # Optional, uses default if omitted3. Configure Your Agent
Claude Desktop
Edit ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):
{
"mcpServers": {
"dashtray": {
"command": "npx",
"args": ["-y", "@dashtray/mcp-server"],
"env": {
"DASHTRAY_API_KEY": "sk_test_your_key_here",
"DASHTRAY_API_ENDPOINT": "https://api.dashtray.app"
}
}
}
}Then restart Claude Desktop.
Cline
In your project's .cline/config.json:
{
"mcpServers": {
"dashtray": {
"command": "npx",
"args": ["-y", "@dashtray/mcp-server"],
"env": {
"DASHTRAY_API_KEY": "sk_test_your_key_here"
}
}
}
}Custom Agents
Start the server and connect via stdio:
import { ChildProcess, spawn } from "child_process";
const server = spawn("node", ["/path/to/dashtray/packages/mcp-server/dist/index.js"], {
env: {
...process.env,
DASHTRAY_API_KEY: "sk_test_your_key_here",
},
});
// Connect to server via server.stdioUsage
Send a Notification
// The send_notification tool accepts:
{
"title": "Build Passed", // Required: notification title (max 200 chars)
"body": "Production build #42 completed in 3m 21s" // Required: details (max 500 chars)
}Examples
Build Alert:
Title: Build Failed
Body: Docker image build failed. Error: unauthorized. Check credentials.Deployment Status:
Title: Deployment Complete
Body: App v1.2.3 deployed to production. 50 instances running, health check passed.Test Results:
Title: Tests Passed
Body: All 342 tests passed. Coverage: 87%. Duration: 2m 15s.Long-Running Task:
Title: Analysis Complete
Body: Dataset processed. 1.2M records. Anomalies: 3. Report: https://...API Reference
Tool: send_notification
Description: Send a notification to your Dashtray account. Notifications appear on your phone with "MCP - " prefix and are logged in history.
Inputs:
| Field | Type | Required | Max Length | Notes |
|-------|------|----------|-----------|-------|
| title | string | Yes | 200 | Notification title. Auto-prefixed with "MCP - " |
| body | string | Yes | 500 | Notification details/body |
Outputs:
{
"success": true,
"message": "Notification sent successfully!\n\nTitle: Build Passed\nBody: ...\n\nIt will appear on your phone with the \"MCP - \" prefix..."
}Errors:
DASHTRAY_API_KEY not set- Missing environment variableInvalid input: title is required- Missing or empty titleInvalid input: body must be 500 chars or less- Body too longAPI error: 401 Unauthorized- Invalid API keyAPI error: 429 Too Many Requests- Rate limit exceededAPI error: 500 Internal Server Error- Server error
Configuration
Environment Variables
| Variable | Required | Default | Description |
|----------|----------|---------|-------------|
| DASHTRAY_API_KEY | Yes | - | API key from Dashtray app |
| DASHTRAY_API_ENDPOINT | No | https://api.dashtray.app | Dashtray API URL (self-hosted or cloud) |
API Key Format
All keys are generated with the sk_test_ prefix followed by 48 hex characters, regardless of plan.
Rate Limiting
Notifications are rate-limited per-plan:
| Plan | Limit | Window | |------|-------|--------| | Starter | 100/min | Fixed 1-minute window | | Pro | 1000/min | Fixed 1-minute window |
When rate limit is exceeded, the API returns 429 Too Many Requests.
Troubleshooting
"DASHTRAY_API_KEY environment variable is not set"
Solution: Set the environment variable in your shell or config file.
export DASHTRAY_API_KEY="sk_test_...""API error: 401 Unauthorized"
Solution: Check your API key:
- Open Dashtray app
- Go to Settings → Integrations → API Keys
- Verify the key is still active (hasn't been revoked)
- Generate a new key if needed
"API error: 429 Too Many Requests"
Solution: You've hit your rate limit for this plan. Either:
- Wait a minute and retry
- Upgrade your plan in the app
- Batch notifications together
"Failed to send notification: ECONNREFUSED"
Solution: Check that:
DASHTRAY_API_ENDPOINTis correct- The endpoint is reachable from your network
- No firewall is blocking the connection
Tool not appearing in Claude Desktop
Solution:
- Restart Claude Desktop completely
- Check
claude_desktop_config.jsonis valid JSON - Verify Node 18+ is installed (
node --version) sonpxcan fetch the server
"Invalid input: title is required"
Solution: The title must be a non-empty string:
// ❌ Wrong
send_notification({ body: "Only body" })
// ✓ Right
send_notification({ title: "Alert", body: "Details" })Development
Build
npm run buildWatch Mode
npm run watchManual Testing
export DASHTRAY_API_KEY="sk_test_..."
node dist/index.jsThen send a test request (requires MCP client like Claude Desktop).
Support
- Dashtray App Issues: Settings → Help & Support
- MCP Server Issues: [email protected]
- API Questions: See API Reference
License
MIT
Dashtray MCP Server - Minimal, focused, production-ready.
