smart-context-mcp 1.0.0 → 1.0.1

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 CHANGED
@@ -27,6 +27,8 @@ npx smart-context-init --target .
27
27
 
28
28
  That's it. Restart your AI client (Cursor, Codex, Claude Desktop) and the tools are available.
29
29
 
30
+ **Important:** The init command automatically sets the correct `cwd` (working directory) in the generated configs, so the MCP server runs from your project root. This works for standalone projects, monorepos, and nested workspaces.
31
+
30
32
  ## What you get
31
33
 
32
34
  Seven focused tools that work automatically:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "smart-context-mcp",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "MCP server that reduces agent token usage and improves response quality with compact file summaries, ranked code search, and curated context.",
5
5
  "author": "Francisco Caballero Portero <fcp1978@hotmail.com>",
6
6
  "type": "module",
@@ -118,11 +118,12 @@ const writeFile = (filePath, content, dryRun) => {
118
118
  console.log(`updated ${filePath}`);
119
119
  };
120
120
 
121
- const getServerConfig = ({ name, command, args }) => ({
121
+ const getServerConfig = ({ name, command, args, cwd }) => ({
122
122
  name,
123
123
  config: {
124
124
  command,
125
125
  args,
126
+ ...(cwd ? { cwd } : {}),
126
127
  },
127
128
  });
128
129
 
@@ -162,6 +163,7 @@ const buildCodexSection = (serverConfig) => {
162
163
  'required = false',
163
164
  `command = ${JSON.stringify(serverConfig.config.command)}`,
164
165
  `args = [${serverConfig.config.args.map((value) => JSON.stringify(value)).join(', ')}]`,
166
+ ...(serverConfig.config.cwd ? [`cwd = ${JSON.stringify(serverConfig.config.cwd)}`] : []),
165
167
  'startup_timeout_sec = 15.0',
166
168
  'tool_timeout_sec = 30.0',
167
169
  ];
@@ -319,6 +321,7 @@ const main = () => {
319
321
  name: options.name,
320
322
  command: options.command,
321
323
  args,
324
+ cwd: targetDir,
322
325
  });
323
326
 
324
327
  const clientSet = new Set(options.clients);