@meldocio/mcp-stdio-proxy 1.0.11 → 1.0.13
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 +60 -20
- package/bin/cli.js +166 -11
- package/bin/meldoc-mcp-proxy.js +6 -6
- package/package.json +4 -1
package/README.md
CHANGED
|
@@ -15,6 +15,32 @@ This is a bridge between Claude Desktop and Meldoc. After setup, Claude will be
|
|
|
15
15
|
|
|
16
16
|
## Quick Setup
|
|
17
17
|
|
|
18
|
+
### Automatic Installation (Recommended) ✨
|
|
19
|
+
|
|
20
|
+
The easiest way to set up Meldoc MCP is using the automatic installer:
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
npx @meldocio/mcp-stdio-proxy@latest install
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
This command will:
|
|
27
|
+
- ✅ Automatically find your Claude Desktop configuration file
|
|
28
|
+
- ✅ Add Meldoc MCP configuration (preserving existing MCP servers)
|
|
29
|
+
- ✅ Create the config file and directory if needed
|
|
30
|
+
- ✅ Show you the next steps
|
|
31
|
+
|
|
32
|
+
After running `install`, you just need to:
|
|
33
|
+
1. Restart Claude Desktop
|
|
34
|
+
2. Run `npx @meldocio/mcp-stdio-proxy@latest auth login`
|
|
35
|
+
|
|
36
|
+
Done! 🎉
|
|
37
|
+
|
|
38
|
+
---
|
|
39
|
+
|
|
40
|
+
### Manual Installation
|
|
41
|
+
|
|
42
|
+
If you prefer to configure manually, follow these steps:
|
|
43
|
+
|
|
18
44
|
### Step 1: Find Claude Desktop configuration file
|
|
19
45
|
|
|
20
46
|
Open the configuration file depending on your operating system:
|
|
@@ -65,7 +91,7 @@ Completely close and reopen Claude Desktop for the changes to take effect.
|
|
|
65
91
|
Open a terminal and run:
|
|
66
92
|
|
|
67
93
|
```bash
|
|
68
|
-
npx @
|
|
94
|
+
npx @meldocio/mcp-stdio-proxy@latest auth login
|
|
69
95
|
```
|
|
70
96
|
|
|
71
97
|
Follow the on-screen instructions - you'll need to open a link in your browser and enter a code.
|
|
@@ -81,7 +107,7 @@ For Claude to work with your documentation, you need to log in to your Meldoc ac
|
|
|
81
107
|
The easiest way is to use the login command:
|
|
82
108
|
|
|
83
109
|
```bash
|
|
84
|
-
npx @
|
|
110
|
+
npx @meldocio/mcp-stdio-proxy@latest auth login
|
|
85
111
|
```
|
|
86
112
|
|
|
87
113
|
**What will happen:**
|
|
@@ -128,7 +154,7 @@ export MELDOC_ACCESS_TOKEN=your_token_here
|
|
|
128
154
|
To check if you're logged in:
|
|
129
155
|
|
|
130
156
|
```bash
|
|
131
|
-
npx @
|
|
157
|
+
npx @meldocio/mcp-stdio-proxy@latest auth status
|
|
132
158
|
```
|
|
133
159
|
|
|
134
160
|
### Logging out
|
|
@@ -136,7 +162,7 @@ npx @meldoc/mcp@latest auth status
|
|
|
136
162
|
To log out and remove saved data:
|
|
137
163
|
|
|
138
164
|
```bash
|
|
139
|
-
npx @
|
|
165
|
+
npx @meldocio/mcp-stdio-proxy@latest auth logout
|
|
140
166
|
```
|
|
141
167
|
|
|
142
168
|
### Automatic token refresh
|
|
@@ -159,8 +185,8 @@ Yes, but you need to switch between them using the `auth logout` and `auth login
|
|
|
159
185
|
|
|
160
186
|
### What to do if something doesn't work?
|
|
161
187
|
|
|
162
|
-
1. Check that you're logged in: `npx @
|
|
163
|
-
2. Check workspace: `npx @
|
|
188
|
+
1. Check that you're logged in: `npx @meldocio/mcp-stdio-proxy@latest auth status`
|
|
189
|
+
2. Check workspace: `npx @meldocio/mcp-stdio-proxy@latest config get-workspace`
|
|
164
190
|
3. See the "Troubleshooting" section above
|
|
165
191
|
4. If nothing helps, create an issue on GitHub
|
|
166
192
|
|
|
@@ -186,17 +212,24 @@ When you ask Claude to do something with your documentation:
|
|
|
186
212
|
|
|
187
213
|
## Working Commands
|
|
188
214
|
|
|
215
|
+
### Installation command
|
|
216
|
+
|
|
217
|
+
```bash
|
|
218
|
+
# Automatically configure Claude Desktop for Meldoc MCP
|
|
219
|
+
npx @meldocio/mcp-stdio-proxy@latest install
|
|
220
|
+
```
|
|
221
|
+
|
|
189
222
|
### Authentication commands
|
|
190
223
|
|
|
191
224
|
```bash
|
|
192
225
|
# Log in to account (browser will open)
|
|
193
|
-
npx @
|
|
226
|
+
npx @meldocio/mcp-stdio-proxy@latest auth login
|
|
194
227
|
|
|
195
228
|
# Check if you're logged in
|
|
196
|
-
npx @
|
|
229
|
+
npx @meldocio/mcp-stdio-proxy@latest auth status
|
|
197
230
|
|
|
198
231
|
# Log out of account
|
|
199
|
-
npx @
|
|
232
|
+
npx @meldocio/mcp-stdio-proxy@latest auth logout
|
|
200
233
|
```
|
|
201
234
|
|
|
202
235
|
### Workspace management commands
|
|
@@ -205,20 +238,27 @@ If you have multiple workspaces, you can manage them:
|
|
|
205
238
|
|
|
206
239
|
```bash
|
|
207
240
|
# View all available workspaces
|
|
208
|
-
npx @
|
|
241
|
+
npx @meldocio/mcp-stdio-proxy@latest config list-workspaces
|
|
209
242
|
|
|
210
243
|
# Set default workspace
|
|
211
|
-
npx @
|
|
244
|
+
npx @meldocio/mcp-stdio-proxy@latest config set-workspace workspace-name
|
|
212
245
|
|
|
213
246
|
# View current workspace
|
|
214
|
-
npx @
|
|
247
|
+
npx @meldocio/mcp-stdio-proxy@latest config get-workspace
|
|
248
|
+
```
|
|
249
|
+
|
|
250
|
+
### Installation
|
|
251
|
+
|
|
252
|
+
```bash
|
|
253
|
+
# Automatically configure Claude Desktop
|
|
254
|
+
npx @meldocio/mcp-stdio-proxy@latest install
|
|
215
255
|
```
|
|
216
256
|
|
|
217
257
|
### Help
|
|
218
258
|
|
|
219
259
|
```bash
|
|
220
260
|
# Show all available commands
|
|
221
|
-
npx @
|
|
261
|
+
npx @meldocio/mcp-stdio-proxy@latest help
|
|
222
262
|
```
|
|
223
263
|
|
|
224
264
|
## Working with Workspaces
|
|
@@ -239,7 +279,7 @@ The system selects a workspace in this order:
|
|
|
239
279
|
If you have multiple workspaces, set one as default:
|
|
240
280
|
|
|
241
281
|
```bash
|
|
242
|
-
npx @
|
|
282
|
+
npx @meldocio/mcp-stdio-proxy@latest config set-workspace workspace-name
|
|
243
283
|
```
|
|
244
284
|
|
|
245
285
|
After this, Claude will automatically use this workspace.
|
|
@@ -303,13 +343,13 @@ Claude will automatically select the right tool and execute the request.
|
|
|
303
343
|
1. Run the login command:
|
|
304
344
|
|
|
305
345
|
```bash
|
|
306
|
-
npx @
|
|
346
|
+
npx @meldocio/mcp-stdio-proxy@latest auth login
|
|
307
347
|
```
|
|
308
348
|
|
|
309
349
|
2. Or check if you're logged in:
|
|
310
350
|
|
|
311
351
|
```bash
|
|
312
|
-
npx @
|
|
352
|
+
npx @meldocio/mcp-stdio-proxy@latest auth status
|
|
313
353
|
```
|
|
314
354
|
|
|
315
355
|
3. If using a token directly, make sure it's specified in Claude Desktop configuration
|
|
@@ -323,13 +363,13 @@ If you have multiple workspaces, you need to specify which one to use:
|
|
|
323
363
|
1. View the list of available workspaces:
|
|
324
364
|
|
|
325
365
|
```bash
|
|
326
|
-
npx @
|
|
366
|
+
npx @meldocio/mcp-stdio-proxy@latest config list-workspaces
|
|
327
367
|
```
|
|
328
368
|
|
|
329
369
|
2. Set one as default:
|
|
330
370
|
|
|
331
371
|
```bash
|
|
332
|
-
npx @
|
|
372
|
+
npx @meldocio/mcp-stdio-proxy@latest config set-workspace workspace-name
|
|
333
373
|
```
|
|
334
374
|
|
|
335
375
|
### Error: "Invalid token" - invalid token
|
|
@@ -339,13 +379,13 @@ If you have multiple workspaces, you need to specify which one to use:
|
|
|
339
379
|
1. If you used `auth login`, just log in again:
|
|
340
380
|
|
|
341
381
|
```bash
|
|
342
|
-
npx @
|
|
382
|
+
npx @meldocio/mcp-stdio-proxy@latest auth login
|
|
343
383
|
```
|
|
344
384
|
|
|
345
385
|
2. Check status:
|
|
346
386
|
|
|
347
387
|
```bash
|
|
348
|
-
npx @
|
|
388
|
+
npx @meldocio/mcp-stdio-proxy@latest auth status
|
|
349
389
|
```
|
|
350
390
|
|
|
351
391
|
3. If using a token manually, make sure it hasn't expired and is specified correctly
|
package/bin/cli.js
CHANGED
|
@@ -10,6 +10,9 @@ const axios = require('axios');
|
|
|
10
10
|
const https = require('https');
|
|
11
11
|
const chalk = require('chalk');
|
|
12
12
|
const logger = require('../lib/logger');
|
|
13
|
+
const fs = require('fs');
|
|
14
|
+
const path = require('path');
|
|
15
|
+
const os = require('os');
|
|
13
16
|
|
|
14
17
|
const API_URL = getApiUrl();
|
|
15
18
|
const APP_URL = getAppUrl();
|
|
@@ -64,7 +67,7 @@ async function handleAuthStatus() {
|
|
|
64
67
|
if (!status || !status.authenticated) {
|
|
65
68
|
logger.error('Not authenticated');
|
|
66
69
|
console.log('\n' + logger.label('To authenticate, run:'));
|
|
67
|
-
console.log(' ' + logger.highlight('npx @
|
|
70
|
+
console.log(' ' + logger.highlight('npx @meldocio/mcp-stdio-proxy auth login') + '\n');
|
|
68
71
|
process.exit(1);
|
|
69
72
|
}
|
|
70
73
|
|
|
@@ -99,7 +102,7 @@ function handleConfigSetWorkspace(alias) {
|
|
|
99
102
|
if (!alias) {
|
|
100
103
|
logger.error('Workspace alias is required');
|
|
101
104
|
console.log('\n' + logger.label('Usage:'));
|
|
102
|
-
console.log(' ' + logger.highlight('npx @
|
|
105
|
+
console.log(' ' + logger.highlight('npx @meldocio/mcp-stdio-proxy config set-workspace <alias>') + '\n');
|
|
103
106
|
process.exit(1);
|
|
104
107
|
}
|
|
105
108
|
|
|
@@ -133,7 +136,7 @@ async function handleConfigListWorkspaces() {
|
|
|
133
136
|
if (!tokenInfo) {
|
|
134
137
|
logger.error('Not authenticated');
|
|
135
138
|
console.log('\n' + logger.label('To authenticate, run:'));
|
|
136
|
-
console.log(' ' + logger.highlight('npx @
|
|
139
|
+
console.log(' ' + logger.highlight('npx @meldocio/mcp-stdio-proxy auth login') + '\n');
|
|
137
140
|
process.exit(1);
|
|
138
141
|
}
|
|
139
142
|
|
|
@@ -184,7 +187,7 @@ async function handleConfigListWorkspaces() {
|
|
|
184
187
|
if (errorData.code === 'AUTH_REQUIRED' || errorData.data?.code === 'AUTH_REQUIRED') {
|
|
185
188
|
logger.error('Not authenticated');
|
|
186
189
|
console.log('\n' + logger.label('To authenticate, run:'));
|
|
187
|
-
console.log(' ' + logger.highlight('npx @
|
|
190
|
+
console.log(' ' + logger.highlight('npx @meldocio/mcp-stdio-proxy auth login') + '\n');
|
|
188
191
|
process.exit(1);
|
|
189
192
|
}
|
|
190
193
|
logger.error(`Error: ${errorData.message || error.message}`);
|
|
@@ -195,6 +198,149 @@ async function handleConfigListWorkspaces() {
|
|
|
195
198
|
}
|
|
196
199
|
}
|
|
197
200
|
|
|
201
|
+
/**
|
|
202
|
+
* Get Claude Desktop config file path based on OS
|
|
203
|
+
*/
|
|
204
|
+
function getClaudeDesktopConfigPath() {
|
|
205
|
+
const platform = os.platform();
|
|
206
|
+
const homeDir = os.homedir();
|
|
207
|
+
|
|
208
|
+
if (platform === 'darwin') {
|
|
209
|
+
// macOS
|
|
210
|
+
return path.join(homeDir, 'Library', 'Application Support', 'Claude', 'claude_desktop_config.json');
|
|
211
|
+
} else if (platform === 'win32') {
|
|
212
|
+
// Windows
|
|
213
|
+
const appData = process.env.APPDATA || path.join(homeDir, 'AppData', 'Roaming');
|
|
214
|
+
return path.join(appData, 'Claude', 'claude_desktop_config.json');
|
|
215
|
+
} else {
|
|
216
|
+
// Linux and others
|
|
217
|
+
return path.join(homeDir, '.config', 'Claude', 'claude_desktop_config.json');
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
/**
|
|
222
|
+
* Handle install command - automatically configure Claude Desktop
|
|
223
|
+
*/
|
|
224
|
+
function handleInstall() {
|
|
225
|
+
try {
|
|
226
|
+
logger.section('🚀 Installing Meldoc MCP for Claude Desktop');
|
|
227
|
+
console.log();
|
|
228
|
+
|
|
229
|
+
const configPath = getClaudeDesktopConfigPath();
|
|
230
|
+
const configDir = path.dirname(configPath);
|
|
231
|
+
|
|
232
|
+
logger.info(`Config file location: ${logger.highlight(configPath)}`);
|
|
233
|
+
console.log();
|
|
234
|
+
|
|
235
|
+
// Read existing config or create new one
|
|
236
|
+
let config = {};
|
|
237
|
+
let configExists = false;
|
|
238
|
+
|
|
239
|
+
if (fs.existsSync(configPath)) {
|
|
240
|
+
try {
|
|
241
|
+
const content = fs.readFileSync(configPath, 'utf8');
|
|
242
|
+
config = JSON.parse(content);
|
|
243
|
+
configExists = true;
|
|
244
|
+
logger.info('Found existing Claude Desktop configuration');
|
|
245
|
+
} catch (error) {
|
|
246
|
+
logger.warn(`Failed to parse existing config: ${error.message}`);
|
|
247
|
+
logger.info('Will create a new configuration file');
|
|
248
|
+
}
|
|
249
|
+
} else {
|
|
250
|
+
logger.info('Configuration file does not exist, will create it');
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
// Ensure mcpServers object exists
|
|
254
|
+
if (!config.mcpServers) {
|
|
255
|
+
config.mcpServers = {};
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
// Check if meldoc is already configured
|
|
259
|
+
if (config.mcpServers.meldoc) {
|
|
260
|
+
logger.warn('Meldoc MCP is already configured in Claude Desktop');
|
|
261
|
+
console.log();
|
|
262
|
+
logger.info('Current configuration:');
|
|
263
|
+
console.log(' ' + logger.highlight(JSON.stringify(config.mcpServers.meldoc, null, 2)));
|
|
264
|
+
console.log();
|
|
265
|
+
|
|
266
|
+
// Ask if user wants to update
|
|
267
|
+
logger.info('To update the configuration, you can manually edit the file or remove it first.');
|
|
268
|
+
console.log();
|
|
269
|
+
logger.success('Installation check complete - Meldoc MCP is already configured!');
|
|
270
|
+
console.log();
|
|
271
|
+
logger.info('Next steps:');
|
|
272
|
+
console.log(' 1. Restart Claude Desktop (if you haven\'t already)');
|
|
273
|
+
console.log(' 2. Run: ' + logger.highlight('npx @meldocio/mcp-stdio-proxy auth login'));
|
|
274
|
+
console.log();
|
|
275
|
+
process.exit(0);
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
// Add meldoc configuration
|
|
279
|
+
config.mcpServers.meldoc = {
|
|
280
|
+
command: 'npx',
|
|
281
|
+
args: ['-y', '@meldocio/mcp-stdio-proxy@latest']
|
|
282
|
+
};
|
|
283
|
+
|
|
284
|
+
// Create directory if it doesn't exist
|
|
285
|
+
if (!fs.existsSync(configDir)) {
|
|
286
|
+
logger.info(`Creating directory: ${configDir}`);
|
|
287
|
+
fs.mkdirSync(configDir, { recursive: true });
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
// Write config file
|
|
291
|
+
const configContent = JSON.stringify(config, null, 2);
|
|
292
|
+
fs.writeFileSync(configPath, configContent, 'utf8');
|
|
293
|
+
|
|
294
|
+
logger.success('Configuration added successfully!');
|
|
295
|
+
console.log();
|
|
296
|
+
|
|
297
|
+
// Show what was added
|
|
298
|
+
logger.info('Added MCP server configuration:');
|
|
299
|
+
console.log(' ' + logger.highlight(JSON.stringify(config.mcpServers.meldoc, null, 2)));
|
|
300
|
+
console.log();
|
|
301
|
+
|
|
302
|
+
// Count other MCP servers
|
|
303
|
+
const otherServers = Object.keys(config.mcpServers).filter(key => key !== 'meldoc');
|
|
304
|
+
if (otherServers.length > 0) {
|
|
305
|
+
logger.info(`Found ${otherServers.length} other MCP server(s): ${otherServers.join(', ')}`);
|
|
306
|
+
console.log();
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
// Next steps
|
|
310
|
+
logger.section('✅ Installation Complete!');
|
|
311
|
+
console.log();
|
|
312
|
+
logger.info('Next steps:');
|
|
313
|
+
console.log();
|
|
314
|
+
console.log(' 1. ' + logger.label('Restart Claude Desktop'));
|
|
315
|
+
console.log(' Completely close and reopen Claude Desktop for changes to take effect.');
|
|
316
|
+
console.log();
|
|
317
|
+
console.log(' 2. ' + logger.label('Authenticate with Meldoc'));
|
|
318
|
+
console.log(' Run: ' + logger.highlight('npx @meldocio/mcp-stdio-proxy auth login'));
|
|
319
|
+
console.log();
|
|
320
|
+
console.log(' 3. ' + logger.label('Start using Claude with Meldoc!'));
|
|
321
|
+
console.log(' Ask Claude to read, search, or update your documentation.');
|
|
322
|
+
console.log();
|
|
323
|
+
|
|
324
|
+
process.exit(0);
|
|
325
|
+
} catch (error) {
|
|
326
|
+
logger.error(`Installation failed: ${error.message}`);
|
|
327
|
+
console.log();
|
|
328
|
+
logger.info('You can manually configure Claude Desktop by:');
|
|
329
|
+
console.log(' 1. Opening the config file: ' + logger.highlight(getClaudeDesktopConfigPath()));
|
|
330
|
+
console.log(' 2. Adding this configuration:');
|
|
331
|
+
console.log(' ' + logger.highlight(JSON.stringify({
|
|
332
|
+
mcpServers: {
|
|
333
|
+
meldoc: {
|
|
334
|
+
command: 'npx',
|
|
335
|
+
args: ['-y', '@meldocio/mcp-stdio-proxy@latest']
|
|
336
|
+
}
|
|
337
|
+
}
|
|
338
|
+
}, null, 2)));
|
|
339
|
+
console.log();
|
|
340
|
+
process.exit(1);
|
|
341
|
+
}
|
|
342
|
+
}
|
|
343
|
+
|
|
198
344
|
/**
|
|
199
345
|
* Handle help command
|
|
200
346
|
*/
|
|
@@ -229,14 +375,19 @@ function handleHelp() {
|
|
|
229
375
|
console.log(' List all available workspaces');
|
|
230
376
|
console.log();
|
|
231
377
|
|
|
378
|
+
console.log(' ' + logger.highlight('install'));
|
|
379
|
+
console.log(' Automatically configure Claude Desktop for Meldoc MCP');
|
|
380
|
+
console.log();
|
|
381
|
+
|
|
232
382
|
console.log(' ' + logger.highlight('help'));
|
|
233
383
|
console.log(' Show this help message');
|
|
234
384
|
console.log();
|
|
235
385
|
|
|
236
386
|
console.log(logger.label('Examples:'));
|
|
237
|
-
console.log(' ' + logger.highlight('npx @
|
|
238
|
-
console.log(' ' + logger.highlight('npx @
|
|
239
|
-
console.log(' ' + logger.highlight('npx @
|
|
387
|
+
console.log(' ' + logger.highlight('npx @meldocio/mcp-stdio-proxy install'));
|
|
388
|
+
console.log(' ' + logger.highlight('npx @meldocio/mcp-stdio-proxy auth login'));
|
|
389
|
+
console.log(' ' + logger.highlight('npx @meldocio/mcp-stdio-proxy config set-workspace my-workspace'));
|
|
390
|
+
console.log(' ' + logger.highlight('npx @meldocio/mcp-stdio-proxy config list-workspaces'));
|
|
240
391
|
console.log();
|
|
241
392
|
|
|
242
393
|
process.exit(0);
|
|
@@ -255,10 +406,11 @@ function showUsageHints() {
|
|
|
255
406
|
console.log(' ' + logger.highlight('config set-workspace') + ' - Set workspace alias');
|
|
256
407
|
console.log(' ' + logger.highlight('config get-workspace') + ' - Get current workspace');
|
|
257
408
|
console.log(' ' + logger.highlight('config list-workspaces') + ' - List workspaces');
|
|
409
|
+
console.log(' ' + logger.highlight('install') + ' - Configure Claude Desktop');
|
|
258
410
|
console.log(' ' + logger.highlight('help') + ' - Show detailed help');
|
|
259
411
|
console.log();
|
|
260
412
|
console.log(logger.label('For more information, run:'));
|
|
261
|
-
console.log(' ' + logger.highlight('npx @
|
|
413
|
+
console.log(' ' + logger.highlight('npx @meldocio/mcp-stdio-proxy help') + '\n');
|
|
262
414
|
process.exit(0);
|
|
263
415
|
}
|
|
264
416
|
|
|
@@ -280,6 +432,8 @@ async function main() {
|
|
|
280
432
|
|
|
281
433
|
if (command === 'help' || command === '--help' || command === '-h') {
|
|
282
434
|
handleHelp();
|
|
435
|
+
} else if (command === 'install') {
|
|
436
|
+
handleInstall();
|
|
283
437
|
} else if (command === 'auth') {
|
|
284
438
|
if (subcommand === 'login') {
|
|
285
439
|
await handleAuthLogin();
|
|
@@ -290,7 +444,7 @@ async function main() {
|
|
|
290
444
|
} else {
|
|
291
445
|
logger.error(`Unknown auth command: ${subcommand}`);
|
|
292
446
|
console.log('\n' + logger.label('Usage:'));
|
|
293
|
-
console.log(' ' + logger.highlight('npx @
|
|
447
|
+
console.log(' ' + logger.highlight('npx @meldocio/mcp-stdio-proxy auth <login|status|logout>') + '\n');
|
|
294
448
|
process.exit(1);
|
|
295
449
|
}
|
|
296
450
|
} else if (command === 'config') {
|
|
@@ -303,7 +457,7 @@ async function main() {
|
|
|
303
457
|
} else {
|
|
304
458
|
logger.error(`Unknown config command: ${subcommand}`);
|
|
305
459
|
console.log('\n' + logger.label('Usage:'));
|
|
306
|
-
console.log(' ' + logger.highlight('npx @
|
|
460
|
+
console.log(' ' + logger.highlight('npx @meldocio/mcp-stdio-proxy config <set-workspace|get-workspace|list-workspaces>') + '\n');
|
|
307
461
|
process.exit(1);
|
|
308
462
|
}
|
|
309
463
|
} else {
|
|
@@ -326,5 +480,6 @@ module.exports = {
|
|
|
326
480
|
handleAuthLogout,
|
|
327
481
|
handleConfigSetWorkspace,
|
|
328
482
|
handleConfigGetWorkspace,
|
|
329
|
-
handleConfigListWorkspaces
|
|
483
|
+
handleConfigListWorkspaces,
|
|
484
|
+
handleInstall
|
|
330
485
|
};
|
package/bin/meldoc-mcp-proxy.js
CHANGED
|
@@ -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.13",
|
|
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",
|