@fleetx_io/fleetx-mcp-server 1.0.0 → 1.0.2
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 +55 -77
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
# @fleetx_io/fleetx-mcp-server
|
|
2
2
|
|
|
3
|
+
[](https://www.npmjs.com/package/@fleetx_io/fleetx-mcp-server)
|
|
4
|
+
[](https://www.npmjs.com/package/@fleetx_io/fleetx-mcp-server)
|
|
5
|
+
|
|
3
6
|
An MCP (Model Context Protocol) server that gives AI agents access to the FleetX REST API. Install it as an npm package and connect it to any MCP-compatible client — no code required.
|
|
4
7
|
|
|
8
|
+
**[View on npm](https://www.npmjs.com/package/@fleetx_io/fleetx-mcp-server)**
|
|
9
|
+
|
|
5
10
|
## How it Works
|
|
6
11
|
|
|
7
12
|
1. Your AI agent (Cursor, Claude Desktop, Windsurf, etc.) launches this server as a subprocess.
|
|
@@ -14,16 +19,17 @@ An MCP (Model Context Protocol) server that gives AI agents access to the FleetX
|
|
|
14
19
|
|
|
15
20
|
## Quick Start
|
|
16
21
|
|
|
17
|
-
###
|
|
22
|
+
### Option A: Use directly with npx (no install)
|
|
18
23
|
|
|
19
24
|
```bash
|
|
20
|
-
|
|
25
|
+
npx -y @fleetx_io/fleetx-mcp-server
|
|
21
26
|
```
|
|
22
27
|
|
|
23
|
-
|
|
28
|
+
### Option B: Install globally
|
|
24
29
|
|
|
25
30
|
```bash
|
|
26
|
-
|
|
31
|
+
npm install -g @fleetx_io/fleetx-mcp-server
|
|
32
|
+
fleetx-mcp-server
|
|
27
33
|
```
|
|
28
34
|
|
|
29
35
|
---
|
|
@@ -34,6 +40,8 @@ npx @fleetx_io/fleetx-mcp-server
|
|
|
34
40
|
|
|
35
41
|
Add to `.cursor/mcp.json` in your project root:
|
|
36
42
|
|
|
43
|
+
**Using npx:**
|
|
44
|
+
|
|
37
45
|
```json
|
|
38
46
|
{
|
|
39
47
|
"mcpServers": {
|
|
@@ -45,6 +53,18 @@ Add to `.cursor/mcp.json` in your project root:
|
|
|
45
53
|
}
|
|
46
54
|
```
|
|
47
55
|
|
|
56
|
+
**Using global install:**
|
|
57
|
+
|
|
58
|
+
```json
|
|
59
|
+
{
|
|
60
|
+
"mcpServers": {
|
|
61
|
+
"fleetx": {
|
|
62
|
+
"command": "fleetx-mcp-server"
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
```
|
|
67
|
+
|
|
48
68
|
Then restart Cursor. The server will appear in **Settings > MCP**.
|
|
49
69
|
|
|
50
70
|
### Claude Desktop
|
|
@@ -54,6 +74,8 @@ Add to your `claude_desktop_config.json`:
|
|
|
54
74
|
**macOS:** `~/Library/Application Support/Claude/claude_desktop_config.json`
|
|
55
75
|
**Windows:** `%APPDATA%\Claude\claude_desktop_config.json`
|
|
56
76
|
|
|
77
|
+
**Using npx:**
|
|
78
|
+
|
|
57
79
|
```json
|
|
58
80
|
{
|
|
59
81
|
"mcpServers": {
|
|
@@ -65,10 +87,24 @@ Add to your `claude_desktop_config.json`:
|
|
|
65
87
|
}
|
|
66
88
|
```
|
|
67
89
|
|
|
90
|
+
**Using global install:**
|
|
91
|
+
|
|
92
|
+
```json
|
|
93
|
+
{
|
|
94
|
+
"mcpServers": {
|
|
95
|
+
"fleetx": {
|
|
96
|
+
"command": "fleetx-mcp-server"
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
```
|
|
101
|
+
|
|
68
102
|
### Windsurf
|
|
69
103
|
|
|
70
104
|
Add to your Windsurf MCP config:
|
|
71
105
|
|
|
106
|
+
**Using npx:**
|
|
107
|
+
|
|
72
108
|
```json
|
|
73
109
|
{
|
|
74
110
|
"mcpServers": {
|
|
@@ -80,22 +116,18 @@ Add to your Windsurf MCP config:
|
|
|
80
116
|
}
|
|
81
117
|
```
|
|
82
118
|
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
Run the server as a subprocess communicating over **stdio**:
|
|
86
|
-
|
|
87
|
-
```bash
|
|
88
|
-
npx @fleetx_io/fleetx-mcp-server
|
|
89
|
-
```
|
|
90
|
-
|
|
91
|
-
Or if installed globally:
|
|
119
|
+
**Using global install:**
|
|
92
120
|
|
|
93
|
-
```
|
|
94
|
-
|
|
121
|
+
```json
|
|
122
|
+
{
|
|
123
|
+
"mcpServers": {
|
|
124
|
+
"fleetx": {
|
|
125
|
+
"command": "fleetx-mcp-server"
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
}
|
|
95
129
|
```
|
|
96
130
|
|
|
97
|
-
The server speaks JSON-RPC over stdin/stdout. Logs go to stderr.
|
|
98
|
-
|
|
99
131
|
---
|
|
100
132
|
|
|
101
133
|
## Usage
|
|
@@ -126,32 +158,6 @@ The full list depends on your account's enabled APIs.
|
|
|
126
158
|
|
|
127
159
|
---
|
|
128
160
|
|
|
129
|
-
## Configuration (Optional)
|
|
130
|
-
|
|
131
|
-
By default, the server connects to the FleetX production API. Override with environment variables if needed:
|
|
132
|
-
|
|
133
|
-
```json
|
|
134
|
-
{
|
|
135
|
-
"mcpServers": {
|
|
136
|
-
"fleetx": {
|
|
137
|
-
"command": "npx",
|
|
138
|
-
"args": ["-y", "@fleetx_io/fleetx-mcp-server"],
|
|
139
|
-
"env": {
|
|
140
|
-
"LOGIN_URL": "https://api.fleetx.io/api/v1/login",
|
|
141
|
-
"API_DEFINITION_URL": "https://app.fleetx.io/napp/api-reference/apis"
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
```
|
|
147
|
-
|
|
148
|
-
| Variable | Default | Description |
|
|
149
|
-
|----------|---------|-------------|
|
|
150
|
-
| `LOGIN_URL` | `https://api.fleetx.io/api/v1/login` | Authentication endpoint |
|
|
151
|
-
| `API_DEFINITION_URL` | `https://app.fleetx.io/napp/api-reference/apis` | API definitions endpoint |
|
|
152
|
-
|
|
153
|
-
---
|
|
154
|
-
|
|
155
161
|
## Security
|
|
156
162
|
|
|
157
163
|
- Credentials are sent only to the FleetX login endpoint — never logged or stored on disk.
|
|
@@ -162,53 +168,25 @@ By default, the server connects to the FleetX production API. Override with envi
|
|
|
162
168
|
|
|
163
169
|
## Testing with MCP Inspector
|
|
164
170
|
|
|
165
|
-
|
|
171
|
+
**With npx (no install):**
|
|
166
172
|
|
|
167
173
|
```bash
|
|
168
|
-
npx @modelcontextprotocol/inspector npx @fleetx_io/fleetx-mcp-server
|
|
174
|
+
npx -y @modelcontextprotocol/inspector npx -y @fleetx_io/fleetx-mcp-server
|
|
169
175
|
```
|
|
170
176
|
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
---
|
|
174
|
-
|
|
175
|
-
## Development
|
|
177
|
+
**After installing the package globally:**
|
|
176
178
|
|
|
177
179
|
```bash
|
|
178
|
-
|
|
179
|
-
cd fleetx-mcp-server
|
|
180
|
-
npm install
|
|
180
|
+
npx -y @modelcontextprotocol/inspector fleetx-mcp-server
|
|
181
181
|
```
|
|
182
182
|
|
|
183
|
-
|
|
184
|
-
|---------|-------------|
|
|
185
|
-
| `npm run dev` | Start with hot-reload (ts-node-dev) |
|
|
186
|
-
| `npm run build` | Compile TypeScript to `dist/` |
|
|
187
|
-
| `npm start` | Run compiled output |
|
|
188
|
-
| `npm run startClient` | Launch with MCP Inspector (built) |
|
|
189
|
-
| `npm run startClientLive` | Launch with MCP Inspector (live reload) |
|
|
190
|
-
|
|
191
|
-
### Project Structure
|
|
192
|
-
|
|
193
|
-
```
|
|
194
|
-
src/
|
|
195
|
-
index.ts Stdio transport entrypoint
|
|
196
|
-
mcpServer.ts MCP server + login tool + dynamic tool registration
|
|
197
|
-
auth.ts Login flow + in-memory token store
|
|
198
|
-
apiDiscovery.ts Fetch API definitions from protected endpoint
|
|
199
|
-
toolGenerator.ts Convert API definitions into MCP tools
|
|
200
|
-
proxyCaller.ts Proxy calls to external APIs via Axios
|
|
201
|
-
schemaBuilder.ts Zod schema + JSON Schema generation from API metadata
|
|
202
|
-
utils.ts Logging + config helpers
|
|
203
|
-
types.ts Shared TypeScript interfaces
|
|
204
|
-
```
|
|
183
|
+
This opens a web UI where you can connect, call `login`, browse all discovered tools, and test them interactively.
|
|
205
184
|
|
|
206
185
|
---
|
|
207
186
|
|
|
208
187
|
## Requirements
|
|
209
188
|
|
|
210
|
-
- Node.js >=
|
|
211
|
-
- npm or npx
|
|
189
|
+
- Node.js >= 20
|
|
212
190
|
|
|
213
191
|
## License
|
|
214
192
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fleetx_io/fleetx-mcp-server",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "MCP server that gives AI agents access to the FleetX REST API. Works with Cursor, Claude Desktop, Windsurf, and any MCP-compatible client.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
"fleetx-mcp-server": "dist/index.js"
|
|
9
9
|
},
|
|
10
10
|
"files": [
|
|
11
|
+
"package.json",
|
|
11
12
|
"dist",
|
|
12
13
|
"README.md",
|
|
13
14
|
"CHANGELOG.md",
|