@meldocio/mcp-stdio-proxy 1.0.24 → 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.
@@ -14,7 +14,7 @@
14
14
  "source": "github",
15
15
  "repo": "meldoc-io/mcp-stdio-proxy"
16
16
  },
17
- "version": "1.0.24",
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.24",
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 (if there's only one, it's selected automatically)
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, you need to specify which one to use.
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. **Global setting** - if you set a default workspace
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
- ### Setting default workspace
343
+ ### Automatic Workspace Memory
343
344
 
344
- If you have multiple workspaces, set one as default:
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
- After this, Claude will automatically use this workspace.
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
 
@@ -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
- // Resolve workspace if not provided
35
- const workspaceAlias = await resolveWorkspaceAlias();
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@meldocio/mcp-stdio-proxy",
3
- "version": "1.0.24",
3
+ "version": "1.0.26",
4
4
  "description": "MCP stdio proxy for meldoc - connects Claude Desktop and Claude Code to meldoc MCP API",
5
5
  "bin": {
6
6
  "meldoc-mcp": "bin/meldoc-mcp-proxy.js"