@meldocio/mcp-stdio-proxy 1.0.10 → 1.0.12
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 +20 -20
- package/bin/cli.js +18 -15
- package/bin/meldoc-mcp-proxy.js +8 -8
- package/package.json +4 -1
package/README.md
CHANGED
|
@@ -65,7 +65,7 @@ Completely close and reopen Claude Desktop for the changes to take effect.
|
|
|
65
65
|
Open a terminal and run:
|
|
66
66
|
|
|
67
67
|
```bash
|
|
68
|
-
npx @
|
|
68
|
+
npx @meldocio/mcp-stdio-proxy@latest auth login
|
|
69
69
|
```
|
|
70
70
|
|
|
71
71
|
Follow the on-screen instructions - you'll need to open a link in your browser and enter a code.
|
|
@@ -81,7 +81,7 @@ For Claude to work with your documentation, you need to log in to your Meldoc ac
|
|
|
81
81
|
The easiest way is to use the login command:
|
|
82
82
|
|
|
83
83
|
```bash
|
|
84
|
-
npx @
|
|
84
|
+
npx @meldocio/mcp-stdio-proxy@latest auth login
|
|
85
85
|
```
|
|
86
86
|
|
|
87
87
|
**What will happen:**
|
|
@@ -128,7 +128,7 @@ export MELDOC_ACCESS_TOKEN=your_token_here
|
|
|
128
128
|
To check if you're logged in:
|
|
129
129
|
|
|
130
130
|
```bash
|
|
131
|
-
npx @
|
|
131
|
+
npx @meldocio/mcp-stdio-proxy@latest auth status
|
|
132
132
|
```
|
|
133
133
|
|
|
134
134
|
### Logging out
|
|
@@ -136,7 +136,7 @@ npx @meldoc/mcp@latest auth status
|
|
|
136
136
|
To log out and remove saved data:
|
|
137
137
|
|
|
138
138
|
```bash
|
|
139
|
-
npx @
|
|
139
|
+
npx @meldocio/mcp-stdio-proxy@latest auth logout
|
|
140
140
|
```
|
|
141
141
|
|
|
142
142
|
### Automatic token refresh
|
|
@@ -159,8 +159,8 @@ Yes, but you need to switch between them using the `auth logout` and `auth login
|
|
|
159
159
|
|
|
160
160
|
### What to do if something doesn't work?
|
|
161
161
|
|
|
162
|
-
1. Check that you're logged in: `npx @
|
|
163
|
-
2. Check workspace: `npx @
|
|
162
|
+
1. Check that you're logged in: `npx @meldocio/mcp-stdio-proxy@latest auth status`
|
|
163
|
+
2. Check workspace: `npx @meldocio/mcp-stdio-proxy@latest config get-workspace`
|
|
164
164
|
3. See the "Troubleshooting" section above
|
|
165
165
|
4. If nothing helps, create an issue on GitHub
|
|
166
166
|
|
|
@@ -190,13 +190,13 @@ When you ask Claude to do something with your documentation:
|
|
|
190
190
|
|
|
191
191
|
```bash
|
|
192
192
|
# Log in to account (browser will open)
|
|
193
|
-
npx @
|
|
193
|
+
npx @meldocio/mcp-stdio-proxy@latest auth login
|
|
194
194
|
|
|
195
195
|
# Check if you're logged in
|
|
196
|
-
npx @
|
|
196
|
+
npx @meldocio/mcp-stdio-proxy@latest auth status
|
|
197
197
|
|
|
198
198
|
# Log out of account
|
|
199
|
-
npx @
|
|
199
|
+
npx @meldocio/mcp-stdio-proxy@latest auth logout
|
|
200
200
|
```
|
|
201
201
|
|
|
202
202
|
### Workspace management commands
|
|
@@ -205,20 +205,20 @@ If you have multiple workspaces, you can manage them:
|
|
|
205
205
|
|
|
206
206
|
```bash
|
|
207
207
|
# View all available workspaces
|
|
208
|
-
npx @
|
|
208
|
+
npx @meldocio/mcp-stdio-proxy@latest config list-workspaces
|
|
209
209
|
|
|
210
210
|
# Set default workspace
|
|
211
|
-
npx @
|
|
211
|
+
npx @meldocio/mcp-stdio-proxy@latest config set-workspace workspace-name
|
|
212
212
|
|
|
213
213
|
# View current workspace
|
|
214
|
-
npx @
|
|
214
|
+
npx @meldocio/mcp-stdio-proxy@latest config get-workspace
|
|
215
215
|
```
|
|
216
216
|
|
|
217
217
|
### Help
|
|
218
218
|
|
|
219
219
|
```bash
|
|
220
220
|
# Show all available commands
|
|
221
|
-
npx @
|
|
221
|
+
npx @meldocio/mcp-stdio-proxy@latest help
|
|
222
222
|
```
|
|
223
223
|
|
|
224
224
|
## Working with Workspaces
|
|
@@ -239,7 +239,7 @@ The system selects a workspace in this order:
|
|
|
239
239
|
If you have multiple workspaces, set one as default:
|
|
240
240
|
|
|
241
241
|
```bash
|
|
242
|
-
npx @
|
|
242
|
+
npx @meldocio/mcp-stdio-proxy@latest config set-workspace workspace-name
|
|
243
243
|
```
|
|
244
244
|
|
|
245
245
|
After this, Claude will automatically use this workspace.
|
|
@@ -303,13 +303,13 @@ Claude will automatically select the right tool and execute the request.
|
|
|
303
303
|
1. Run the login command:
|
|
304
304
|
|
|
305
305
|
```bash
|
|
306
|
-
npx @
|
|
306
|
+
npx @meldocio/mcp-stdio-proxy@latest auth login
|
|
307
307
|
```
|
|
308
308
|
|
|
309
309
|
2. Or check if you're logged in:
|
|
310
310
|
|
|
311
311
|
```bash
|
|
312
|
-
npx @
|
|
312
|
+
npx @meldocio/mcp-stdio-proxy@latest auth status
|
|
313
313
|
```
|
|
314
314
|
|
|
315
315
|
3. If using a token directly, make sure it's specified in Claude Desktop configuration
|
|
@@ -323,13 +323,13 @@ If you have multiple workspaces, you need to specify which one to use:
|
|
|
323
323
|
1. View the list of available workspaces:
|
|
324
324
|
|
|
325
325
|
```bash
|
|
326
|
-
npx @
|
|
326
|
+
npx @meldocio/mcp-stdio-proxy@latest config list-workspaces
|
|
327
327
|
```
|
|
328
328
|
|
|
329
329
|
2. Set one as default:
|
|
330
330
|
|
|
331
331
|
```bash
|
|
332
|
-
npx @
|
|
332
|
+
npx @meldocio/mcp-stdio-proxy@latest config set-workspace workspace-name
|
|
333
333
|
```
|
|
334
334
|
|
|
335
335
|
### Error: "Invalid token" - invalid token
|
|
@@ -339,13 +339,13 @@ If you have multiple workspaces, you need to specify which one to use:
|
|
|
339
339
|
1. If you used `auth login`, just log in again:
|
|
340
340
|
|
|
341
341
|
```bash
|
|
342
|
-
npx @
|
|
342
|
+
npx @meldocio/mcp-stdio-proxy@latest auth login
|
|
343
343
|
```
|
|
344
344
|
|
|
345
345
|
2. Check status:
|
|
346
346
|
|
|
347
347
|
```bash
|
|
348
|
-
npx @
|
|
348
|
+
npx @meldocio/mcp-stdio-proxy@latest auth status
|
|
349
349
|
```
|
|
350
350
|
|
|
351
351
|
3. If using a token manually, make sure it hasn't expired and is specified correctly
|
package/bin/cli.js
CHANGED
|
@@ -64,7 +64,7 @@ async function handleAuthStatus() {
|
|
|
64
64
|
if (!status || !status.authenticated) {
|
|
65
65
|
logger.error('Not authenticated');
|
|
66
66
|
console.log('\n' + logger.label('To authenticate, run:'));
|
|
67
|
-
console.log(' ' + logger.highlight('npx @
|
|
67
|
+
console.log(' ' + logger.highlight('npx @meldocio/mcp-stdio-proxy auth login') + '\n');
|
|
68
68
|
process.exit(1);
|
|
69
69
|
}
|
|
70
70
|
|
|
@@ -99,7 +99,7 @@ function handleConfigSetWorkspace(alias) {
|
|
|
99
99
|
if (!alias) {
|
|
100
100
|
logger.error('Workspace alias is required');
|
|
101
101
|
console.log('\n' + logger.label('Usage:'));
|
|
102
|
-
console.log(' ' + logger.highlight('npx @
|
|
102
|
+
console.log(' ' + logger.highlight('npx @meldocio/mcp-stdio-proxy config set-workspace <alias>') + '\n');
|
|
103
103
|
process.exit(1);
|
|
104
104
|
}
|
|
105
105
|
|
|
@@ -133,7 +133,7 @@ async function handleConfigListWorkspaces() {
|
|
|
133
133
|
if (!tokenInfo) {
|
|
134
134
|
logger.error('Not authenticated');
|
|
135
135
|
console.log('\n' + logger.label('To authenticate, run:'));
|
|
136
|
-
console.log(' ' + logger.highlight('npx @
|
|
136
|
+
console.log(' ' + logger.highlight('npx @meldocio/mcp-stdio-proxy auth login') + '\n');
|
|
137
137
|
process.exit(1);
|
|
138
138
|
}
|
|
139
139
|
|
|
@@ -184,7 +184,7 @@ async function handleConfigListWorkspaces() {
|
|
|
184
184
|
if (errorData.code === 'AUTH_REQUIRED' || errorData.data?.code === 'AUTH_REQUIRED') {
|
|
185
185
|
logger.error('Not authenticated');
|
|
186
186
|
console.log('\n' + logger.label('To authenticate, run:'));
|
|
187
|
-
console.log(' ' + logger.highlight('npx @
|
|
187
|
+
console.log(' ' + logger.highlight('npx @meldocio/mcp-stdio-proxy auth login') + '\n');
|
|
188
188
|
process.exit(1);
|
|
189
189
|
}
|
|
190
190
|
logger.error(`Error: ${errorData.message || error.message}`);
|
|
@@ -234,9 +234,9 @@ function handleHelp() {
|
|
|
234
234
|
console.log();
|
|
235
235
|
|
|
236
236
|
console.log(logger.label('Examples:'));
|
|
237
|
-
console.log(' ' + logger.highlight('npx @
|
|
238
|
-
console.log(' ' + logger.highlight('npx @
|
|
239
|
-
console.log(' ' + logger.highlight('npx @
|
|
237
|
+
console.log(' ' + logger.highlight('npx @meldocio/mcp-stdio-proxy auth login'));
|
|
238
|
+
console.log(' ' + logger.highlight('npx @meldocio/mcp-stdio-proxy config set-workspace my-workspace'));
|
|
239
|
+
console.log(' ' + logger.highlight('npx @meldocio/mcp-stdio-proxy config list-workspaces'));
|
|
240
240
|
console.log();
|
|
241
241
|
|
|
242
242
|
process.exit(0);
|
|
@@ -258,14 +258,14 @@ function showUsageHints() {
|
|
|
258
258
|
console.log(' ' + logger.highlight('help') + ' - Show detailed help');
|
|
259
259
|
console.log();
|
|
260
260
|
console.log(logger.label('For more information, run:'));
|
|
261
|
-
console.log(' ' + logger.highlight('npx @
|
|
261
|
+
console.log(' ' + logger.highlight('npx @meldocio/mcp-stdio-proxy help') + '\n');
|
|
262
262
|
process.exit(0);
|
|
263
263
|
}
|
|
264
264
|
|
|
265
265
|
/**
|
|
266
266
|
* Main CLI handler
|
|
267
267
|
*/
|
|
268
|
-
function main() {
|
|
268
|
+
async function main() {
|
|
269
269
|
const args = process.argv.slice(2);
|
|
270
270
|
|
|
271
271
|
if (args.length === 0) {
|
|
@@ -282,15 +282,15 @@ function main() {
|
|
|
282
282
|
handleHelp();
|
|
283
283
|
} else if (command === 'auth') {
|
|
284
284
|
if (subcommand === 'login') {
|
|
285
|
-
handleAuthLogin();
|
|
285
|
+
await handleAuthLogin();
|
|
286
286
|
} else if (subcommand === 'status') {
|
|
287
|
-
handleAuthStatus();
|
|
287
|
+
await handleAuthStatus();
|
|
288
288
|
} else if (subcommand === 'logout') {
|
|
289
289
|
handleAuthLogout();
|
|
290
290
|
} else {
|
|
291
291
|
logger.error(`Unknown auth command: ${subcommand}`);
|
|
292
292
|
console.log('\n' + logger.label('Usage:'));
|
|
293
|
-
console.log(' ' + logger.highlight('npx @
|
|
293
|
+
console.log(' ' + logger.highlight('npx @meldocio/mcp-stdio-proxy auth <login|status|logout>') + '\n');
|
|
294
294
|
process.exit(1);
|
|
295
295
|
}
|
|
296
296
|
} else if (command === 'config') {
|
|
@@ -299,11 +299,11 @@ function main() {
|
|
|
299
299
|
} else if (subcommand === 'get-workspace') {
|
|
300
300
|
handleConfigGetWorkspace();
|
|
301
301
|
} else if (subcommand === 'list-workspaces') {
|
|
302
|
-
handleConfigListWorkspaces();
|
|
302
|
+
await handleConfigListWorkspaces();
|
|
303
303
|
} else {
|
|
304
304
|
logger.error(`Unknown config command: ${subcommand}`);
|
|
305
305
|
console.log('\n' + logger.label('Usage:'));
|
|
306
|
-
console.log(' ' + logger.highlight('npx @
|
|
306
|
+
console.log(' ' + logger.highlight('npx @meldocio/mcp-stdio-proxy config <set-workspace|get-workspace|list-workspaces>') + '\n');
|
|
307
307
|
process.exit(1);
|
|
308
308
|
}
|
|
309
309
|
} else {
|
|
@@ -315,7 +315,10 @@ function main() {
|
|
|
315
315
|
|
|
316
316
|
// Run main when this file is required (called from main proxy)
|
|
317
317
|
// main() will handle commands and exit, so this is safe to call
|
|
318
|
-
main()
|
|
318
|
+
main().catch((error) => {
|
|
319
|
+
logger.error(`Unexpected error: ${error.message}`);
|
|
320
|
+
process.exit(1);
|
|
321
|
+
});
|
|
319
322
|
|
|
320
323
|
module.exports = {
|
|
321
324
|
handleAuthLogin,
|
package/bin/meldoc-mcp-proxy.js
CHANGED
|
@@ -12,8 +12,8 @@ const args = process.argv.slice(2);
|
|
|
12
12
|
if (args.length > 0 && (args[0] === 'auth' || args[0] === 'config')) {
|
|
13
13
|
// Handle CLI commands - cli.js will handle and exit
|
|
14
14
|
require('./cli');
|
|
15
|
-
// cli.js
|
|
16
|
-
|
|
15
|
+
// Don't exit here - cli.js will handle process.exit() after async operations complete
|
|
16
|
+
return;
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
// Get package info - try multiple paths for different installation scenarios
|
|
@@ -729,7 +729,7 @@ async function handleToolsCall(request) {
|
|
|
729
729
|
type: 'text',
|
|
730
730
|
text: JSON.stringify({
|
|
731
731
|
authenticated: false,
|
|
732
|
-
message: 'Not authenticated. Run: npx @
|
|
732
|
+
message: 'Not authenticated. Run: npx @meldocio/mcp-stdio-proxy@latest auth login'
|
|
733
733
|
}, null, 2)
|
|
734
734
|
}
|
|
735
735
|
]
|
|
@@ -772,7 +772,7 @@ async function handleToolsCall(request) {
|
|
|
772
772
|
content: [
|
|
773
773
|
{
|
|
774
774
|
type: 'text',
|
|
775
|
-
text: 'To authenticate, run the following command:\n\nnpx @
|
|
775
|
+
text: 'To authenticate, run the following command:\n\nnpx @meldocio/mcp-stdio-proxy@latest auth login'
|
|
776
776
|
}
|
|
777
777
|
]
|
|
778
778
|
}
|
|
@@ -808,7 +808,7 @@ async function processSingleRequest(request) {
|
|
|
808
808
|
const tokenInfo = await getAccessToken();
|
|
809
809
|
if (!tokenInfo) {
|
|
810
810
|
sendError(request.id, CUSTOM_ERROR_CODES.AUTH_REQUIRED,
|
|
811
|
-
'Meldoc token not found. Set MELDOC_ACCESS_TOKEN environment variable or run: npx @
|
|
811
|
+
'Meldoc token not found. Set MELDOC_ACCESS_TOKEN environment variable or run: npx @meldocio/mcp-stdio-proxy@latest auth login', {
|
|
812
812
|
code: 'AUTH_REQUIRED',
|
|
813
813
|
hint: 'Use meldoc.auth_login_instructions tool to get login command'
|
|
814
814
|
});
|
|
@@ -942,7 +942,7 @@ async function processSingleRequest(request) {
|
|
|
942
942
|
|
|
943
943
|
// Check for AUTH_REQUIRED error
|
|
944
944
|
if (errorCode === 'AUTH_REQUIRED' || errorData.code === 'AUTH_REQUIRED') {
|
|
945
|
-
const message = 'Authentication required. Run: npx @
|
|
945
|
+
const message = 'Authentication required. Run: npx @meldocio/mcp-stdio-proxy@latest auth login';
|
|
946
946
|
sendError(request.id, CUSTOM_ERROR_CODES.AUTH_REQUIRED, message, {
|
|
947
947
|
code: 'AUTH_REQUIRED',
|
|
948
948
|
hint: 'Use auth_login_instructions tool to get login command'
|
|
@@ -1032,7 +1032,7 @@ async function processSingleRequest(request) {
|
|
|
1032
1032
|
|
|
1033
1033
|
// Check for AUTH_REQUIRED
|
|
1034
1034
|
if (errorCode === 'AUTH_REQUIRED' || errorData.code === 'AUTH_REQUIRED') {
|
|
1035
|
-
const message = 'Authentication required. Run: npx @
|
|
1035
|
+
const message = 'Authentication required. Run: npx @meldocio/mcp-stdio-proxy@latest auth login';
|
|
1036
1036
|
sendError(request.id, CUSTOM_ERROR_CODES.AUTH_REQUIRED, message, {
|
|
1037
1037
|
code: 'AUTH_REQUIRED',
|
|
1038
1038
|
hint: 'Use auth_login_instructions tool to get login command'
|
|
@@ -1105,7 +1105,7 @@ async function processSingleRequest(request) {
|
|
|
1105
1105
|
|
|
1106
1106
|
// Check for AUTH_REQUIRED
|
|
1107
1107
|
if (errorDataCode === 'AUTH_REQUIRED') {
|
|
1108
|
-
const message = 'Authentication required. Run: npx @
|
|
1108
|
+
const message = 'Authentication required. Run: npx @meldocio/mcp-stdio-proxy@latest auth login';
|
|
1109
1109
|
sendError(request.id, CUSTOM_ERROR_CODES.AUTH_REQUIRED, message, {
|
|
1110
1110
|
code: 'AUTH_REQUIRED',
|
|
1111
1111
|
hint: 'Use auth_login_instructions tool to get login command'
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@meldocio/mcp-stdio-proxy",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.12",
|
|
4
4
|
"description": "MCP stdio proxy for meldoc - connects Claude Desktop to meldoc MCP API",
|
|
5
5
|
"bin": {
|
|
6
6
|
"meldoc-mcp": "bin/meldoc-mcp-proxy.js"
|
|
@@ -32,6 +32,9 @@
|
|
|
32
32
|
"url": "https://github.com/meldoc/mcp-stdio-proxy/issues"
|
|
33
33
|
},
|
|
34
34
|
"homepage": "https://github.com/meldoc/mcp-stdio-proxy#readme",
|
|
35
|
+
"publishConfig": {
|
|
36
|
+
"access": "public"
|
|
37
|
+
},
|
|
35
38
|
"dependencies": {
|
|
36
39
|
"axios": "^1.6.0",
|
|
37
40
|
"chalk": "^4.1.2",
|