reportdash-datastore-mcp 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +233 -0
- package/index.js +175 -0
- package/package.json +33 -0
package/README.md
ADDED
|
@@ -0,0 +1,233 @@
|
|
|
1
|
+
# ReportDash DataStore MCP for Claude Desktop
|
|
2
|
+
|
|
3
|
+
Connect your ReportDash DataStore sources to Claude Desktop in 5 minutes.
|
|
4
|
+
|
|
5
|
+
## Prerequisites
|
|
6
|
+
|
|
7
|
+
- **Claude Desktop** - [Download here](https://claude.ai/download)
|
|
8
|
+
- **Node.js** (v14 or higher) - [Download here](https://nodejs.org/)
|
|
9
|
+
- **ReportDash DataStore account** with API access
|
|
10
|
+
|
|
11
|
+
## Setup (5 minutes)
|
|
12
|
+
|
|
13
|
+
### Step 1: Get Your API Key
|
|
14
|
+
|
|
15
|
+
1. Open ReportDash DataStore app
|
|
16
|
+
2. Go to **Settings** ā **API Keys** (or **Integrations**)
|
|
17
|
+
3. Click **"Generate New Key"**
|
|
18
|
+
4. Copy the API key (starts with `rd_...`)
|
|
19
|
+
|
|
20
|
+
### Step 2: Configure Claude Desktop
|
|
21
|
+
|
|
22
|
+
#### On macOS:
|
|
23
|
+
```bash
|
|
24
|
+
# Open the config file
|
|
25
|
+
nano ~/Library/Application\ Support/Claude/claude_desktop_config.json
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
#### On Windows:
|
|
29
|
+
|
|
30
|
+
1. Press `Win + R`
|
|
31
|
+
2. Type: `%APPDATA%\Claude`
|
|
32
|
+
3. Open `claude_desktop_config.json` in Notepad
|
|
33
|
+
|
|
34
|
+
#### On Linux:
|
|
35
|
+
```bash
|
|
36
|
+
# Open the config file
|
|
37
|
+
nano ~/.config/Claude/claude_desktop_config.json
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
### Step 3: Add Configuration
|
|
41
|
+
|
|
42
|
+
Paste this into the config file (replace `YOUR_API_KEY_HERE` with your actual key):
|
|
43
|
+
```json
|
|
44
|
+
{
|
|
45
|
+
"mcpServers": {
|
|
46
|
+
"reportdash-datastore": {
|
|
47
|
+
"command": "npx",
|
|
48
|
+
"args": ["-y", "@reportdash/datastore-mcp"],
|
|
49
|
+
"env": {
|
|
50
|
+
"REPORTDASH_API_KEY": "YOUR_API_KEY_HERE"
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
**š” If you already have other MCP servers configured:**
|
|
58
|
+
```json
|
|
59
|
+
{
|
|
60
|
+
"mcpServers": {
|
|
61
|
+
"existing-server": {
|
|
62
|
+
"command": "...",
|
|
63
|
+
"args": ["..."]
|
|
64
|
+
},
|
|
65
|
+
"reportdash-datastore": {
|
|
66
|
+
"command": "npx",
|
|
67
|
+
"args": ["-y", "@reportdash/datastore-mcp"],
|
|
68
|
+
"env": {
|
|
69
|
+
"REPORTDASH_API_KEY": "YOUR_API_KEY_HERE"
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
### Step 4: Restart Claude Desktop
|
|
77
|
+
|
|
78
|
+
Close and reopen Claude Desktop completely.
|
|
79
|
+
|
|
80
|
+
### Step 5: Test It!
|
|
81
|
+
|
|
82
|
+
Ask Claude:
|
|
83
|
+
```
|
|
84
|
+
"List my reportdash datastore sources"
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
or
|
|
88
|
+
```
|
|
89
|
+
"Show me the tables for my Google Ads data in datastore"
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
š **Done!** Claude can now access your ReportDash DataStore.
|
|
93
|
+
|
|
94
|
+
---
|
|
95
|
+
|
|
96
|
+
## Testing Your Connection
|
|
97
|
+
|
|
98
|
+
Before configuring Claude Desktop, test your connection:
|
|
99
|
+
```bash
|
|
100
|
+
REPORTDASH_API_KEY=your_key_here npx @reportdash/datastore-mcp --test
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
You should see:
|
|
104
|
+
```
|
|
105
|
+
ā
Connection successful!
|
|
106
|
+
ā
API key is valid
|
|
107
|
+
|
|
108
|
+
š You can now use ReportDash DataStore in Claude Desktop!
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
---
|
|
112
|
+
|
|
113
|
+
## Troubleshooting
|
|
114
|
+
|
|
115
|
+
### ā "command not found: npx"
|
|
116
|
+
|
|
117
|
+
**Solution:** Install Node.js from https://nodejs.org/
|
|
118
|
+
|
|
119
|
+
After installing, verify:
|
|
120
|
+
```bash
|
|
121
|
+
node --version
|
|
122
|
+
npx --version
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
### ā "REPORTDASH_API_KEY environment variable is required"
|
|
126
|
+
|
|
127
|
+
**Solution:** Check your `claude_desktop_config.json`:
|
|
128
|
+
- Make sure `REPORTDASH_API_KEY` is spelled correctly
|
|
129
|
+
- Make sure your API key is inside quotes
|
|
130
|
+
- Make sure there are no extra spaces
|
|
131
|
+
|
|
132
|
+
### ā "API key is invalid"
|
|
133
|
+
|
|
134
|
+
**Solution:**
|
|
135
|
+
1. Generate a new API key in ReportDash DataStore app
|
|
136
|
+
2. Update your `claude_desktop_config.json` with the new key
|
|
137
|
+
3. Restart Claude Desktop
|
|
138
|
+
|
|
139
|
+
### ā Claude says "I don't have access to reportdash datastore"
|
|
140
|
+
|
|
141
|
+
**Solution:**
|
|
142
|
+
1. Verify your config file is saved correctly
|
|
143
|
+
2. Make sure you restarted Claude Desktop completely (not just the window)
|
|
144
|
+
3. Check Claude Desktop logs:
|
|
145
|
+
- **Mac:** `~/Library/Logs/Claude/`
|
|
146
|
+
- **Windows:** `%APPDATA%\Claude\logs\`
|
|
147
|
+
|
|
148
|
+
### ā Connection timeout
|
|
149
|
+
|
|
150
|
+
**Solution:**
|
|
151
|
+
- Check your internet connection
|
|
152
|
+
- If using a custom API URL, verify it's correct
|
|
153
|
+
- Check if your firewall is blocking Node.js
|
|
154
|
+
|
|
155
|
+
---
|
|
156
|
+
|
|
157
|
+
## Advanced Configuration
|
|
158
|
+
|
|
159
|
+
### Custom API URL (for self-hosted deployments)
|
|
160
|
+
```json
|
|
161
|
+
{
|
|
162
|
+
"mcpServers": {
|
|
163
|
+
"reportdash-datastore": {
|
|
164
|
+
"command": "npx",
|
|
165
|
+
"args": ["-y", "@reportdash/datastore-mcp"],
|
|
166
|
+
"env": {
|
|
167
|
+
"REPORTDASH_API_KEY": "your_key_here",
|
|
168
|
+
"REPORTDASH_API_URL": "https://your-domain.com/api/mcp/v1"
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
### Development/Staging Environment
|
|
176
|
+
```json
|
|
177
|
+
{
|
|
178
|
+
"mcpServers": {
|
|
179
|
+
"reportdash-datastore-staging": {
|
|
180
|
+
"command": "npx",
|
|
181
|
+
"args": ["-y", "@reportdash/datastore-mcp"],
|
|
182
|
+
"env": {
|
|
183
|
+
"REPORTDASH_API_KEY": "staging_key_here",
|
|
184
|
+
"REPORTDASH_API_URL": "https://staging-api.reportdash.com/api/mcp/v1"
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
---
|
|
192
|
+
|
|
193
|
+
## What You Can Do
|
|
194
|
+
|
|
195
|
+
Once connected, you can ask Claude to:
|
|
196
|
+
|
|
197
|
+
- **List sources:** "Show me all my connected data sources in datastore"
|
|
198
|
+
- **Query data:** "Get my Google Ads clicks from datastore for the last 7 days"
|
|
199
|
+
- **Analyze trends:** "Compare this month's performance to last month using datastore"
|
|
200
|
+
- **Create visualizations:** "Create a chart of my campaign performance from datastore"
|
|
201
|
+
- **Generate reports:** "Create a weekly summary of all my marketing channels"
|
|
202
|
+
|
|
203
|
+
---
|
|
204
|
+
|
|
205
|
+
## Support
|
|
206
|
+
|
|
207
|
+
- š§ **Email:** support@reportdash.com
|
|
208
|
+
- š **Documentation:** https://docs.reportdash.com
|
|
209
|
+
- š¬ **Community:** https://community.reportdash.com
|
|
210
|
+
- š **Report Issues:** https://github.com/reportdash/datastore-mcp/issues
|
|
211
|
+
|
|
212
|
+
---
|
|
213
|
+
|
|
214
|
+
## Privacy & Security
|
|
215
|
+
|
|
216
|
+
- Your API key is stored locally on your computer
|
|
217
|
+
- The MCP server runs locally and only forwards requests to ReportDash DataStore API
|
|
218
|
+
- No data is stored or logged by the MCP server
|
|
219
|
+
- All communication uses HTTPS encryption
|
|
220
|
+
|
|
221
|
+
---
|
|
222
|
+
|
|
223
|
+
## Uninstalling
|
|
224
|
+
|
|
225
|
+
1. Remove the `reportdash-datastore` section from `claude_desktop_config.json`
|
|
226
|
+
2. Restart Claude Desktop
|
|
227
|
+
3. (Optional) Revoke your API key in ReportDash DataStore app settings
|
|
228
|
+
|
|
229
|
+
---
|
|
230
|
+
|
|
231
|
+
## License
|
|
232
|
+
|
|
233
|
+
MIT License - see LICENSE file for details
|
package/index.js
ADDED
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
const https = require('https');
|
|
4
|
+
const http = require('http');
|
|
5
|
+
const readline = require('readline');
|
|
6
|
+
const { URL } = require('url');
|
|
7
|
+
|
|
8
|
+
// Configuration
|
|
9
|
+
const API_KEY = process.env.REPORTDASH_API_KEY;
|
|
10
|
+
const API_URL = process.env.REPORTDASH_API_URL || 'https://datastore.reportdash.com/api/mcp/v1';
|
|
11
|
+
|
|
12
|
+
// Validate configuration
|
|
13
|
+
if (!API_KEY) {
|
|
14
|
+
console.error(JSON.stringify({
|
|
15
|
+
jsonrpc: '2.0',
|
|
16
|
+
error: {
|
|
17
|
+
code: -32600,
|
|
18
|
+
message: 'REPORTDASH_API_KEY environment variable is required. Get your API key from ReportDash DataStore app settings.'
|
|
19
|
+
}
|
|
20
|
+
}));
|
|
21
|
+
process.exit(1);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
// Test mode
|
|
25
|
+
if (process.argv.includes('--test')) {
|
|
26
|
+
testConnection();
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
// MCP Server: Read from stdin, forward to API, write to stdout
|
|
31
|
+
const rl = readline.createInterface({
|
|
32
|
+
input: process.stdin,
|
|
33
|
+
output: process.stdout,
|
|
34
|
+
terminal: false
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
rl.on('line', (line) => {
|
|
38
|
+
if (!line.trim()) return;
|
|
39
|
+
|
|
40
|
+
try {
|
|
41
|
+
const mcpRequest = JSON.parse(line);
|
|
42
|
+
forwardToAPI(mcpRequest);
|
|
43
|
+
} catch (error) {
|
|
44
|
+
console.error(JSON.stringify({
|
|
45
|
+
jsonrpc: '2.0',
|
|
46
|
+
error: {
|
|
47
|
+
code: -32700,
|
|
48
|
+
message: 'Parse error: ' + error.message
|
|
49
|
+
},
|
|
50
|
+
id: null
|
|
51
|
+
}));
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
function forwardToAPI(mcpRequest) {
|
|
56
|
+
const url = new URL(API_URL);
|
|
57
|
+
const isHttps = url.protocol === 'https:';
|
|
58
|
+
const client = isHttps ? https : http;
|
|
59
|
+
|
|
60
|
+
const options = {
|
|
61
|
+
hostname: url.hostname,
|
|
62
|
+
port: url.port || (isHttps ? 443 : 80),
|
|
63
|
+
path: url.pathname,
|
|
64
|
+
method: 'POST',
|
|
65
|
+
headers: {
|
|
66
|
+
'Content-Type': 'application/json',
|
|
67
|
+
'X-Api-Key': API_KEY,
|
|
68
|
+
'User-Agent': 'ReportDash-DataStore-MCP/1.0'
|
|
69
|
+
},
|
|
70
|
+
timeout: 30000 // 30 second timeout
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
const req = client.request(options, (res) => {
|
|
74
|
+
let data = '';
|
|
75
|
+
|
|
76
|
+
res.on('data', (chunk) => {
|
|
77
|
+
data += chunk;
|
|
78
|
+
});
|
|
79
|
+
|
|
80
|
+
res.on('end', () => {
|
|
81
|
+
if (res.statusCode === 200) {
|
|
82
|
+
console.log(data);
|
|
83
|
+
} else {
|
|
84
|
+
console.error(JSON.stringify({
|
|
85
|
+
jsonrpc: '2.0',
|
|
86
|
+
error: {
|
|
87
|
+
code: res.statusCode,
|
|
88
|
+
message: `API error: ${res.statusCode} - ${data}`,
|
|
89
|
+
data: { statusCode: res.statusCode, body: data }
|
|
90
|
+
},
|
|
91
|
+
id: mcpRequest.id || null
|
|
92
|
+
}));
|
|
93
|
+
}
|
|
94
|
+
});
|
|
95
|
+
});
|
|
96
|
+
|
|
97
|
+
req.on('error', (error) => {
|
|
98
|
+
console.error(JSON.stringify({
|
|
99
|
+
jsonrpc: '2.0',
|
|
100
|
+
error: {
|
|
101
|
+
code: -32603,
|
|
102
|
+
message: 'Network error: ' + error.message,
|
|
103
|
+
data: { error: error.message }
|
|
104
|
+
},
|
|
105
|
+
id: mcpRequest.id || null
|
|
106
|
+
}));
|
|
107
|
+
});
|
|
108
|
+
|
|
109
|
+
req.on('timeout', () => {
|
|
110
|
+
req.destroy();
|
|
111
|
+
console.error(JSON.stringify({
|
|
112
|
+
jsonrpc: '2.0',
|
|
113
|
+
error: {
|
|
114
|
+
code: -32603,
|
|
115
|
+
message: 'Request timeout after 30 seconds'
|
|
116
|
+
},
|
|
117
|
+
id: mcpRequest.id || null
|
|
118
|
+
}));
|
|
119
|
+
});
|
|
120
|
+
|
|
121
|
+
req.write(JSON.stringify(mcpRequest));
|
|
122
|
+
req.end();
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
function testConnection() {
|
|
126
|
+
console.log('š Testing ReportDash DataStore connection...\n');
|
|
127
|
+
console.log(`API URL: ${API_URL}`);
|
|
128
|
+
console.log(`API Key: ${API_KEY.substring(0, 10)}...${API_KEY.substring(API_KEY.length - 4)}\n`);
|
|
129
|
+
|
|
130
|
+
const url = new URL(API_URL.replace('/mcp/v1', '/health'));
|
|
131
|
+
const isHttps = url.protocol === 'https:';
|
|
132
|
+
const client = isHttps ? https : http;
|
|
133
|
+
|
|
134
|
+
const options = {
|
|
135
|
+
hostname: url.hostname,
|
|
136
|
+
port: url.port || (isHttps ? 443 : 80),
|
|
137
|
+
path: url.pathname,
|
|
138
|
+
method: 'GET',
|
|
139
|
+
headers: {
|
|
140
|
+
'X-Api-Key': API_KEY
|
|
141
|
+
},
|
|
142
|
+
timeout: 10000
|
|
143
|
+
};
|
|
144
|
+
|
|
145
|
+
const req = client.request(options, (res) => {
|
|
146
|
+
let data = '';
|
|
147
|
+
res.on('data', (chunk) => { data += chunk; });
|
|
148
|
+
res.on('end', () => {
|
|
149
|
+
if (res.statusCode === 200) {
|
|
150
|
+
console.log('ā
Connection successful!');
|
|
151
|
+
console.log('ā
API key is valid');
|
|
152
|
+
console.log('\nš You can now use ReportDash DataStore in Claude Desktop!');
|
|
153
|
+
console.log('\nTry asking Claude: "list my reportdash datastore sources"');
|
|
154
|
+
} else {
|
|
155
|
+
console.log('ā Connection failed');
|
|
156
|
+
console.log(`Status: ${res.statusCode}`);
|
|
157
|
+
console.log(`Response: ${data}`);
|
|
158
|
+
console.log('\nš” Check your API key in ReportDash DataStore app settings');
|
|
159
|
+
}
|
|
160
|
+
});
|
|
161
|
+
});
|
|
162
|
+
|
|
163
|
+
req.on('error', (error) => {
|
|
164
|
+
console.log('ā Connection error:', error.message);
|
|
165
|
+
console.log('\nš” Check your internet connection and API URL');
|
|
166
|
+
});
|
|
167
|
+
|
|
168
|
+
req.on('timeout', () => {
|
|
169
|
+
req.destroy();
|
|
170
|
+
console.log('ā Connection timeout');
|
|
171
|
+
console.log('\nš” Check your internet connection');
|
|
172
|
+
});
|
|
173
|
+
|
|
174
|
+
req.end();
|
|
175
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "reportdash-datastore-mcp",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "ReportDash DataStore MCP server for Claude Desktop",
|
|
5
|
+
"main": "index.js",
|
|
6
|
+
"bin": {
|
|
7
|
+
"reportdash-datastore-mcp": "./index.js"
|
|
8
|
+
},
|
|
9
|
+
"scripts": {
|
|
10
|
+
"test": "node index.js --test"
|
|
11
|
+
},
|
|
12
|
+
"keywords": [
|
|
13
|
+
"mcp",
|
|
14
|
+
"claude",
|
|
15
|
+
"reportdash",
|
|
16
|
+
"datastore",
|
|
17
|
+
"analytics",
|
|
18
|
+
"reporting"
|
|
19
|
+
],
|
|
20
|
+
"author": "ReportDash",
|
|
21
|
+
"license": "MIT",
|
|
22
|
+
"engines": {
|
|
23
|
+
"node": ">=14.0.0"
|
|
24
|
+
},
|
|
25
|
+
"repository": {
|
|
26
|
+
"type": "git",
|
|
27
|
+
"url": "git+https://github.com/reportdash/datastore-mcp-claude-desktop.git"
|
|
28
|
+
},
|
|
29
|
+
"homepage": "https://reportdash.com",
|
|
30
|
+
"bugs": {
|
|
31
|
+
"url": "https://github.com/reportdash/datastore-mcp-claude-desktop/issues"
|
|
32
|
+
}
|
|
33
|
+
}
|