@meldocio/mcp-stdio-proxy 1.0.25 → 1.0.26
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-plugin/marketplace.json +1 -1
- package/.claude-plugin/plugin.json +1 -1
- package/README.md +18 -7
- package/lib/http/client.js +26 -3
- package/package.json +1 -1
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"source": "github",
|
|
15
15
|
"repo": "meldoc-io/mcp-stdio-proxy"
|
|
16
16
|
},
|
|
17
|
-
"version": "1.0.
|
|
17
|
+
"version": "1.0.26",
|
|
18
18
|
"description": "Connect Claude Desktop, Claude Code, and other MCP clients to your Meldoc documentation workspace. Read, search, create, and update your documentation directly from AI conversations.",
|
|
19
19
|
"author": {
|
|
20
20
|
"name": "Meldoc",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "meldoc-mcp",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.26",
|
|
4
4
|
"description": "Connect Claude Desktop, Claude Code, and other MCP clients to your Meldoc documentation workspace. Read, search, create, and update your documentation directly from AI conversations through the Model Context Protocol.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Meldoc",
|
package/README.md
CHANGED
|
@@ -262,10 +262,11 @@ When you ask Claude to do something with your documentation:
|
|
|
262
262
|
### Features
|
|
263
263
|
|
|
264
264
|
- ✅ Automatic token refresh (no need to log in every time)
|
|
265
|
-
- ✅ Smart workspace selection (
|
|
265
|
+
- ✅ Smart workspace selection (automatically remembers your choice)
|
|
266
|
+
- ✅ **Automatic workspace caching** - use a workspace once, it becomes your default
|
|
266
267
|
- ✅ Secure data storage
|
|
267
268
|
- ✅ Works with multiple workspaces
|
|
268
|
-
- ✅ Support for projects and repositories
|
|
269
|
+
- ✅ Support for projects and repositories with project-specific workspace binding
|
|
269
270
|
|
|
270
271
|
## Working Commands
|
|
271
272
|
|
|
@@ -326,7 +327,7 @@ npx @meldocio/mcp-stdio-proxy@latest help
|
|
|
326
327
|
|
|
327
328
|
## Working with Workspaces
|
|
328
329
|
|
|
329
|
-
If you have multiple workspaces in Meldoc,
|
|
330
|
+
If you have multiple workspaces in Meldoc, the system automatically manages workspace selection for you.
|
|
330
331
|
|
|
331
332
|
### How is workspace selected?
|
|
332
333
|
|
|
@@ -334,20 +335,30 @@ The system selects a workspace in this order:
|
|
|
334
335
|
|
|
335
336
|
1. **Specified in request** - if you explicitly specified `workspaceAlias` or `workspaceId`
|
|
336
337
|
2. **Project file** - if there's a `meldoc.config.yml` file in the project folder (or git repository directory)
|
|
337
|
-
3. **
|
|
338
|
+
3. **Auto-cached default** - if you previously used a workspace, it's automatically remembered
|
|
338
339
|
4. **Automatically** - if you only have one workspace, it will be selected automatically
|
|
339
340
|
|
|
340
341
|
**Note:** When MCP is used in a git project or directory (e.g., Claude Desktop terminal or any other LLM), the workspace is automatically taken from the `meldoc.config.yml` configuration file if it exists.
|
|
341
342
|
|
|
342
|
-
###
|
|
343
|
+
### Automatic Workspace Memory
|
|
343
344
|
|
|
344
|
-
|
|
345
|
+
**The system automatically remembers your workspace choice!** Just use a workspace once in your conversation:
|
|
346
|
+
|
|
347
|
+
```text
|
|
348
|
+
You: "List documents in my-workspace"
|
|
349
|
+
```
|
|
350
|
+
|
|
351
|
+
Now `my-workspace` is automatically your default for all future requests. No manual setup needed!
|
|
352
|
+
|
|
353
|
+
### Setting default workspace manually (optional)
|
|
354
|
+
|
|
355
|
+
You can also set a default workspace explicitly via CLI:
|
|
345
356
|
|
|
346
357
|
```bash
|
|
347
358
|
npx @meldocio/mcp-stdio-proxy@latest config set-workspace workspace-name
|
|
348
359
|
```
|
|
349
360
|
|
|
350
|
-
|
|
361
|
+
But in most cases, the automatic caching (just using the workspace once) is more convenient.
|
|
351
362
|
|
|
352
363
|
### Workspace for a specific project
|
|
353
364
|
|
package/lib/http/client.js
CHANGED
|
@@ -8,7 +8,8 @@ const axios = require('axios');
|
|
|
8
8
|
const https = require('https');
|
|
9
9
|
const { getApiUrl, REQUEST_TIMEOUT } = require('../core/constants');
|
|
10
10
|
const { getAccessToken } = require('../core/auth');
|
|
11
|
-
const { resolveWorkspaceAlias } = require('../core/workspace');
|
|
11
|
+
const { resolveWorkspaceAlias, findRepoConfig, readRepoConfig } = require('../core/workspace');
|
|
12
|
+
const { setWorkspaceAlias } = require('../core/config');
|
|
12
13
|
|
|
13
14
|
/**
|
|
14
15
|
* Make an authenticated JSON-RPC request to the backend
|
|
@@ -31,8 +32,30 @@ async function makeBackendRequest(request) {
|
|
|
31
32
|
jsonrpc: request.jsonrpc || '2.0'
|
|
32
33
|
};
|
|
33
34
|
|
|
34
|
-
//
|
|
35
|
-
|
|
35
|
+
// Determine workspace to use with correct priority:
|
|
36
|
+
// 1. Explicitly provided in tool arguments (highest priority)
|
|
37
|
+
// 2. Resolved from repo config → global config → none
|
|
38
|
+
const params = request.params || {};
|
|
39
|
+
const args = params.arguments || params.args || {};
|
|
40
|
+
|
|
41
|
+
let workspaceAlias = null;
|
|
42
|
+
|
|
43
|
+
if (args.workspaceAlias && typeof args.workspaceAlias === 'string') {
|
|
44
|
+
// User explicitly specified a workspace - use it
|
|
45
|
+
workspaceAlias = args.workspaceAlias;
|
|
46
|
+
|
|
47
|
+
// Cache only if no repo config exists
|
|
48
|
+
// If repo config exists, explicit workspace is a one-time override
|
|
49
|
+
const repoConfigPath = findRepoConfig();
|
|
50
|
+
const hasRepoConfig = repoConfigPath && readRepoConfig(repoConfigPath);
|
|
51
|
+
|
|
52
|
+
if (!hasRepoConfig) {
|
|
53
|
+
setWorkspaceAlias(args.workspaceAlias);
|
|
54
|
+
}
|
|
55
|
+
} else {
|
|
56
|
+
// No explicit workspace - resolve from config hierarchy
|
|
57
|
+
workspaceAlias = await resolveWorkspaceAlias();
|
|
58
|
+
}
|
|
36
59
|
|
|
37
60
|
// Build headers
|
|
38
61
|
const headers = {
|
package/package.json
CHANGED