dump-mcp 0.1.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 +162 -0
- package/dist/api-client.d.ts +66 -0
- package/dist/api-client.d.ts.map +1 -0
- package/dist/api-client.js +160 -0
- package/dist/api-client.js.map +1 -0
- package/dist/index.d.ts +13 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +24 -0
- package/dist/index.js.map +1 -0
- package/dist/server.d.ts +10 -0
- package/dist/server.d.ts.map +1 -0
- package/dist/server.js +96 -0
- package/dist/server.js.map +1 -0
- package/dist/tools/endpoints.d.ts +14 -0
- package/dist/tools/endpoints.d.ts.map +1 -0
- package/dist/tools/endpoints.js +195 -0
- package/dist/tools/endpoints.js.map +1 -0
- package/dist/tools/index.d.ts +7 -0
- package/dist/tools/index.d.ts.map +1 -0
- package/dist/tools/index.js +7 -0
- package/dist/tools/index.js.map +1 -0
- package/dist/tools/replay.d.ts +14 -0
- package/dist/tools/replay.d.ts.map +1 -0
- package/dist/tools/replay.js +169 -0
- package/dist/tools/replay.js.map +1 -0
- package/dist/tools/requests.d.ts +14 -0
- package/dist/tools/requests.d.ts.map +1 -0
- package/dist/tools/requests.js +157 -0
- package/dist/tools/requests.js.map +1 -0
- package/dist/types.d.ts +113 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +15 -0
- package/dist/types.js.map +1 -0
- package/package.json +53 -0
package/README.md
ADDED
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
# dump-mcp
|
|
2
|
+
|
|
3
|
+
[](https://www.npmjs.com/package/dump-mcp)
|
|
4
|
+
|
|
5
|
+
MCP (Model Context Protocol) server for [dump.xoozoo.com](https://dump.xoozoo.com) - a webhook capture and inspection service.
|
|
6
|
+
|
|
7
|
+
This server allows AI assistants like Claude to create webhook endpoints, view captured requests, and replay them to local development servers.
|
|
8
|
+
|
|
9
|
+
## Features
|
|
10
|
+
|
|
11
|
+
- **Endpoint Management**: Create, list, and delete webhook capture endpoints
|
|
12
|
+
- **Request Viewing**: List and inspect captured webhook requests with full headers and body
|
|
13
|
+
- **Request Replay**: Replay captured requests to target URLs with optional modifications
|
|
14
|
+
|
|
15
|
+
## Installation
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
npm install -g dump-mcp
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
Or use directly with npx (no install needed):
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
npx dump-mcp
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Configuration
|
|
28
|
+
|
|
29
|
+
### 1. Create an Agent Token
|
|
30
|
+
|
|
31
|
+
1. Log in to [dump.xoozoo.com](https://dump.xoozoo.com)
|
|
32
|
+
2. Click your avatar → **Agent Tokens**
|
|
33
|
+
3. Create a new token and copy it (you'll only see it once)
|
|
34
|
+
|
|
35
|
+
### 2. Configure Your MCP Client
|
|
36
|
+
|
|
37
|
+
#### Claude Desktop
|
|
38
|
+
|
|
39
|
+
Add to your Claude Desktop config file:
|
|
40
|
+
|
|
41
|
+
**Windows**: `%APPDATA%\Claude\claude_desktop_config.json`
|
|
42
|
+
**macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`
|
|
43
|
+
|
|
44
|
+
```json
|
|
45
|
+
{
|
|
46
|
+
"mcpServers": {
|
|
47
|
+
"dump": {
|
|
48
|
+
"command": "npx",
|
|
49
|
+
"args": ["-y", "dump-mcp"],
|
|
50
|
+
"env": {
|
|
51
|
+
"DUMP_API_TOKEN": "dmp_your_token_here"
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
Or if installed globally:
|
|
59
|
+
|
|
60
|
+
```json
|
|
61
|
+
{
|
|
62
|
+
"mcpServers": {
|
|
63
|
+
"dump": {
|
|
64
|
+
"command": "dump-mcp",
|
|
65
|
+
"env": {
|
|
66
|
+
"DUMP_API_TOKEN": "dmp_your_token_here"
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
#### Environment Variables
|
|
74
|
+
|
|
75
|
+
| Variable | Required | Description |
|
|
76
|
+
|----------|----------|-------------|
|
|
77
|
+
| `DUMP_API_TOKEN` | Yes | Your agent token from dump.xoozoo.com |
|
|
78
|
+
| `DUMP_API_URL` | No | API URL (default: `https://dump.xoozoo.com`) |
|
|
79
|
+
|
|
80
|
+
## Available Tools
|
|
81
|
+
|
|
82
|
+
### Endpoint Management
|
|
83
|
+
|
|
84
|
+
| Tool | Description |
|
|
85
|
+
|------|-------------|
|
|
86
|
+
| `dump_list_teams` | List your teams |
|
|
87
|
+
| `dump_list_endpoints` | List endpoints in a team |
|
|
88
|
+
| `dump_create_endpoint` | Create a new webhook capture endpoint |
|
|
89
|
+
| `dump_get_endpoint` | Get endpoint details and capture URL |
|
|
90
|
+
| `dump_delete_endpoint` | Delete an endpoint |
|
|
91
|
+
|
|
92
|
+
### Request Viewing
|
|
93
|
+
|
|
94
|
+
| Tool | Description |
|
|
95
|
+
|------|-------------|
|
|
96
|
+
| `dump_list_requests` | List captured requests (with filtering) |
|
|
97
|
+
| `dump_get_request` | Get full request details (headers, body) |
|
|
98
|
+
|
|
99
|
+
### Request Replay
|
|
100
|
+
|
|
101
|
+
| Tool | Description |
|
|
102
|
+
|------|-------------|
|
|
103
|
+
| `dump_replay_request` | Replay a request to a target URL |
|
|
104
|
+
| `dump_get_replay_result` | Get the replay response |
|
|
105
|
+
| `dump_list_replays` | List recent replays |
|
|
106
|
+
|
|
107
|
+
## Usage Examples
|
|
108
|
+
|
|
109
|
+
### Create a Webhook Endpoint
|
|
110
|
+
|
|
111
|
+
> "Create a new webhook endpoint called github-hooks in my team"
|
|
112
|
+
|
|
113
|
+
The assistant will:
|
|
114
|
+
1. List your teams to find the team ID
|
|
115
|
+
2. Create the endpoint
|
|
116
|
+
3. Return the capture URL to configure in GitHub
|
|
117
|
+
|
|
118
|
+
### View Captured Requests
|
|
119
|
+
|
|
120
|
+
> "Show me the last 5 requests to my github-hooks endpoint"
|
|
121
|
+
|
|
122
|
+
The assistant will list recent requests with method, path, and timestamp.
|
|
123
|
+
|
|
124
|
+
### Inspect a Request
|
|
125
|
+
|
|
126
|
+
> "Show me the full details of that POST request"
|
|
127
|
+
|
|
128
|
+
The assistant will show headers, body, and other details.
|
|
129
|
+
|
|
130
|
+
### Replay to Local Server
|
|
131
|
+
|
|
132
|
+
> "Replay that webhook to http://localhost:3000/webhook"
|
|
133
|
+
|
|
134
|
+
The assistant will replay the captured request to your local development server and show the response.
|
|
135
|
+
|
|
136
|
+
## Development
|
|
137
|
+
|
|
138
|
+
```bash
|
|
139
|
+
# Clone the repo
|
|
140
|
+
git clone https://github.com/xoozoo/dump.git
|
|
141
|
+
cd dump/dump-mcp
|
|
142
|
+
|
|
143
|
+
# Install dependencies
|
|
144
|
+
npm install
|
|
145
|
+
|
|
146
|
+
# Build
|
|
147
|
+
npm run build
|
|
148
|
+
|
|
149
|
+
# Run locally
|
|
150
|
+
DUMP_API_TOKEN=dmp_xxx node dist/index.js
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
## Security
|
|
154
|
+
|
|
155
|
+
- Agent tokens have full access to your account's endpoints and requests
|
|
156
|
+
- Tokens are hashed before storage; the raw token is only shown once
|
|
157
|
+
- Revoke tokens immediately if compromised
|
|
158
|
+
- Use separate tokens for different environments
|
|
159
|
+
|
|
160
|
+
## License
|
|
161
|
+
|
|
162
|
+
MIT
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* HTTP client for communicating with the dump API
|
|
3
|
+
*/
|
|
4
|
+
import { PaginatedResponse, Team, Endpoint, CreateEndpointParams, CapturedRequest, RequestDetails, ListRequestsParams, Replay, ReplayRequestParams, TokenValidationResponse } from './types.js';
|
|
5
|
+
export declare class DumpApiClient {
|
|
6
|
+
private baseUrl;
|
|
7
|
+
private token;
|
|
8
|
+
constructor(baseUrl: string, token: string);
|
|
9
|
+
/**
|
|
10
|
+
* Make an authenticated request to the API
|
|
11
|
+
*/
|
|
12
|
+
private request;
|
|
13
|
+
/**
|
|
14
|
+
* Validate the token and get user info
|
|
15
|
+
*/
|
|
16
|
+
validateToken(): Promise<TokenValidationResponse>;
|
|
17
|
+
/**
|
|
18
|
+
* List all teams the user has access to
|
|
19
|
+
*/
|
|
20
|
+
listTeams(): Promise<Team[]>;
|
|
21
|
+
/**
|
|
22
|
+
* Get a specific team
|
|
23
|
+
*/
|
|
24
|
+
getTeam(teamId: string): Promise<Team>;
|
|
25
|
+
/**
|
|
26
|
+
* List endpoints in a team
|
|
27
|
+
*/
|
|
28
|
+
listEndpoints(teamId: string): Promise<Endpoint[]>;
|
|
29
|
+
/**
|
|
30
|
+
* Create a new endpoint
|
|
31
|
+
*/
|
|
32
|
+
createEndpoint(teamId: string, params: CreateEndpointParams): Promise<Endpoint>;
|
|
33
|
+
/**
|
|
34
|
+
* Get endpoint details
|
|
35
|
+
*/
|
|
36
|
+
getEndpoint(teamId: string, endpointId: string): Promise<Endpoint>;
|
|
37
|
+
/**
|
|
38
|
+
* Delete an endpoint
|
|
39
|
+
*/
|
|
40
|
+
deleteEndpoint(teamId: string, endpointId: string): Promise<void>;
|
|
41
|
+
/**
|
|
42
|
+
* List captured requests for an endpoint
|
|
43
|
+
*/
|
|
44
|
+
listRequests(teamId: string, endpointId: string, params?: ListRequestsParams): Promise<PaginatedResponse<CapturedRequest>>;
|
|
45
|
+
/**
|
|
46
|
+
* Get a specific request's details
|
|
47
|
+
*/
|
|
48
|
+
getRequest(teamId: string, endpointId: string, requestId: string): Promise<RequestDetails>;
|
|
49
|
+
/**
|
|
50
|
+
* Get a request's full payload/body
|
|
51
|
+
*/
|
|
52
|
+
getRequestPayload(teamId: string, endpointId: string, requestId: string): Promise<string>;
|
|
53
|
+
/**
|
|
54
|
+
* Replay a captured request to a target URL
|
|
55
|
+
*/
|
|
56
|
+
replayRequest(teamId: string, endpointId: string, requestId: string, params: ReplayRequestParams): Promise<Replay>;
|
|
57
|
+
/**
|
|
58
|
+
* List replays for a team
|
|
59
|
+
*/
|
|
60
|
+
listReplays(teamId: string): Promise<Replay[]>;
|
|
61
|
+
/**
|
|
62
|
+
* Get a specific replay's details
|
|
63
|
+
*/
|
|
64
|
+
getReplay(teamId: string, replayId: string): Promise<Replay>;
|
|
65
|
+
}
|
|
66
|
+
//# sourceMappingURL=api-client.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api-client.d.ts","sourceRoot":"","sources":["../src/api-client.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAEL,iBAAiB,EACjB,IAAI,EACJ,QAAQ,EACR,oBAAoB,EACpB,eAAe,EACf,cAAc,EACd,kBAAkB,EAClB,MAAM,EACN,mBAAmB,EACnB,uBAAuB,EAExB,MAAM,YAAY,CAAC;AAEpB,qBAAa,aAAa;IACxB,OAAO,CAAC,OAAO,CAAS;IACxB,OAAO,CAAC,KAAK,CAAS;gBAEV,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM;IAM1C;;OAEG;YACW,OAAO;IAoCrB;;OAEG;IACG,aAAa,IAAI,OAAO,CAAC,uBAAuB,CAAC;IA2BvD;;OAEG;IACG,SAAS,IAAI,OAAO,CAAC,IAAI,EAAE,CAAC;IAKlC;;OAEG;IACG,OAAO,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAO5C;;OAEG;IACG,aAAa,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,QAAQ,EAAE,CAAC;IAQxD;;OAEG;IACG,cAAc,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,oBAAoB,GAAG,OAAO,CAAC,QAAQ,CAAC;IASrF;;OAEG;IACG,WAAW,CAAC,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,QAAQ,CAAC;IAQxE;;OAEG;IACG,cAAc,CAAC,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAMvE;;OAEG;IACG,YAAY,CAChB,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,MAAM,EAClB,MAAM,GAAE,kBAAuB,GAC9B,OAAO,CAAC,iBAAiB,CAAC,eAAe,CAAC,CAAC;IAe9C;;OAEG;IACG,UAAU,CACd,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,MAAM,EAClB,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC,cAAc,CAAC;IAQ1B;;OAEG;IACG,iBAAiB,CACrB,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,MAAM,EAClB,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC,MAAM,CAAC;IAUlB;;OAEG;IACG,aAAa,CACjB,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,MAAM,EAClB,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,mBAAmB,GAC1B,OAAO,CAAC,MAAM,CAAC;IASlB;;OAEG;IACG,WAAW,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;IAQpD;;OAEG;IACG,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;CAOnE"}
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* HTTP client for communicating with the dump API
|
|
3
|
+
*/
|
|
4
|
+
import { DumpApiError, } from './types.js';
|
|
5
|
+
export class DumpApiClient {
|
|
6
|
+
baseUrl;
|
|
7
|
+
token;
|
|
8
|
+
constructor(baseUrl, token) {
|
|
9
|
+
// Remove trailing slash if present
|
|
10
|
+
this.baseUrl = baseUrl.replace(/\/$/, '');
|
|
11
|
+
this.token = token;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Make an authenticated request to the API
|
|
15
|
+
*/
|
|
16
|
+
async request(method, path, body) {
|
|
17
|
+
const url = `${this.baseUrl}${path}`;
|
|
18
|
+
const headers = {
|
|
19
|
+
'Authorization': `Bearer ${this.token}`,
|
|
20
|
+
'Content-Type': 'application/json',
|
|
21
|
+
'Accept': 'application/json',
|
|
22
|
+
};
|
|
23
|
+
const options = {
|
|
24
|
+
method,
|
|
25
|
+
headers,
|
|
26
|
+
};
|
|
27
|
+
if (body !== undefined) {
|
|
28
|
+
options.body = JSON.stringify(body);
|
|
29
|
+
}
|
|
30
|
+
const response = await fetch(url, options);
|
|
31
|
+
const data = await response.json();
|
|
32
|
+
if (!response.ok || data.error) {
|
|
33
|
+
throw new DumpApiError(data.message || `HTTP ${response.status}`, response.status, data.code);
|
|
34
|
+
}
|
|
35
|
+
// Return the data field if present, otherwise return the whole response
|
|
36
|
+
return (data.data ?? data);
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Validate the token and get user info
|
|
40
|
+
*/
|
|
41
|
+
async validateToken() {
|
|
42
|
+
// This endpoint doesn't use auth header, it validates the token in body
|
|
43
|
+
const url = `${this.baseUrl}/api/agent/validate`;
|
|
44
|
+
const response = await fetch(url, {
|
|
45
|
+
method: 'POST',
|
|
46
|
+
headers: {
|
|
47
|
+
'Content-Type': 'application/json',
|
|
48
|
+
'Accept': 'application/json',
|
|
49
|
+
},
|
|
50
|
+
body: JSON.stringify({ token: this.token }),
|
|
51
|
+
});
|
|
52
|
+
const data = await response.json();
|
|
53
|
+
if (!response.ok || data.error) {
|
|
54
|
+
throw new DumpApiError(data.message || 'Invalid token', response.status, data.code);
|
|
55
|
+
}
|
|
56
|
+
return data.data;
|
|
57
|
+
}
|
|
58
|
+
// ============ Team Methods ============
|
|
59
|
+
/**
|
|
60
|
+
* List all teams the user has access to
|
|
61
|
+
*/
|
|
62
|
+
async listTeams() {
|
|
63
|
+
const result = await this.request('GET', '/api/v1/teams');
|
|
64
|
+
return result.teams;
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Get a specific team
|
|
68
|
+
*/
|
|
69
|
+
async getTeam(teamId) {
|
|
70
|
+
const result = await this.request('GET', `/api/v1/teams/${teamId}`);
|
|
71
|
+
return result.team;
|
|
72
|
+
}
|
|
73
|
+
// ============ Endpoint Methods ============
|
|
74
|
+
/**
|
|
75
|
+
* List endpoints in a team
|
|
76
|
+
*/
|
|
77
|
+
async listEndpoints(teamId) {
|
|
78
|
+
const result = await this.request('GET', `/api/v1/teams/${teamId}/endpoints`);
|
|
79
|
+
return result.endpoints;
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Create a new endpoint
|
|
83
|
+
*/
|
|
84
|
+
async createEndpoint(teamId, params) {
|
|
85
|
+
const result = await this.request('POST', `/api/v1/teams/${teamId}/endpoints`, params);
|
|
86
|
+
return result.endpoint;
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* Get endpoint details
|
|
90
|
+
*/
|
|
91
|
+
async getEndpoint(teamId, endpointId) {
|
|
92
|
+
const result = await this.request('GET', `/api/v1/teams/${teamId}/endpoints/${endpointId}`);
|
|
93
|
+
return result.endpoint;
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* Delete an endpoint
|
|
97
|
+
*/
|
|
98
|
+
async deleteEndpoint(teamId, endpointId) {
|
|
99
|
+
await this.request('DELETE', `/api/v1/teams/${teamId}/endpoints/${endpointId}`);
|
|
100
|
+
}
|
|
101
|
+
// ============ Request Methods ============
|
|
102
|
+
/**
|
|
103
|
+
* List captured requests for an endpoint
|
|
104
|
+
*/
|
|
105
|
+
async listRequests(teamId, endpointId, params = {}) {
|
|
106
|
+
const queryParams = new URLSearchParams();
|
|
107
|
+
if (params.page)
|
|
108
|
+
queryParams.set('page', params.page.toString());
|
|
109
|
+
if (params.per_page)
|
|
110
|
+
queryParams.set('per_page', params.per_page.toString());
|
|
111
|
+
if (params.method)
|
|
112
|
+
queryParams.set('method', params.method);
|
|
113
|
+
if (params.search)
|
|
114
|
+
queryParams.set('search', params.search);
|
|
115
|
+
if (params.since)
|
|
116
|
+
queryParams.set('since', params.since);
|
|
117
|
+
if (params.until)
|
|
118
|
+
queryParams.set('until', params.until);
|
|
119
|
+
const queryString = queryParams.toString();
|
|
120
|
+
const path = `/api/v1/teams/${teamId}/endpoints/${endpointId}/requests${queryString ? `?${queryString}` : ''}`;
|
|
121
|
+
return this.request('GET', path);
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* Get a specific request's details
|
|
125
|
+
*/
|
|
126
|
+
async getRequest(teamId, endpointId, requestId) {
|
|
127
|
+
const result = await this.request('GET', `/api/v1/teams/${teamId}/endpoints/${endpointId}/requests/${requestId}`);
|
|
128
|
+
return result.request;
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* Get a request's full payload/body
|
|
132
|
+
*/
|
|
133
|
+
async getRequestPayload(teamId, endpointId, requestId) {
|
|
134
|
+
const result = await this.request('GET', `/api/v1/teams/${teamId}/endpoints/${endpointId}/requests/${requestId}/payload`);
|
|
135
|
+
return result.payload;
|
|
136
|
+
}
|
|
137
|
+
// ============ Replay Methods ============
|
|
138
|
+
/**
|
|
139
|
+
* Replay a captured request to a target URL
|
|
140
|
+
*/
|
|
141
|
+
async replayRequest(teamId, endpointId, requestId, params) {
|
|
142
|
+
const result = await this.request('POST', `/api/v1/teams/${teamId}/endpoints/${endpointId}/requests/${requestId}/replay`, params);
|
|
143
|
+
return result.replay;
|
|
144
|
+
}
|
|
145
|
+
/**
|
|
146
|
+
* List replays for a team
|
|
147
|
+
*/
|
|
148
|
+
async listReplays(teamId) {
|
|
149
|
+
const result = await this.request('GET', `/api/v1/teams/${teamId}/replays`);
|
|
150
|
+
return result.replays;
|
|
151
|
+
}
|
|
152
|
+
/**
|
|
153
|
+
* Get a specific replay's details
|
|
154
|
+
*/
|
|
155
|
+
async getReplay(teamId, replayId) {
|
|
156
|
+
const result = await this.request('GET', `/api/v1/teams/${teamId}/replays/${replayId}`);
|
|
157
|
+
return result.replay;
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
//# sourceMappingURL=api-client.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api-client.js","sourceRoot":"","sources":["../src/api-client.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAYL,YAAY,GACb,MAAM,YAAY,CAAC;AAEpB,MAAM,OAAO,aAAa;IAChB,OAAO,CAAS;IAChB,KAAK,CAAS;IAEtB,YAAY,OAAe,EAAE,KAAa;QACxC,mCAAmC;QACnC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;QAC1C,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACrB,CAAC;IAED;;OAEG;IACK,KAAK,CAAC,OAAO,CACnB,MAAc,EACd,IAAY,EACZ,IAAc;QAEd,MAAM,GAAG,GAAG,GAAG,IAAI,CAAC,OAAO,GAAG,IAAI,EAAE,CAAC;QACrC,MAAM,OAAO,GAA2B;YACtC,eAAe,EAAE,UAAU,IAAI,CAAC,KAAK,EAAE;YACvC,cAAc,EAAE,kBAAkB;YAClC,QAAQ,EAAE,kBAAkB;SAC7B,CAAC;QAEF,MAAM,OAAO,GAAgB;YAC3B,MAAM;YACN,OAAO;SACR,CAAC;QAEF,IAAI,IAAI,KAAK,SAAS,EAAE,CAAC;YACvB,OAAO,CAAC,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;QACtC,CAAC;QAED,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;QAC3C,MAAM,IAAI,GAAG,MAAM,QAAQ,CAAC,IAAI,EAAoB,CAAC;QAErD,IAAI,CAAC,QAAQ,CAAC,EAAE,IAAI,IAAI,CAAC,KAAK,EAAE,CAAC;YAC/B,MAAM,IAAI,YAAY,CACpB,IAAI,CAAC,OAAO,IAAI,Q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jB,MAAc,EACd,UAAkB,EAClB,SAAiB,EACjB,MAA2B;QAE3B,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,OAAO,CAC/B,MAAM,EACN,iBAAiB,MAAM,cAAc,UAAU,aAAa,SAAS,SAAS,EAC9E,MAAM,CACP,CAAC;QACF,OAAO,MAAM,CAAC,MAAM,CAAC;IACvB,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,WAAW,CAAC,MAAc;QAC9B,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,OAAO,CAC/B,KAAK,EACL,iBAAiB,MAAM,UAAU,CAClC,CAAC;QACF,OAAO,MAAM,CAAC,OAAO,CAAC;IACxB,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,SAAS,CAAC,MAAc,EAAE,QAAgB;QAC9C,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,OAAO,CAC/B,KAAK,EACL,iBAAiB,MAAM,YAAY,QAAQ,EAAE,CAC9C,CAAC;QACF,OAAO,MAAM,CAAC,MAAM,CAAC;IACvB,CAAC;CACF"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* Entry point for dump-mcp server
|
|
4
|
+
*
|
|
5
|
+
* Usage:
|
|
6
|
+
* DUMP_API_TOKEN=dmp_xxx node dist/index.js
|
|
7
|
+
*
|
|
8
|
+
* Environment variables:
|
|
9
|
+
* DUMP_API_TOKEN - Required. Your dump.xoozoo.com agent token
|
|
10
|
+
* DUMP_API_URL - Optional. API URL (default: https://dump.xoozoo.com)
|
|
11
|
+
*/
|
|
12
|
+
export {};
|
|
13
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA;;;;;;;;;GASG"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* Entry point for dump-mcp server
|
|
4
|
+
*
|
|
5
|
+
* Usage:
|
|
6
|
+
* DUMP_API_TOKEN=dmp_xxx node dist/index.js
|
|
7
|
+
*
|
|
8
|
+
* Environment variables:
|
|
9
|
+
* DUMP_API_TOKEN - Required. Your dump.xoozoo.com agent token
|
|
10
|
+
* DUMP_API_URL - Optional. API URL (default: https://dump.xoozoo.com)
|
|
11
|
+
*/
|
|
12
|
+
import { createServer } from './server.js';
|
|
13
|
+
async function main() {
|
|
14
|
+
const { server, transport } = await createServer();
|
|
15
|
+
// Connect server to transport
|
|
16
|
+
await server.connect(transport);
|
|
17
|
+
// Log to stderr (stdout is used for MCP protocol)
|
|
18
|
+
console.error('dump-mcp server running');
|
|
19
|
+
}
|
|
20
|
+
main().catch((error) => {
|
|
21
|
+
console.error('Fatal error:', error);
|
|
22
|
+
process.exit(1);
|
|
23
|
+
});
|
|
24
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA;;;;;;;;;GASG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAE3C,KAAK,UAAU,IAAI;IACjB,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,GAAG,MAAM,YAAY,EAAE,CAAC;IAEnD,8BAA8B;IAC9B,MAAM,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IAEhC,kDAAkD;IAClD,OAAO,CAAC,KAAK,CAAC,yBAAyB,CAAC,CAAC;AAC3C,CAAC;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE;IACrB,OAAO,CAAC,KAAK,CAAC,cAAc,EAAE,KAAK,CAAC,CAAC;IACrC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}
|
package/dist/server.d.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MCP Server setup for dump.xoozoo.com
|
|
3
|
+
*/
|
|
4
|
+
import { Server } from '@modelcontextprotocol/sdk/server/index.js';
|
|
5
|
+
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
|
|
6
|
+
export declare function createServer(): Promise<{
|
|
7
|
+
server: Server;
|
|
8
|
+
transport: StdioServerTransport;
|
|
9
|
+
}>;
|
|
10
|
+
//# sourceMappingURL=server.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AACnE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AAWjF,wBAAsB,YAAY,IAAI,OAAO,CAAC;IAC5C,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,oBAAoB,CAAC;CACjC,CAAC,CA6FD"}
|
package/dist/server.js
ADDED
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MCP Server setup for dump.xoozoo.com
|
|
3
|
+
*/
|
|
4
|
+
import { Server } from '@modelcontextprotocol/sdk/server/index.js';
|
|
5
|
+
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
|
|
6
|
+
import { CallToolRequestSchema, ListToolsRequestSchema, } from '@modelcontextprotocol/sdk/types.js';
|
|
7
|
+
import { DumpApiClient } from './api-client.js';
|
|
8
|
+
import { registerEndpointTools, handleEndpointTool } from './tools/endpoints.js';
|
|
9
|
+
import { registerRequestTools, handleRequestTool } from './tools/requests.js';
|
|
10
|
+
import { registerReplayTools, handleReplayTool } from './tools/replay.js';
|
|
11
|
+
export async function createServer() {
|
|
12
|
+
// Get configuration from environment
|
|
13
|
+
const apiToken = process.env.DUMP_API_TOKEN;
|
|
14
|
+
const apiUrl = process.env.DUMP_API_URL || 'https://dump.xoozoo.com';
|
|
15
|
+
if (!apiToken) {
|
|
16
|
+
console.error('Error: DUMP_API_TOKEN environment variable is required');
|
|
17
|
+
process.exit(1);
|
|
18
|
+
}
|
|
19
|
+
// Create API client
|
|
20
|
+
const client = new DumpApiClient(apiUrl, apiToken);
|
|
21
|
+
// Validate token on startup
|
|
22
|
+
try {
|
|
23
|
+
const validation = await client.validateToken();
|
|
24
|
+
console.error(`Authenticated as: ${validation.user.email} (token: ${validation.token.name})`);
|
|
25
|
+
}
|
|
26
|
+
catch (error) {
|
|
27
|
+
console.error('Error: Failed to validate API token:', error instanceof Error ? error.message : error);
|
|
28
|
+
process.exit(1);
|
|
29
|
+
}
|
|
30
|
+
// Create MCP server
|
|
31
|
+
const server = new Server({
|
|
32
|
+
name: 'dump-mcp',
|
|
33
|
+
version: '1.0.0',
|
|
34
|
+
}, {
|
|
35
|
+
capabilities: {
|
|
36
|
+
tools: {},
|
|
37
|
+
},
|
|
38
|
+
});
|
|
39
|
+
// Collect all tools
|
|
40
|
+
const allTools = [
|
|
41
|
+
...registerEndpointTools(),
|
|
42
|
+
...registerRequestTools(),
|
|
43
|
+
...registerReplayTools(),
|
|
44
|
+
];
|
|
45
|
+
// Handle list_tools request
|
|
46
|
+
server.setRequestHandler(ListToolsRequestSchema, async () => {
|
|
47
|
+
return { tools: allTools };
|
|
48
|
+
});
|
|
49
|
+
// Handle call_tool request
|
|
50
|
+
server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
51
|
+
const { name, arguments: args } = request.params;
|
|
52
|
+
try {
|
|
53
|
+
// Route to appropriate handler
|
|
54
|
+
let result;
|
|
55
|
+
if (name.startsWith('dump_') && name.includes('endpoint')) {
|
|
56
|
+
result = await handleEndpointTool(client, name, args || {});
|
|
57
|
+
}
|
|
58
|
+
else if (name.startsWith('dump_') && name.includes('request')) {
|
|
59
|
+
result = await handleRequestTool(client, name, args || {});
|
|
60
|
+
}
|
|
61
|
+
else if (name.startsWith('dump_') && name.includes('replay')) {
|
|
62
|
+
result = await handleReplayTool(client, name, args || {});
|
|
63
|
+
}
|
|
64
|
+
else if (name === 'dump_list_teams') {
|
|
65
|
+
result = await handleEndpointTool(client, name, args || {});
|
|
66
|
+
}
|
|
67
|
+
else {
|
|
68
|
+
throw new Error(`Unknown tool: ${name}`);
|
|
69
|
+
}
|
|
70
|
+
return {
|
|
71
|
+
content: [
|
|
72
|
+
{
|
|
73
|
+
type: 'text',
|
|
74
|
+
text: typeof result === 'string' ? result : JSON.stringify(result, null, 2),
|
|
75
|
+
},
|
|
76
|
+
],
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
catch (error) {
|
|
80
|
+
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
81
|
+
return {
|
|
82
|
+
content: [
|
|
83
|
+
{
|
|
84
|
+
type: 'text',
|
|
85
|
+
text: `Error: ${errorMessage}`,
|
|
86
|
+
},
|
|
87
|
+
],
|
|
88
|
+
isError: true,
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
});
|
|
92
|
+
// Create transport
|
|
93
|
+
const transport = new StdioServerTransport();
|
|
94
|
+
return { server, transport };
|
|
95
|
+
}
|
|
96
|
+
//# sourceMappingURL=server.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"server.js","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AACnE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EACL,qBAAqB,EACrB,sBAAsB,GAEvB,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,qBAAqB,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AACjF,OAAO,EAAE,oBAAoB,EAAE,iBAAiB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AAM,CAAC;gBACN,MAAM,IAAI,KAAK,CAAC,iBAAiB,IAAI,EAAE,CAAC,CAAC;YAC3C,CAAC;YAED,OAAO;gBACL,OAAO,EAAE;oBACP;wBACE,IAAI,EAAE,MAAM;wBACZ,IAAI,EAAE,OAAO,MAAM,KAAK,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC;qBAC5E;iBACF;aACF,CAAC;QACJ,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,MAAM,YAAY,GAAG,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;YAC5E,OAAO;gBACL,OAAO,EAAE;oBACP;wBACE,IAAI,EAAE,MAAM;wBACZ,IAAI,EAAE,UAAU,YAAY,EAAE;qBAC/B;iBACF;gBACD,OAAO,EAAE,IAAI;aACd,CAAC;QACJ,CAAC;IACH,CAAC,CAAC,CAAC;IAEH,mBAAmB;IACnB,MAAM,SAAS,GAAG,IAAI,oBAAoB,EAAE,CAAC;IAE7C,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC;AAC/B,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Endpoint management tools for dump-mcp
|
|
3
|
+
*/
|
|
4
|
+
import { Tool } from '@modelcontextprotocol/sdk/types.js';
|
|
5
|
+
import { DumpApiClient } from '../api-client.js';
|
|
6
|
+
/**
|
|
7
|
+
* Register endpoint-related tools
|
|
8
|
+
*/
|
|
9
|
+
export declare function registerEndpointTools(): Tool[];
|
|
10
|
+
/**
|
|
11
|
+
* Handle endpoint tool calls
|
|
12
|
+
*/
|
|
13
|
+
export declare function handleEndpointTool(client: DumpApiClient, name: string, args: Record<string, unknown>): Promise<unknown>;
|
|
14
|
+
//# sourceMappingURL=endpoints.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"endpoints.d.ts","sourceRoot":"","sources":["../../src/tools/endpoints.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,IAAI,EAAE,MAAM,oCAAoC,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAGjD;;GAEG;AACH,wBAAgB,qBAAqB,IAAI,IAAI,EAAE,CA4F9C;AAED;;GAEG;AACH,wBAAsB,kBAAkB,CACtC,MAAM,EAAE,aAAa,EACrB,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC5B,OAAO,CAAC,OAAO,CAAC,CA6FlB"}
|