@1mcp/agent 0.22.0 → 0.22.1
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 +123 -149
- package/build/commands/app/backups.d.ts +11 -0
- package/build/commands/app/backups.d.ts.map +1 -1
- package/build/commands/app/backups.js +25 -0
- package/build/commands/app/backups.js.map +1 -1
- package/build/commands/app/consolidate.d.ts +19 -0
- package/build/commands/app/consolidate.d.ts.map +1 -1
- package/build/commands/app/consolidate.js +63 -0
- package/build/commands/app/consolidate.js.map +1 -1
- package/build/commands/app/discover.d.ts +9 -0
- package/build/commands/app/discover.d.ts.map +1 -1
- package/build/commands/app/discover.js +21 -0
- package/build/commands/app/discover.js.map +1 -1
- package/build/commands/app/index.d.ts.map +1 -1
- package/build/commands/app/index.js +12 -192
- package/build/commands/app/index.js.map +1 -1
- package/build/commands/app/list.d.ts +9 -0
- package/build/commands/app/list.d.ts.map +1 -1
- package/build/commands/app/list.js +21 -0
- package/build/commands/app/list.js.map +1 -1
- package/build/commands/app/restore.d.ts +19 -0
- package/build/commands/app/restore.d.ts.map +1 -1
- package/build/commands/app/restore.js +59 -0
- package/build/commands/app/restore.js.map +1 -1
- package/build/commands/app/status.d.ts +9 -0
- package/build/commands/app/status.d.ts.map +1 -1
- package/build/commands/app/status.js +21 -0
- package/build/commands/app/status.js.map +1 -1
- package/build/commands/mcp/add.d.ts +33 -0
- package/build/commands/mcp/add.d.ts.map +1 -1
- package/build/commands/mcp/add.js +86 -0
- package/build/commands/mcp/add.js.map +1 -1
- package/build/commands/mcp/enable.d.ts +13 -0
- package/build/commands/mcp/enable.d.ts.map +1 -1
- package/build/commands/mcp/enable.js +24 -0
- package/build/commands/mcp/enable.js.map +1 -1
- package/build/commands/mcp/index.d.ts.map +1 -1
- package/build/commands/mcp/index.js +16 -262
- package/build/commands/mcp/index.js.map +1 -1
- package/build/commands/mcp/list.d.ts +13 -0
- package/build/commands/mcp/list.d.ts.map +1 -1
- package/build/commands/mcp/list.js +35 -1
- package/build/commands/mcp/list.js.map +1 -1
- package/build/commands/mcp/remove.d.ts +9 -0
- package/build/commands/mcp/remove.d.ts.map +1 -1
- package/build/commands/mcp/remove.js +21 -0
- package/build/commands/mcp/remove.js.map +1 -1
- package/build/commands/mcp/status.d.ts +9 -0
- package/build/commands/mcp/status.d.ts.map +1 -1
- package/build/commands/mcp/status.js +23 -1
- package/build/commands/mcp/status.js.map +1 -1
- package/build/commands/mcp/tokens.d.ts +11 -1
- package/build/commands/mcp/tokens.d.ts.map +1 -1
- package/build/commands/mcp/tokens.js +31 -0
- package/build/commands/mcp/tokens.js.map +1 -1
- package/build/commands/mcp/update.d.ts +31 -0
- package/build/commands/mcp/update.d.ts.map +1 -1
- package/build/commands/mcp/update.js +72 -0
- package/build/commands/mcp/update.js.map +1 -1
- package/build/commands/preset/create.d.ts +12 -2
- package/build/commands/preset/create.d.ts.map +1 -1
- package/build/commands/preset/create.js +21 -0
- package/build/commands/preset/create.js.map +1 -1
- package/build/commands/preset/delete.d.ts +8 -2
- package/build/commands/preset/delete.d.ts.map +1 -1
- package/build/commands/preset/delete.js +10 -0
- package/build/commands/preset/delete.js.map +1 -1
- package/build/commands/preset/edit.d.ts +10 -2
- package/build/commands/preset/edit.d.ts.map +1 -1
- package/build/commands/preset/edit.js +15 -1
- package/build/commands/preset/edit.js.map +1 -1
- package/build/commands/preset/index.d.ts.map +1 -1
- package/build/commands/preset/index.js +16 -67
- package/build/commands/preset/index.js.map +1 -1
- package/build/commands/preset/interactive.d.ts +1 -2
- package/build/commands/preset/interactive.d.ts.map +1 -1
- package/build/commands/preset/list.d.ts +6 -2
- package/build/commands/preset/list.d.ts.map +1 -1
- package/build/commands/preset/list.js +6 -0
- package/build/commands/preset/list.js.map +1 -1
- package/build/commands/preset/show.d.ts +8 -2
- package/build/commands/preset/show.d.ts.map +1 -1
- package/build/commands/preset/show.js +10 -0
- package/build/commands/preset/show.js.map +1 -1
- package/build/commands/preset/test.d.ts +8 -2
- package/build/commands/preset/test.d.ts.map +1 -1
- package/build/commands/preset/test.js +10 -0
- package/build/commands/preset/test.js.map +1 -1
- package/build/commands/preset/url.d.ts +8 -2
- package/build/commands/preset/url.d.ts.map +1 -1
- package/build/commands/preset/url.js +10 -0
- package/build/commands/preset/url.js.map +1 -1
- package/build/commands/serve/index.d.ts +106 -0
- package/build/commands/serve/index.d.ts.map +1 -0
- package/build/commands/serve/index.js +143 -0
- package/build/commands/serve/index.js.map +1 -0
- package/build/commands/serve/serve.d.ts +28 -0
- package/build/commands/serve/serve.d.ts.map +1 -0
- package/build/commands/serve/serve.js +213 -0
- package/build/commands/serve/serve.js.map +1 -0
- package/build/constants.d.ts +1 -1
- package/build/constants.js +1 -1
- package/build/core/server/serverManager.d.ts.map +1 -1
- package/build/core/server/serverManager.js +3 -0
- package/build/core/server/serverManager.js.map +1 -1
- package/build/core/types/transport.d.ts +16 -77
- package/build/core/types/transport.d.ts.map +1 -1
- package/build/core/types/transport.js +2 -2
- package/build/core/types/transport.js.map +1 -1
- package/build/index.js +13 -347
- package/build/index.js.map +1 -1
- package/build/logger/logger.d.ts.map +1 -1
- package/build/logger/logger.js +4 -2
- package/build/logger/logger.js.map +1 -1
- package/build/logger/mcpLoggingEnhancer.d.ts.map +1 -1
- package/build/logger/mcpLoggingEnhancer.js +10 -6
- package/build/logger/mcpLoggingEnhancer.js.map +1 -1
- package/build/transport/transportFactory.js +1 -1
- package/build/transport/transportFactory.js.map +1 -1
- package/build/utils/configureGlobalLogger.d.ts +12 -0
- package/build/utils/configureGlobalLogger.d.ts.map +1 -0
- package/build/utils/configureGlobalLogger.js +18 -0
- package/build/utils/configureGlobalLogger.js.map +1 -0
- package/package.json +17 -18
package/README.md
CHANGED
|
@@ -19,7 +19,6 @@ A unified Model Context Protocol server implementation that aggregates multiple
|
|
|
19
19
|
- [Prerequisites](#prerequisites)
|
|
20
20
|
- [Usage](#usage)
|
|
21
21
|
- [Docker](#docker)
|
|
22
|
-
- [Trust Proxy Configuration](#trust-proxy-configuration)
|
|
23
22
|
- [Understanding Tags](#understanding-tags)
|
|
24
23
|
- [Configuration](#configuration)
|
|
25
24
|
- [Authentication](#authentication)
|
|
@@ -50,24 +49,80 @@ A unified Model Context Protocol server implementation that aggregates multiple
|
|
|
50
49
|
|
|
51
50
|
Get up and running with 1MCP in just a few steps:
|
|
52
51
|
|
|
52
|
+
### 0. Install 1MCP (Choose One Method)
|
|
53
|
+
|
|
54
|
+
#### Binary Downloads (Recommended - No Node.js Required)
|
|
55
|
+
|
|
56
|
+
Download the compressed archive for your platform from the [latest release](https://github.com/1mcp-app/agent/releases/latest):
|
|
57
|
+
|
|
58
|
+
- **Linux (x64)**: `1mcp-linux-x64`
|
|
59
|
+
- **Linux (ARM64)**: `1mcp-linux-arm64`
|
|
60
|
+
- **Windows (x64)**: `1mcp-win32-x64.exe`
|
|
61
|
+
- **macOS (ARM64)**: `1mcp-darwin-arm64`
|
|
62
|
+
- **macOS (Intel)**: `1mcp-darwin-x64`
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
# Linux example:
|
|
66
|
+
curl -L -o 1mcp-linux-x64.tar.gz https://github.com/1mcp-app/agent/releases/latest/download/1mcp-linux-x64.tar.gz
|
|
67
|
+
tar -xzf 1mcp-linux-x64.tar.gz
|
|
68
|
+
sudo mv 1mcp /usr/local/bin/
|
|
69
|
+
sudo chmod +x /usr/local/bin/1mcp
|
|
70
|
+
rm 1mcp-linux-x64.tar.gz
|
|
71
|
+
1mcp --version
|
|
72
|
+
|
|
73
|
+
# macOS example (Apple Silicon):
|
|
74
|
+
curl -L -o 1mcp-darwin-arm64.tar.gz https://github.com/1mcp-app/agent/releases/latest/download/1mcp-darwin-arm64.tar.gz
|
|
75
|
+
tar -xzf 1mcp-darwin-arm64.tar.gz
|
|
76
|
+
sudo mv 1mcp /usr/local/bin/
|
|
77
|
+
sudo chmod +x /usr/local/bin/1mcp
|
|
78
|
+
rm 1mcp-darwin-arm64.tar.gz
|
|
79
|
+
1mcp --version
|
|
80
|
+
|
|
81
|
+
# Windows example (PowerShell):
|
|
82
|
+
Invoke-WebRequest -Uri "https://github.com/1mcp-app/agent/releases/latest/download/1mcp-win32-x64.zip" -OutFile "1mcp-win32-x64.zip"
|
|
83
|
+
Expand-Archive -Path "1mcp-win32-x64.zip" -DestinationPath "."
|
|
84
|
+
# Move to a directory in your PATH or use directly
|
|
85
|
+
.\1mcp.exe --version
|
|
86
|
+
Remove-Item "1mcp-win32-x64.zip"
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
More examples: [Installation Guide](https://docs.1mcp.app/guide/installation/)
|
|
90
|
+
|
|
91
|
+
#### NPM/Node.js Method
|
|
92
|
+
|
|
93
|
+
If you prefer using Node.js package managers:
|
|
94
|
+
|
|
95
|
+
```bash
|
|
96
|
+
# No installation needed - run directly
|
|
97
|
+
npx -y @1mcp/agent --help
|
|
98
|
+
|
|
99
|
+
# Or install globally
|
|
100
|
+
npm install -g @1mcp/agent
|
|
101
|
+
```
|
|
102
|
+
|
|
53
103
|
### 1. Add MCP Servers
|
|
54
104
|
|
|
55
105
|
Add the MCP servers you want to use. Here are some popular examples:
|
|
56
106
|
|
|
57
107
|
```bash
|
|
58
|
-
#
|
|
59
|
-
|
|
108
|
+
# Using binary:
|
|
109
|
+
1mcp mcp add context7 -- npx -y @upstash/context7-mcp
|
|
110
|
+
1mcp mcp add sequential -- npx -y @modelcontextprotocol/server-sequential-thinking
|
|
111
|
+
1mcp mcp add filesystem -- npx -y @modelcontextprotocol/server-filesystem ~/Documents
|
|
60
112
|
|
|
61
|
-
#
|
|
113
|
+
# Using NPM:
|
|
114
|
+
npx -y @1mcp/agent mcp add context7 -- npx -y @upstash/context7-mcp
|
|
62
115
|
npx -y @1mcp/agent mcp add sequential -- npx -y @modelcontextprotocol/server-sequential-thinking
|
|
63
|
-
|
|
64
|
-
# Add Filesystem for file operations
|
|
65
116
|
npx -y @1mcp/agent mcp add filesystem -- npx -y @modelcontextprotocol/server-filesystem ~/Documents
|
|
66
117
|
```
|
|
67
118
|
|
|
68
119
|
### 2. Start the 1MCP Server
|
|
69
120
|
|
|
70
121
|
```bash
|
|
122
|
+
# Using binary:
|
|
123
|
+
1mcp
|
|
124
|
+
|
|
125
|
+
# Using NPM:
|
|
71
126
|
npx -y @1mcp/agent
|
|
72
127
|
```
|
|
73
128
|
|
|
@@ -114,6 +169,10 @@ claude mcp add -t http 1mcp "http://127.0.0.1:3050/mcp?app=claude-code"
|
|
|
114
169
|
Check server status and connected MCP servers:
|
|
115
170
|
|
|
116
171
|
```bash
|
|
172
|
+
# Using binary:
|
|
173
|
+
1mcp mcp status
|
|
174
|
+
|
|
175
|
+
# Using NPM:
|
|
117
176
|
npx -y @1mcp/agent mcp status
|
|
118
177
|
```
|
|
119
178
|
|
|
@@ -127,87 +186,80 @@ That's it! All your MCP servers are now available through one unified endpoint.
|
|
|
127
186
|
|
|
128
187
|
### Core Commands
|
|
129
188
|
|
|
130
|
-
- **`npx -y @1mcp/agent [serve]`** - Start the 1MCP server (default command)
|
|
189
|
+
- **`1mcp [serve]`** or **`npx -y @1mcp/agent [serve]`** - Start the 1MCP server (default command)
|
|
131
190
|
- `--transport` - Choose transport type (stdio, http, sse)
|
|
132
191
|
- `--config` - Use specific config file
|
|
133
192
|
- `--port` - Change HTTP port
|
|
134
193
|
|
|
135
194
|
### MCP Management
|
|
136
195
|
|
|
137
|
-
- **`
|
|
138
|
-
- **`
|
|
139
|
-
- **`
|
|
140
|
-
- **`
|
|
141
|
-
- **`
|
|
142
|
-
- **`
|
|
143
|
-
- **`npx -y @1mcp/agent mcp tokens`** - Estimate MCP token usage for server capabilities
|
|
196
|
+
- **`1mcp mcp add <name>`** - Add a new MCP server to configuration
|
|
197
|
+
- **`1mcp mcp remove <name>`** - Remove an MCP server
|
|
198
|
+
- **`1mcp mcp list`** - List all configured MCP servers
|
|
199
|
+
- **`1mcp mcp status [name]`** - Show server status and details
|
|
200
|
+
- **`1mcp mcp enable/disable <name>`** - Enable or disable servers
|
|
201
|
+
- **`1mcp mcp update <name>`** - Update server configuration
|
|
144
202
|
|
|
145
203
|
### App Integration
|
|
146
204
|
|
|
147
|
-
- **`
|
|
148
|
-
- **`
|
|
149
|
-
- **`
|
|
150
|
-
- **`
|
|
205
|
+
- **`1mcp app consolidate`** - Consolidate configurations from other MCP apps
|
|
206
|
+
- **`1mcp app discover`** - Discover MCP servers from installed applications
|
|
207
|
+
- **`1mcp app list`** - List discovered applications
|
|
208
|
+
- **`1mcp app status`** - Show consolidation status
|
|
151
209
|
|
|
152
|
-
For detailed command usage, run: `1mcp <command> --help`
|
|
210
|
+
For detailed command usage, run: `1mcp <command> --help` or `npx -y @1mcp/agent <command> --help`
|
|
153
211
|
|
|
154
212
|
Full documentation: [Commands Reference](https://docs.1mcp.app/commands/)
|
|
155
213
|
|
|
156
214
|
## Prerequisites
|
|
157
215
|
|
|
216
|
+
**For Binary Installation (Recommended):**
|
|
217
|
+
|
|
218
|
+
- None! The binary is self-contained and requires no dependencies.
|
|
219
|
+
|
|
220
|
+
**For NPM/Node.js Installation:**
|
|
221
|
+
|
|
158
222
|
- [Node.js](https://nodejs.org/) (version 21 or higher)
|
|
159
|
-
- [pnpm](https://pnpm.io/)
|
|
223
|
+
- [pnpm](https://pnpm.io/) or npm
|
|
160
224
|
|
|
161
225
|
## Usage
|
|
162
226
|
|
|
163
|
-
You can run the server
|
|
227
|
+
You can run the server using the binary or NPM:
|
|
164
228
|
|
|
165
229
|
```bash
|
|
166
|
-
#
|
|
167
|
-
|
|
230
|
+
# Binary usage examples:
|
|
231
|
+
# Basic usage (starts server with HTTP transport)
|
|
232
|
+
1mcp
|
|
168
233
|
|
|
169
234
|
# Use existing Claude Desktop config
|
|
170
|
-
|
|
235
|
+
1mcp --config ~/Library/Application\ Support/Claude/claude_desktop_config.json
|
|
171
236
|
|
|
172
|
-
# Use stdio transport instead of
|
|
173
|
-
|
|
237
|
+
# Use stdio transport instead of HTTP
|
|
238
|
+
1mcp --transport stdio
|
|
174
239
|
|
|
175
240
|
# Use external URL for reverse proxy setup (nginx, etc.)
|
|
176
|
-
|
|
241
|
+
1mcp --external-url https://example.com
|
|
177
242
|
|
|
178
243
|
# Configure trust proxy for reverse proxy setup
|
|
179
|
-
|
|
244
|
+
1mcp --trust-proxy=192.168.1.1
|
|
180
245
|
|
|
181
246
|
# Show all available options
|
|
247
|
+
1mcp --help
|
|
248
|
+
|
|
249
|
+
# NPM usage (if you prefer Node.js):
|
|
250
|
+
# Basic usage (starts server with HTTP transport)
|
|
251
|
+
npx -y @1mcp/agent
|
|
252
|
+
|
|
253
|
+
# All other options work the same way:
|
|
254
|
+
npx -y @1mcp/agent --config ~/Library/Application\ Support/Claude/claude_desktop_config.json
|
|
255
|
+
npx -y @1mcp/agent --transport stdio
|
|
182
256
|
npx -y @1mcp/agent --help
|
|
183
257
|
```
|
|
184
258
|
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
| `--transport`, `-t` | `ONE_MCP_TRANSPORT` | Choose transport type ("stdio", "http", or "sse") | "http" |
|
|
190
|
-
| `--config`, `-c` | `ONE_MCP_CONFIG` | Use a specific config file | |
|
|
191
|
-
| `--config-dir`, `-d` | `ONE_MCP_CONFIG_DIR` | Path to the config directory (overrides default config location) | |
|
|
192
|
-
| `--port`, `-P` | `ONE_MCP_PORT` | Change HTTP port | 3050 |
|
|
193
|
-
| `--host`, `-H` | `ONE_MCP_HOST` | Change HTTP host | localhost |
|
|
194
|
-
| `--external-url`, `-u` | `ONE_MCP_EXTERNAL_URL` | External URL for OAuth callbacks and public URLs (e.g., https://example.com) | |
|
|
195
|
-
| `--trust-proxy` | `ONE_MCP_TRUST_PROXY` | Trust proxy configuration for client IP detection (boolean, IP, CIDR, preset) | "loopback" |
|
|
196
|
-
| `--tags`, `-g` | `ONE_MCP_TAGS` | Filter servers by tags (comma-separated, OR logic) ⚠️ **Deprecated - use --tag-filter** | |
|
|
197
|
-
| `--tag-filter`, `-f` | `ONE_MCP_TAG_FILTER` | Advanced tag filter expression (and/or/not logic) | |
|
|
198
|
-
| `--pagination`, `-p` | `ONE_MCP_PAGINATION` | Enable pagination for client/server lists (boolean) | false |
|
|
199
|
-
| `--enable-auth` | `ONE_MCP_ENABLE_AUTH` | Enable authentication (OAuth 2.1) | false |
|
|
200
|
-
| `--enable-scope-validation` | `ONE_MCP_ENABLE_SCOPE_VALIDATION` | Enable tag-based scope validation (boolean) | true |
|
|
201
|
-
| `--enable-enhanced-security` | `ONE_MCP_ENABLE_ENHANCED_SECURITY` | Enable enhanced security middleware (boolean) | false |
|
|
202
|
-
| `--session-ttl` | `ONE_MCP_SESSION_TTL` | Session expiry time in minutes (number) | 1440 |
|
|
203
|
-
| `--session-storage-path` | `ONE_MCP_SESSION_STORAGE_PATH` | Custom session storage directory path (string) | |
|
|
204
|
-
| `--rate-limit-window` | `ONE_MCP_RATE_LIMIT_WINDOW` | OAuth rate limit window in minutes (number) | 15 |
|
|
205
|
-
| `--rate-limit-max` | `ONE_MCP_RATE_LIMIT_MAX` | Maximum requests per OAuth rate limit window (number) | 100 |
|
|
206
|
-
| `--enable-async-loading` | `ONE_MCP_ENABLE_ASYNC_LOADING` | Enable asynchronous MCP server loading(boolean) | false |
|
|
207
|
-
| `--health-info-level` | `ONE_MCP_HEALTH_INFO_LEVEL` | Health endpoint information detail level ("full", "basic", "minimal") | "minimal" |
|
|
208
|
-
| `--log-level` | `ONE_MCP_LOG_LEVEL` | Set the log level ("debug", "info", "warn", "error") | "info" |
|
|
209
|
-
| `--log-file` | `ONE_MCP_LOG_FILE` | Write logs to a file in addition to console (disables console logging only for stdio transport) | |
|
|
210
|
-
| `--help`, `-h` | | Show help | |
|
|
259
|
+
For a complete list of all command-line options, environment variables, and configuration details, see:
|
|
260
|
+
|
|
261
|
+
- **[Configuration Deep Dive](https://docs.1mcp.app/guide/essentials/configuration)** - CLI flags and environment variables
|
|
262
|
+
- **[Serve Command Reference](https://docs.1mcp.app/commands/serve)** - Command usage examples
|
|
211
263
|
|
|
212
264
|
## Docker
|
|
213
265
|
|
|
@@ -255,7 +307,6 @@ docker run -i ghcr.io/1mcp-app/agent --transport stdio
|
|
|
255
307
|
- `vX.Y.Z`: Specific version (e.g. `v1.0.0`)
|
|
256
308
|
- `vX.Y`: Major.minor version (e.g. `v1.0`)
|
|
257
309
|
- `vX`: Major version (e.g. `v1`)
|
|
258
|
-
- `sha-<commit>`: Specific commit
|
|
259
310
|
|
|
260
311
|
#### Lightweight Images (npm, pnpm, yarn only)
|
|
261
312
|
|
|
@@ -263,51 +314,8 @@ docker run -i ghcr.io/1mcp-app/agent --transport stdio
|
|
|
263
314
|
- `vX.Y.Z-lite`: Specific version lite (e.g. `v1.0.0-lite`)
|
|
264
315
|
- `vX.Y-lite`: Major.minor version lite (e.g. `v1.0-lite`)
|
|
265
316
|
- `vX-lite`: Major version lite (e.g. `v1-lite`)
|
|
266
|
-
- `sha-<commit>-lite`: Specific commit lite
|
|
267
|
-
|
|
268
|
-
### Configuration Examples
|
|
269
|
-
|
|
270
|
-
```bash
|
|
271
|
-
# Essential networking configuration
|
|
272
|
-
docker run -p 3050:3050 \
|
|
273
|
-
-e ONE_MCP_HOST=0.0.0.0 \
|
|
274
|
-
-e ONE_MCP_PORT=3050 \
|
|
275
|
-
-e ONE_MCP_EXTERNAL_URL=http://127.0.0.1:3050 \
|
|
276
|
-
ghcr.io/1mcp-app/agent
|
|
277
|
-
|
|
278
|
-
# Custom port, tags, and logging (full image)
|
|
279
|
-
docker run -p 3051:3051 \
|
|
280
|
-
-e ONE_MCP_HOST=0.0.0.0 \
|
|
281
|
-
-e ONE_MCP_PORT=3051 \
|
|
282
|
-
-e ONE_MCP_EXTERNAL_URL=http://127.0.0.1:3051 \
|
|
283
|
-
-e ONE_MCP_TAGS=network,filesystem \
|
|
284
|
-
-e ONE_MCP_LOG_LEVEL=debug \
|
|
285
|
-
ghcr.io/1mcp-app/agent
|
|
286
317
|
|
|
287
|
-
|
|
288
|
-
docker run -p 3050:3050 \
|
|
289
|
-
-e ONE_MCP_HOST=0.0.0.0 \
|
|
290
|
-
-e ONE_MCP_EXTERNAL_URL=https://mcp.example.com \
|
|
291
|
-
-e ONE_MCP_TRUST_PROXY=true \
|
|
292
|
-
ghcr.io/1mcp-app/agent:lite
|
|
293
|
-
|
|
294
|
-
# For users in China mainland - faster package installation
|
|
295
|
-
docker run -p 3050:3050 \
|
|
296
|
-
-e ONE_MCP_HOST=0.0.0.0 \
|
|
297
|
-
-e ONE_MCP_PORT=3050 \
|
|
298
|
-
-e ONE_MCP_EXTERNAL_URL=http://127.0.0.1:3050 \
|
|
299
|
-
-e npm_config_registry=https://registry.npmmirror.com \
|
|
300
|
-
-e UV_INDEX=http://mirrors.aliyun.com/pypi/simple \
|
|
301
|
-
-e UV_DEFAULT_INDEX=http://mirrors.aliyun.com/pypi/simple \
|
|
302
|
-
ghcr.io/1mcp-app/agent
|
|
303
|
-
|
|
304
|
-
# Behind corporate proxy
|
|
305
|
-
docker run -p 3050:3050 \
|
|
306
|
-
-e ONE_MCP_HOST=0.0.0.0 \
|
|
307
|
-
-e https_proxy=${https_proxy} \
|
|
308
|
-
-e http_proxy=${http_proxy} \
|
|
309
|
-
ghcr.io/1mcp-app/agent
|
|
310
|
-
```
|
|
318
|
+
For detailed Docker configuration examples with environment variables, see the **[Configuration Deep Dive](https://docs.1mcp.app/guide/essentials/configuration)** documentation.
|
|
311
319
|
|
|
312
320
|
### Image Details
|
|
313
321
|
|
|
@@ -325,23 +333,6 @@ docker run -p 3050:3050 \
|
|
|
325
333
|
- npm, pnpm, yarn only
|
|
326
334
|
- Smaller size, faster downloads
|
|
327
335
|
|
|
328
|
-
## Trust Proxy Configuration
|
|
329
|
-
|
|
330
|
-
When running 1MCP behind a reverse proxy, configure trust proxy settings for proper client IP detection:
|
|
331
|
-
|
|
332
|
-
```bash
|
|
333
|
-
# Default (safe for local development)
|
|
334
|
-
npx -y @1mcp/agent --trust-proxy=loopback
|
|
335
|
-
|
|
336
|
-
# Behind reverse proxy
|
|
337
|
-
npx -y @1mcp/agent --trust-proxy=192.168.1.1
|
|
338
|
-
|
|
339
|
-
# Behind CDN/Cloudflare
|
|
340
|
-
npx -y @1mcp/agent --trust-proxy=true
|
|
341
|
-
```
|
|
342
|
-
|
|
343
|
-
See [docs/TRUST_PROXY.md](docs/TRUST_PROXY.md) for detailed configuration options, security considerations, and reverse proxy setup examples.
|
|
344
|
-
|
|
345
336
|
## Understanding Tags
|
|
346
337
|
|
|
347
338
|
Tags help you control which MCP servers are available to different clients. Think of tags as labels that describe what each server can do.
|
|
@@ -374,10 +365,12 @@ Tags help you control which MCP servers are available to different clients. Thin
|
|
|
374
365
|
**Simple Tag Filtering (OR logic) - ⚠️ Deprecated:**
|
|
375
366
|
|
|
376
367
|
```bash
|
|
377
|
-
#
|
|
378
|
-
|
|
368
|
+
# Binary usage:
|
|
369
|
+
1mcp --transport stdio --tags "network"
|
|
370
|
+
1mcp --transport stdio --tags "network,filesystem"
|
|
379
371
|
|
|
380
|
-
#
|
|
372
|
+
# NPM usage:
|
|
373
|
+
npx -y @1mcp/agent --transport stdio --tags "network"
|
|
381
374
|
npx -y @1mcp/agent --transport stdio --tags "network,filesystem"
|
|
382
375
|
```
|
|
383
376
|
|
|
@@ -386,16 +379,16 @@ npx -y @1mcp/agent --transport stdio --tags "network,filesystem"
|
|
|
386
379
|
**Advanced Tag Filtering (Boolean expressions):**
|
|
387
380
|
|
|
388
381
|
```bash
|
|
389
|
-
#
|
|
390
|
-
|
|
382
|
+
# Binary usage:
|
|
383
|
+
1mcp --transport stdio --tag-filter "network+api"
|
|
384
|
+
1mcp --transport stdio --tag-filter "network,filesystem"
|
|
385
|
+
1mcp --transport stdio --tag-filter "(web,api)+production-test"
|
|
386
|
+
1mcp --transport stdio --tag-filter "web and api and not test"
|
|
391
387
|
|
|
392
|
-
#
|
|
388
|
+
# NPM usage:
|
|
389
|
+
npx -y @1mcp/agent --transport stdio --tag-filter "network+api"
|
|
393
390
|
npx -y @1mcp/agent --transport stdio --tag-filter "network,filesystem"
|
|
394
|
-
|
|
395
|
-
# Complex expression: (web OR api) AND production, but NOT test
|
|
396
391
|
npx -y @1mcp/agent --transport stdio --tag-filter "(web,api)+production-test"
|
|
397
|
-
|
|
398
|
-
# Natural language syntax also supported
|
|
399
392
|
npx -y @1mcp/agent --transport stdio --tag-filter "web and api and not test"
|
|
400
393
|
```
|
|
401
394
|
|
|
@@ -437,31 +430,12 @@ Example tags:
|
|
|
437
430
|
|
|
438
431
|
## Configuration
|
|
439
432
|
|
|
440
|
-
|
|
433
|
+
1MCP supports comprehensive configuration through JSON files, command-line options, and environment variables.
|
|
441
434
|
|
|
442
|
-
|
|
435
|
+
For complete configuration documentation, see:
|
|
443
436
|
|
|
444
|
-
-
|
|
445
|
-
-
|
|
446
|
-
|
|
447
|
-
### Configuration File Format
|
|
448
|
-
|
|
449
|
-
```json
|
|
450
|
-
{
|
|
451
|
-
"mcpServers": {
|
|
452
|
-
"mcp-server-fetch": {
|
|
453
|
-
"command": "uvx",
|
|
454
|
-
"args": ["mcp-server-fetch"],
|
|
455
|
-
"disabled": false
|
|
456
|
-
},
|
|
457
|
-
"server-memory": {
|
|
458
|
-
"command": "npx",
|
|
459
|
-
"args": ["-y", "@modelcontextprotocol/server-memory"],
|
|
460
|
-
"disabled": false
|
|
461
|
-
}
|
|
462
|
-
}
|
|
463
|
-
}
|
|
464
|
-
```
|
|
437
|
+
- **[MCP Servers Reference](https://docs.1mcp.app/reference/mcp-servers)** - Backend server configuration
|
|
438
|
+
- **[Configuration Deep Dive](https://docs.1mcp.app/guide/essentials/configuration)** - CLI flags and environment variables
|
|
465
439
|
|
|
466
440
|
## Authentication
|
|
467
441
|
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { Argv } from 'yargs';
|
|
1
2
|
import { GlobalOptions } from '../../globalOptions.js';
|
|
2
3
|
/**
|
|
3
4
|
* Backups command - Manage and list backup files.
|
|
@@ -10,6 +11,16 @@ interface BackupsOptions extends GlobalOptions {
|
|
|
10
11
|
cleanup?: number;
|
|
11
12
|
verify: boolean;
|
|
12
13
|
}
|
|
14
|
+
/**
|
|
15
|
+
* Build the backups command configuration
|
|
16
|
+
*/
|
|
17
|
+
export declare function buildBackupsCommand(yargs: Argv): Argv<{
|
|
18
|
+
"app-name": string | undefined;
|
|
19
|
+
} & {
|
|
20
|
+
cleanup: number | undefined;
|
|
21
|
+
} & {
|
|
22
|
+
verify: boolean;
|
|
23
|
+
}>;
|
|
13
24
|
/**
|
|
14
25
|
* Main backups command handler
|
|
15
26
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"backups.d.ts","sourceRoot":"","sources":["../../../src/commands/app/backups.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"backups.d.ts","sourceRoot":"","sources":["../../../src/commands/app/backups.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC;AAQlC,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAEvD;;;;;GAKG;AAEH,UAAU,cAAe,SAAQ,aAAa;IAC5C,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,OAAO,CAAC;CACjB;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,IAAI;;;;;;GAqB9C;AAED;;GAEG;AACH,wBAAsB,cAAc,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC,CAW3E"}
|
|
@@ -1,5 +1,30 @@
|
|
|
1
1
|
import { listAppBackups, cleanupOldBackups, verifyBackupIntegrity, findBackupByMetaPath, } from '../../utils/backupManager.js';
|
|
2
2
|
import { getAppPreset } from '../../utils/appPresets.js';
|
|
3
|
+
/**
|
|
4
|
+
* Build the backups command configuration
|
|
5
|
+
*/
|
|
6
|
+
export function buildBackupsCommand(yargs) {
|
|
7
|
+
return yargs
|
|
8
|
+
.positional('app-name', {
|
|
9
|
+
describe: 'Show backups for specific app only',
|
|
10
|
+
type: 'string',
|
|
11
|
+
})
|
|
12
|
+
.option('cleanup', {
|
|
13
|
+
describe: 'Remove backups older than specified days',
|
|
14
|
+
type: 'number',
|
|
15
|
+
})
|
|
16
|
+
.option('verify', {
|
|
17
|
+
describe: 'Verify backup file integrity',
|
|
18
|
+
type: 'boolean',
|
|
19
|
+
default: false,
|
|
20
|
+
})
|
|
21
|
+
.example([
|
|
22
|
+
['$0 app backups', 'List all available backups'],
|
|
23
|
+
['$0 app backups claude-desktop', 'List backups for specific app'],
|
|
24
|
+
['$0 app backups --cleanup=30', 'Remove backups older than 30 days'],
|
|
25
|
+
['$0 app backups --verify', 'Verify backup integrity'],
|
|
26
|
+
]);
|
|
27
|
+
}
|
|
3
28
|
/**
|
|
4
29
|
* Main backups command handler
|
|
5
30
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"backups.js","sourceRoot":"","sources":["../../../src/commands/app/backups.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"backups.js","sourceRoot":"","sources":["../../../src/commands/app/backups.ts"],"names":[],"mappings":"AACA,OAAO,EACL,cAAc,EACd,iBAAiB,EACjB,qBAAqB,EACrB,oBAAoB,GACrB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAgBzD;;GAEG;AACH,MAAM,UAAU,mBAAmB,CAAC,KAAW;IAC7C,OAAO,KAAK;SACT,UAAU,CAAC,UAAU,EAAE;QACtB,QAAQ,EAAE,oCAAoC;QAC9C,IAAI,EAAE,QAAQ;KACf,CAAC;SACD,MAAM,CAAC,SAAS,EAAE;QACjB,QAAQ,EAAE,0CAA0C;QACpD,IAAI,EAAE,QAAQ;KACf,CAAC;SACD,MAAM,CAAC,QAAQ,EAAE;QAChB,QAAQ,EAAE,8BAA8B;QACxC,IAAI,EAA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AAG,CAAC,4DAA4D,CAAC,CAAC;AAC5E,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { Argv } from 'yargs';
|
|
1
2
|
import { GlobalOptions } from '../../globalOptions.js';
|
|
2
3
|
/**
|
|
3
4
|
* Consolidate command - Main consolidation logic for MCP servers.
|
|
@@ -14,6 +15,24 @@ interface ConsolidateOptions extends GlobalOptions {
|
|
|
14
15
|
'backup-only': boolean;
|
|
15
16
|
force: boolean;
|
|
16
17
|
}
|
|
18
|
+
/**
|
|
19
|
+
* Build the consolidate command configuration
|
|
20
|
+
*/
|
|
21
|
+
export declare function buildConsolidateCommand(yargs: Argv): Argv<{
|
|
22
|
+
"app-name": never[] | string[];
|
|
23
|
+
} & {
|
|
24
|
+
url: string | undefined;
|
|
25
|
+
} & {
|
|
26
|
+
"dry-run": boolean;
|
|
27
|
+
} & {
|
|
28
|
+
yes: boolean;
|
|
29
|
+
} & {
|
|
30
|
+
"manual-only": boolean;
|
|
31
|
+
} & {
|
|
32
|
+
"backup-only": boolean;
|
|
33
|
+
} & {
|
|
34
|
+
force: boolean;
|
|
35
|
+
}>;
|
|
17
36
|
/**
|
|
18
37
|
* Main consolidate command handler
|
|
19
38
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"consolidate.d.ts","sourceRoot":"","sources":["../../../src/commands/app/consolidate.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"consolidate.d.ts","sourceRoot":"","sources":["../../../src/commands/app/consolidate.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC;AAyBlC,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAGvD;;;;;GAKG;AAEH,UAAU,kBAAmB,SAAQ,aAAa;IAChD,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,OAAO,CAAC;IACnB,GAAG,EAAE,OAAO,CAAC;IACb,aAAa,EAAE,OAAO,CAAC;IACvB,aAAa,EAAE,OAAO,CAAC;IACvB,KAAK,EAAE,OAAO,CAAC;CAChB;AAWD;;GAEG;AACH,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,IAAI;;;;;;;;;;;;;;GA0DlD;AAED;;GAEG;AACH,wBAAsB,kBAAkB,CAAC,OAAO,EAAE,kBAAkB,GAAG,OAAO,CAAC,IAAI,CAAC,CA2GnF"}
|
|
@@ -9,6 +9,69 @@ import { createBackup, withFileLock } from '../../utils/backupManager.js';
|
|
|
9
9
|
import { getAppBackupDir } from '../../constants.js';
|
|
10
10
|
import { McpConfigManager } from '../../config/mcpConfigManager.js';
|
|
11
11
|
import { setServer } from '../mcp/utils/configUtils.js';
|
|
12
|
+
import { generateSupportedAppsHelp } from '../../utils/appPresets.js';
|
|
13
|
+
/**
|
|
14
|
+
* Build the consolidate command configuration
|
|
15
|
+
*/
|
|
16
|
+
export function buildConsolidateCommand(yargs) {
|
|
17
|
+
return yargs
|
|
18
|
+
.positional('app-name', {
|
|
19
|
+
describe: 'Desktop app(s) to consolidate (claude-desktop, cursor, vscode, etc.)',
|
|
20
|
+
type: 'string',
|
|
21
|
+
array: true,
|
|
22
|
+
default: [],
|
|
23
|
+
})
|
|
24
|
+
.option('url', {
|
|
25
|
+
describe: 'Override auto-detected 1mcp server URL',
|
|
26
|
+
type: 'string',
|
|
27
|
+
alias: 'u',
|
|
28
|
+
})
|
|
29
|
+
.option('dry-run', {
|
|
30
|
+
describe: 'Preview changes without making them',
|
|
31
|
+
type: 'boolean',
|
|
32
|
+
default: false,
|
|
33
|
+
})
|
|
34
|
+
.option('yes', {
|
|
35
|
+
describe: 'Skip confirmation prompts (for automation)',
|
|
36
|
+
type: 'boolean',
|
|
37
|
+
default: false,
|
|
38
|
+
alias: 'y',
|
|
39
|
+
})
|
|
40
|
+
.option('manual-only', {
|
|
41
|
+
describe: 'Show manual setup instructions only',
|
|
42
|
+
type: 'boolean',
|
|
43
|
+
default: false,
|
|
44
|
+
})
|
|
45
|
+
.option('backup-only', {
|
|
46
|
+
describe: 'Create backup without replacing config',
|
|
47
|
+
type: 'boolean',
|
|
48
|
+
default: false,
|
|
49
|
+
})
|
|
50
|
+
.option('force', {
|
|
51
|
+
describe: 'Skip validation warnings',
|
|
52
|
+
type: 'boolean',
|
|
53
|
+
default: false,
|
|
54
|
+
alias: 'f',
|
|
55
|
+
})
|
|
56
|
+
.example([
|
|
57
|
+
['$0 app consolidate claude-desktop', 'Consolidate Claude Desktop MCP servers into 1mcp'],
|
|
58
|
+
['$0 app consolidate cursor --dry-run', 'Preview consolidation for Cursor'],
|
|
59
|
+
['$0 app consolidate vscode --url=http://localhost:3051/mcp', 'Use custom 1mcp URL'],
|
|
60
|
+
['$0 app consolidate claude-desktop cursor vscode', 'Consolidate multiple apps at once'],
|
|
61
|
+
]).epilogue(`
|
|
62
|
+
WHAT IT DOES:
|
|
63
|
+
1. Extracts MCP server configurations from app config files
|
|
64
|
+
2. Imports those servers into your 1mcp configuration
|
|
65
|
+
3. Replaces app config with single 1mcp connection
|
|
66
|
+
4. Creates backup of original app configuration
|
|
67
|
+
|
|
68
|
+
EXAMPLE WORKFLOW:
|
|
69
|
+
Before: Claude Desktop → [filesystem, postgres, sequential] servers directly
|
|
70
|
+
After: Claude Desktop → 1mcp → [filesystem, postgres, sequential] servers
|
|
71
|
+
|
|
72
|
+
${generateSupportedAppsHelp()}
|
|
73
|
+
`);
|
|
74
|
+
}
|
|
12
75
|
/**
|
|
13
76
|
* Main consolidate command handler
|
|
14
77
|
*/
|