@apify/mcpc 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/.claude/settings.local.json +36 -0
- package/.eslintrc.json +44 -0
- package/.idea/codeStyles/Project.xml +60 -0
- package/.idea/codeStyles/codeStyleConfig.xml +5 -0
- package/.idea/inspectionProfiles/Project_Default.xml +11 -0
- package/.idea/prettier.xml +6 -0
- package/.idea/vcs.xml +6 -0
- package/.idea/workspace.xml +572 -0
- package/LICENSE +201 -0
- package/PHASE1-SUMMARY.md +269 -0
- package/PUBLISHING.md +111 -0
- package/README.md +1056 -0
- package/TESTING.md +212 -0
- package/TODOs.md +94 -0
- package/bin/mcpc +9 -0
- package/bin/mcpc-bridge +9 -0
- package/dist/bridge/index.d.ts +3 -0
- package/dist/bridge/index.d.ts.map +1 -0
- package/dist/bridge/index.js +587 -0
- package/dist/bridge/index.js.map +1 -0
- package/dist/cli/commands/auth.d.ts +9 -0
- package/dist/cli/commands/auth.d.ts.map +1 -0
- package/dist/cli/commands/auth.js +81 -0
- package/dist/cli/commands/auth.js.map +1 -0
- package/dist/cli/commands/clean.d.ts +11 -0
- package/dist/cli/commands/clean.d.ts.map +1 -0
- package/dist/cli/commands/clean.js +224 -0
- package/dist/cli/commands/clean.js.map +1 -0
- package/dist/cli/commands/index.d.ts +8 -0
- package/dist/cli/commands/index.d.ts.map +1 -0
- package/dist/cli/commands/index.js +8 -0
- package/dist/cli/commands/index.js.map +1 -0
- package/dist/cli/commands/logging.d.ts +3 -0
- package/dist/cli/commands/logging.d.ts.map +1 -0
- package/dist/cli/commands/logging.js +22 -0
- package/dist/cli/commands/logging.js.map +1 -0
- package/dist/cli/commands/prompts.d.ts +6 -0
- package/dist/cli/commands/prompts.d.ts.map +1 -0
- package/dist/cli/commands/prompts.js +27 -0
- package/dist/cli/commands/prompts.js.map +1 -0
- package/dist/cli/commands/resources.d.ts +11 -0
- package/dist/cli/commands/resources.d.ts.map +1 -0
- package/dist/cli/commands/resources.js +70 -0
- package/dist/cli/commands/resources.js.map +1 -0
- package/dist/cli/commands/sessions.d.ts +28 -0
- package/dist/cli/commands/sessions.d.ts.map +1 -0
- package/dist/cli/commands/sessions.js +356 -0
- package/dist/cli/commands/sessions.js.map +1 -0
- package/dist/cli/commands/tools.d.ts +8 -0
- package/dist/cli/commands/tools.d.ts.map +1 -0
- package/dist/cli/commands/tools.js +54 -0
- package/dist/cli/commands/tools.js.map +1 -0
- package/dist/cli/commands/utilities.d.ts +3 -0
- package/dist/cli/commands/utilities.d.ts.map +1 -0
- package/dist/cli/commands/utilities.js +20 -0
- package/dist/cli/commands/utilities.js.map +1 -0
- package/dist/cli/helpers.d.ts +18 -0
- package/dist/cli/helpers.d.ts.map +1 -0
- package/dist/cli/helpers.js +165 -0
- package/dist/cli/helpers.js.map +1 -0
- package/dist/cli/index.d.ts +3 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +326 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/cli/output.d.ts +18 -0
- package/dist/cli/output.d.ts.map +1 -0
- package/dist/cli/output.js +221 -0
- package/dist/cli/output.js.map +1 -0
- package/dist/cli/parser.d.ts +19 -0
- package/dist/cli/parser.d.ts.map +1 -0
- package/dist/cli/parser.js +168 -0
- package/dist/cli/parser.js.map +1 -0
- package/dist/cli/shell-parser.d.ts +5 -0
- package/dist/cli/shell-parser.d.ts.map +1 -0
- package/dist/cli/shell-parser.js +38 -0
- package/dist/cli/shell-parser.js.map +1 -0
- package/dist/cli/shell.d.ts +2 -0
- package/dist/cli/shell.d.ts.map +1 -0
- package/dist/cli/shell.js +277 -0
- package/dist/cli/shell.js.map +1 -0
- package/dist/cli/tool-result.d.ts +2 -0
- package/dist/cli/tool-result.d.ts.map +1 -0
- package/dist/cli/tool-result.js +19 -0
- package/dist/cli/tool-result.js.map +1 -0
- package/dist/core/factory.d.ts +19 -0
- package/dist/core/factory.d.ts.map +1 -0
- package/dist/core/factory.js +55 -0
- package/dist/core/factory.js.map +1 -0
- package/dist/core/index.d.ts +4 -0
- package/dist/core/index.d.ts.map +1 -0
- package/dist/core/index.js +4 -0
- package/dist/core/index.js.map +1 -0
- package/dist/core/mcp-client.d.ts +30 -0
- package/dist/core/mcp-client.d.ts.map +1 -0
- package/dist/core/mcp-client.js +215 -0
- package/dist/core/mcp-client.js.map +1 -0
- package/dist/core/transports.d.ts +12 -0
- package/dist/core/transports.d.ts.map +1 -0
- package/dist/core/transports.js +65 -0
- package/dist/core/transports.js.map +1 -0
- package/dist/lib/auth/auth-profiles.d.ts +7 -0
- package/dist/lib/auth/auth-profiles.d.ts.map +1 -0
- package/dist/lib/auth/auth-profiles.js +105 -0
- package/dist/lib/auth/auth-profiles.js.map +1 -0
- package/dist/lib/auth/keychain.d.ts +22 -0
- package/dist/lib/auth/keychain.d.ts.map +1 -0
- package/dist/lib/auth/keychain.js +92 -0
- package/dist/lib/auth/keychain.js.map +1 -0
- package/dist/lib/auth/oauth-flow.d.ts +7 -0
- package/dist/lib/auth/oauth-flow.d.ts.map +1 -0
- package/dist/lib/auth/oauth-flow.js +236 -0
- package/dist/lib/auth/oauth-flow.js.map +1 -0
- package/dist/lib/auth/oauth-provider.d.ts +24 -0
- package/dist/lib/auth/oauth-provider.d.ts.map +1 -0
- package/dist/lib/auth/oauth-provider.js +144 -0
- package/dist/lib/auth/oauth-provider.js.map +1 -0
- package/dist/lib/auth/oauth-token-manager.d.ts +25 -0
- package/dist/lib/auth/oauth-token-manager.d.ts.map +1 -0
- package/dist/lib/auth/oauth-token-manager.js +70 -0
- package/dist/lib/auth/oauth-token-manager.js.map +1 -0
- package/dist/lib/auth/oauth-utils.d.ts +14 -0
- package/dist/lib/auth/oauth-utils.d.ts.map +1 -0
- package/dist/lib/auth/oauth-utils.js +68 -0
- package/dist/lib/auth/oauth-utils.js.map +1 -0
- package/dist/lib/auth/token-refresh.d.ts +2 -0
- package/dist/lib/auth/token-refresh.d.ts.map +1 -0
- package/dist/lib/auth/token-refresh.js +70 -0
- package/dist/lib/auth/token-refresh.js.map +1 -0
- package/dist/lib/bridge-client.d.ts +23 -0
- package/dist/lib/bridge-client.d.ts.map +1 -0
- package/dist/lib/bridge-client.js +181 -0
- package/dist/lib/bridge-client.js.map +1 -0
- package/dist/lib/bridge-manager.d.ts +17 -0
- package/dist/lib/bridge-manager.d.ts.map +1 -0
- package/dist/lib/bridge-manager.js +240 -0
- package/dist/lib/bridge-manager.js.map +1 -0
- package/dist/lib/config.d.ts +6 -0
- package/dist/lib/config.d.ts.map +1 -0
- package/dist/lib/config.js +116 -0
- package/dist/lib/config.js.map +1 -0
- package/dist/lib/errors.d.ts +23 -0
- package/dist/lib/errors.d.ts.map +1 -0
- package/dist/lib/errors.js +81 -0
- package/dist/lib/errors.js.map +1 -0
- package/dist/lib/file-lock.d.ts +2 -0
- package/dist/lib/file-lock.d.ts.map +1 -0
- package/dist/lib/file-lock.js +46 -0
- package/dist/lib/file-lock.js.map +1 -0
- package/dist/lib/file-logger.d.ts +19 -0
- package/dist/lib/file-logger.d.ts.map +1 -0
- package/dist/lib/file-logger.js +126 -0
- package/dist/lib/file-logger.js.map +1 -0
- package/dist/lib/index.d.ts +6 -0
- package/dist/lib/index.d.ts.map +1 -0
- package/dist/lib/index.js +6 -0
- package/dist/lib/index.js.map +1 -0
- package/dist/lib/logger.d.ts +24 -0
- package/dist/lib/logger.d.ts.map +1 -0
- package/dist/lib/logger.js +189 -0
- package/dist/lib/logger.js.map +1 -0
- package/dist/lib/session-client.d.ts +28 -0
- package/dist/lib/session-client.d.ts.map +1 -0
- package/dist/lib/session-client.js +104 -0
- package/dist/lib/session-client.js.map +1 -0
- package/dist/lib/sessions.d.ts +9 -0
- package/dist/lib/sessions.d.ts.map +1 -0
- package/dist/lib/sessions.js +116 -0
- package/dist/lib/sessions.js.map +1 -0
- package/dist/lib/types.d.ts +117 -0
- package/dist/lib/types.d.ts.map +1 -0
- package/dist/lib/types.js +2 -0
- package/dist/lib/types.js.map +1 -0
- package/dist/lib/utils.d.ts +29 -0
- package/dist/lib/utils.d.ts.map +1 -0
- package/dist/lib/utils.js +173 -0
- package/dist/lib/utils.js.map +1 -0
- package/package.json +71 -0
- package/tsconfig.test.json +11 -0
package/TESTING.md
ADDED
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
# Quick Testing Guide for mcpc
|
|
2
|
+
|
|
3
|
+
This guide provides quick commands to test the current implementation of mcpc.
|
|
4
|
+
|
|
5
|
+
## Prerequisites
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install
|
|
9
|
+
npm run build
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
## Quick Tests
|
|
13
|
+
|
|
14
|
+
### 1. Help and Version
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
# Show help
|
|
18
|
+
node dist/cli/index.js --help
|
|
19
|
+
|
|
20
|
+
# Show version
|
|
21
|
+
node dist/cli/index.js --version
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
### 2. HTTP URL Targets
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
# Try to connect to a URL (will fail - no real server)
|
|
28
|
+
node dist/cli/index.js https://example.com/mcp tools-list
|
|
29
|
+
|
|
30
|
+
# With verbose logging
|
|
31
|
+
node dist/cli/index.js https://example.com/mcp --verbose tools-list
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
### 3. Config File Loading
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
# List servers in config
|
|
38
|
+
cat examples/test-config.json
|
|
39
|
+
|
|
40
|
+
# Use HTTP server from config (will fail to connect)
|
|
41
|
+
node dist/cli/index.js --config examples/test-config.json example-http tools-list
|
|
42
|
+
|
|
43
|
+
# Try non-existent server (shows error)
|
|
44
|
+
node dist/cli/index.js --config examples/test-config.json bad-server tools-list
|
|
45
|
+
|
|
46
|
+
# Test environment variable substitution
|
|
47
|
+
EXAMPLE_API_TOKEN=secret123 node dist/cli/index.js \
|
|
48
|
+
--config examples/test-config.json example-http tools-list
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
### 4. Package Resolution
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
# Create test package in node_modules
|
|
55
|
+
mkdir -p node_modules/example-mcp-server
|
|
56
|
+
cp -r examples/test-package/* node_modules/example-mcp-server/
|
|
57
|
+
|
|
58
|
+
# Try to use the package (will fail - not a real MCP server)
|
|
59
|
+
node dist/cli/index.js example-mcp-server tools-list
|
|
60
|
+
|
|
61
|
+
# Try non-existent package (shows helpful error)
|
|
62
|
+
node dist/cli/index.js nonexistent-package tools-list
|
|
63
|
+
|
|
64
|
+
# With verbose to see resolution details
|
|
65
|
+
node dist/cli/index.js example-mcp-server --verbose tools-list
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
### 5. Named Sessions (Not Implemented)
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
# Try named session (shows "not implemented")
|
|
72
|
+
node dist/cli/index.js @my-session tools-list
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
## Real MCP Server Testing
|
|
76
|
+
|
|
77
|
+
To test with an actual MCP server, you can:
|
|
78
|
+
|
|
79
|
+
### Option 1: Install an official MCP server package
|
|
80
|
+
|
|
81
|
+
```bash
|
|
82
|
+
# Install a real MCP server (example - adjust as needed)
|
|
83
|
+
npm install -g @modelcontextprotocol/server-filesystem
|
|
84
|
+
|
|
85
|
+
# Use it with mcpc
|
|
86
|
+
mcpc @modelcontextprotocol/server-filesystem tools-list
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
### Option 2: Use a remote MCP server
|
|
90
|
+
|
|
91
|
+
```bash
|
|
92
|
+
# If you have access to a real MCP server URL
|
|
93
|
+
mcpc https://your-mcp-server.com tools-list
|
|
94
|
+
mcpc https://your-mcp-server.com resources-list
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
### Option 3: Create a config file for your servers
|
|
98
|
+
|
|
99
|
+
```json
|
|
100
|
+
{
|
|
101
|
+
"mcpServers": {
|
|
102
|
+
"my-server": {
|
|
103
|
+
"url": "https://my-real-mcp-server.com",
|
|
104
|
+
"headers": {
|
|
105
|
+
"Authorization": "Bearer ${MY_API_KEY}"
|
|
106
|
+
}
|
|
107
|
+
},
|
|
108
|
+
"filesystem": {
|
|
109
|
+
"command": "npx",
|
|
110
|
+
"args": ["-y", "@modelcontextprotocol/server-filesystem", "/tmp"]
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
Then use it:
|
|
117
|
+
```bash
|
|
118
|
+
MY_API_KEY=secret mcpc --config my-config.json my-server tools-list
|
|
119
|
+
mcpc --config my-config.json filesystem resources-list
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
## Unit Tests
|
|
123
|
+
|
|
124
|
+
```bash
|
|
125
|
+
# Run all tests
|
|
126
|
+
npm test
|
|
127
|
+
|
|
128
|
+
# Run specific test file
|
|
129
|
+
npm test -- test/lib/config.test.ts
|
|
130
|
+
npm test -- test/lib/logger.test.ts
|
|
131
|
+
|
|
132
|
+
# Run with coverage
|
|
133
|
+
npm run test:coverage
|
|
134
|
+
|
|
135
|
+
# Watch mode
|
|
136
|
+
npm run test:watch
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
## Linting
|
|
140
|
+
|
|
141
|
+
```bash
|
|
142
|
+
# Check for issues
|
|
143
|
+
npm run lint
|
|
144
|
+
|
|
145
|
+
# Auto-fix issues
|
|
146
|
+
npm run lint:fix
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
## Expected Behaviors
|
|
150
|
+
|
|
151
|
+
### ✅ Should Work
|
|
152
|
+
|
|
153
|
+
- CLI help and version display
|
|
154
|
+
- HTTP URL parsing and resolution
|
|
155
|
+
- Config file loading and parsing
|
|
156
|
+
- Environment variable substitution in configs
|
|
157
|
+
- Package discovery in node_modules
|
|
158
|
+
- Global package discovery (npm and Bun)
|
|
159
|
+
- Clear error messages for missing files/packages
|
|
160
|
+
- Verbose logging with --verbose flag
|
|
161
|
+
|
|
162
|
+
### ❌ Will Fail (Expected)
|
|
163
|
+
|
|
164
|
+
These will fail because they require actual MCP servers:
|
|
165
|
+
|
|
166
|
+
- Connecting to example.com (not an MCP server)
|
|
167
|
+
- Using the test package (doesn't implement MCP protocol)
|
|
168
|
+
- Any command that needs actual MCP communication
|
|
169
|
+
|
|
170
|
+
These will fail because they're not implemented yet:
|
|
171
|
+
|
|
172
|
+
- Named sessions (@session-name)
|
|
173
|
+
- Session commands (connect, close)
|
|
174
|
+
- Interactive shell
|
|
175
|
+
|
|
176
|
+
## Troubleshooting
|
|
177
|
+
|
|
178
|
+
### "Package not found" error
|
|
179
|
+
- Make sure the package is installed in node_modules or globally
|
|
180
|
+
- Check the package name spelling
|
|
181
|
+
- Verify package.json exists in the package
|
|
182
|
+
|
|
183
|
+
### "Config file not found" error
|
|
184
|
+
- Check the path to the config file
|
|
185
|
+
- Use absolute path or path relative to current directory
|
|
186
|
+
|
|
187
|
+
### "Server not found in config" error
|
|
188
|
+
- Check the server name matches exactly (case-sensitive)
|
|
189
|
+
- List available servers in the error message
|
|
190
|
+
|
|
191
|
+
### "Failed to connect" error
|
|
192
|
+
- This is expected when testing with non-real MCP servers
|
|
193
|
+
- Use a real MCP server URL or package to test actual connections
|
|
194
|
+
|
|
195
|
+
## What's Next
|
|
196
|
+
|
|
197
|
+
After confirming tests work, you can proceed with:
|
|
198
|
+
|
|
199
|
+
**Phase 2: Bridge & Sessions**
|
|
200
|
+
- Persistent MCP connections
|
|
201
|
+
- Session management
|
|
202
|
+
- Unix socket IPC
|
|
203
|
+
|
|
204
|
+
**Phase 3: Authentication**
|
|
205
|
+
- OAuth 2.1 support
|
|
206
|
+
- Keychain integration
|
|
207
|
+
- Auth profile management
|
|
208
|
+
|
|
209
|
+
**Phase 4: Enhancements**
|
|
210
|
+
- Interactive shell
|
|
211
|
+
- Caching
|
|
212
|
+
- Tab completion
|
package/TODOs.md
ADDED
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
|
|
2
|
+
# TODOs
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Bugs
|
|
6
|
+
- Seems calling invalid/unknown MCP command in shell (perhaps also normally) causes the bridge to be flagged as expired
|
|
7
|
+
|
|
8
|
+
- reconnection doesn't work
|
|
9
|
+
mcpc @apify session 1 ✘
|
|
10
|
+
error: missing required argument 'name'
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
## Next
|
|
15
|
+
|
|
16
|
+
- nit: consistent good server and session info, on server/session info, print also auth info
|
|
17
|
+
- [Using session: apify-docs] => change to show server + transport + version? + auth info!!!
|
|
18
|
+
Active MCP sessions:
|
|
19
|
+
@fs → npx (stdio) --- show also args instead of just "npx"
|
|
20
|
+
- print PID of bridge process
|
|
21
|
+
|
|
22
|
+
Visual examples:
|
|
23
|
+
|
|
24
|
+
Xxx/
|
|
25
|
+
├── run.sh # Master runner (parallel by suite)
|
|
26
|
+
├── lib/
|
|
27
|
+
│ ├── common.sh # Assertions, temp dirs, cleanup
|
|
28
|
+
│ ├── server.sh # Start/stop test server helpers
|
|
29
|
+
│ └── mcpc.sh # Wrapper to invoke mcpc with coverage
|
|
30
|
+
├── fixtures/
|
|
31
|
+
│ └── configs/ # Test config files
|
|
32
|
+
├── server/
|
|
33
|
+
│ └── index.ts # Configurable test MCP server
|
|
34
|
+
│
|
|
35
|
+
|
|
36
|
+
* ▐▛███▜▌ * Claude Code v2.0.75
|
|
37
|
+
* ▝▜█████▛▘ * Opus 4.5 · Claude Team
|
|
38
|
+
* ▘▘ ▝▝ * ~/Projects/mcpc
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
- Better error handling:
|
|
42
|
+
- "mcpc https://mcp.sentry.dev/mcp" with an unknown sever => should hint to use "login"
|
|
43
|
+
- Handle MCP errors by failing the command tool, e.g. invalid tool name..
|
|
44
|
+
|
|
45
|
+
- implement resources-subscribe/resources-unsubscribe command properly
|
|
46
|
+
- > # TODO: automatically update the -o file on changes, without it just keep track of changed files in bridge process' cache, and report in resources-list
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
## Security
|
|
50
|
+
- Double-check the MCP security guidelines
|
|
51
|
+
- OAuth issuer - maybe save it and double-check it to ensure domain is not spoofed?
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
## Later
|
|
55
|
+
|
|
56
|
+
- nit: Colorize output, e.g. JSONs in one color. MCP provided data like descriptions and instructions in orange.
|
|
57
|
+
- warnings could be orange, errors red
|
|
58
|
+
- - docs: add Claude Skills file to /docs, maybe also man page?
|
|
59
|
+
- Add support for MCP elicitations, and potentially for sampling (e.g. via shell interface?)
|
|
60
|
+
- Add `--proxy [HOST:]PORT` feature to `connect` command to enable MCP proxy:
|
|
61
|
+
- `--proxy-bearer-token X` to require auth token for better security
|
|
62
|
+
- `--proxy-capabilities tools:TOOL_NAME,TOOL_NAME2,...,prompts[:...],...` to limit access to selected MCP features and tools
|
|
63
|
+
(what if tools have ":" or "," in their names?)
|
|
64
|
+
In theory, we could add limit of capabilities to normal sessions, but the LLM could still break out of it, so what's the point.
|
|
65
|
+
- Explain this is useful for AI sandboxing!
|
|
66
|
+
- Implement typing completions (e.g. "mcpc @a...") - not sure how difficult that is
|
|
67
|
+
- nit: Nicer OAuth flow finish web page, add Apify example there. E.g. next step - check Apify rather than close
|
|
68
|
+
- nit: cooler OAuth web pages "Authentication successful!" - show mcpc info
|
|
69
|
+
- audit that on every command, we print next steps as examples
|
|
70
|
+
- more shortcuts, e.g. --profile => -p
|
|
71
|
+
- nit: in README, explain the MCP commands better in a standlone section, with details how they work
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
## E2E test scenarios
|
|
76
|
+
- add end-to-end tests e.g. under `test/e2e` - one bash script per test suite , organized in directories, and one master script that runs them all or selected ones (per directory) in parallel
|
|
77
|
+
- Invariants:
|
|
78
|
+
- --verbose only adds extra info to stderr, never to stdout
|
|
79
|
+
- --json always returns single JSON object to stdout on success (exit code = 0), or an object or nothing at all on error (exit code != 0)
|
|
80
|
+
- We'll need a testing server with all the available features and configurable, for testing.
|
|
81
|
+
- Things to test:
|
|
82
|
+
- handling of errors, invalid params, names, etc.
|
|
83
|
+
- pagination
|
|
84
|
+
- env vars...
|
|
85
|
+
- stdio + filesystem operations,
|
|
86
|
+
- sessions
|
|
87
|
+
- for all commands, tests --verbose doesn't print anything extra to stdout, --json returns json
|
|
88
|
+
- that on session close we send HTTP DELETE https://modelcontextprotocol.io/specification/2025-11-25/basic/transports#session-management
|
|
89
|
+
- Test session failover - e.g. kill the bridge process, and try to access the session again (should be restarted)
|
|
90
|
+
- Test server session aborting - if session is aborted by server, bridge process should exit and set session status to "expired"
|
|
91
|
+
- Test auth profiles work long-term and sessions too
|
|
92
|
+
- Can we track test coverage also this way?
|
|
93
|
+
- Text copy can change, but the core texts needs to be shown in both text and JSON mode
|
|
94
|
+
|
package/bin/mcpc
ADDED
package/bin/mcpc-bridge
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
// Bridge process executable for mcpc
|
|
4
|
+
// This wrapper imports the compiled TypeScript bridge entry point
|
|
5
|
+
|
|
6
|
+
import('../dist/bridge/index.js').catch((err) => {
|
|
7
|
+
console.error('Failed to load mcpc-bridge:', err.message);
|
|
8
|
+
process.exit(1);
|
|
9
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/bridge/index.ts"],"names":[],"mappings":""}
|