sherpa-mcp 0.1.1 → 0.1.2

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.
Files changed (2) hide show
  1. package/README.md +64 -32
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -56,30 +56,71 @@ Prerequisites: Node.js ≥ 18, [ripgrep](https://github.com/BurntSushi/ripgrep#i
56
56
  (`rg`) on `PATH`, and a local backend running (Ollama, llama.cpp server,
57
57
  or LM Studio).
58
58
 
59
- **Register it in Claude Code.** This is the part most likely to trip
60
- people up: config goes in the MCP server's `env`, **not your shell** —
61
- `export SHERPA_MODEL=...` in a terminal does nothing, since the server
62
- runs in its own subprocess with its own environment. Add this to your
63
- `~/.claude.json` (or a project-level `.mcp.json`):
59
+ ### Main path: install the plugin
64
60
 
65
- Ollama:
61
+ This gets you the MCP server, the skill, and `/sherpa-status` together,
62
+ in one shot:
63
+
64
+ ```
65
+ /plugin marketplace add Tongas/sherpa-mcp
66
+ /plugin install sherpa@sherpa-mcp
67
+ ```
68
+
69
+ **Configure the backend.** A plugin-provided MCP server inherits Claude
70
+ Code's own process environment — there's no documented way to attach a
71
+ per-plugin `env` block after a marketplace install. That makes shell
72
+ exports fragile: if you launch Claude Code from a GUI launcher instead
73
+ of a terminal, it doesn't inherit anything from `~/.bashrc`/`~/.zshrc`.
74
+
75
+ **Recommended: a config file**, which sherpa reads regardless of how
76
+ Claude Code was launched. Create `~/.claude/sherpa/config.json` (applies
77
+ everywhere) or `./sherpa.config.json` in a specific project (same keys,
78
+ camelCase):
66
79
 
67
80
  ```json
68
81
  {
69
- "mcpServers": {
70
- "sherpa": {
71
- "command": "npx",
72
- "args": ["-y", "sherpa-mcp"],
73
- "env": {
74
- "SHERPA_BASE_URL": "http://localhost:11434",
75
- "SHERPA_MODEL": "qwen2.5-coder:14b"
76
- }
77
- }
78
- }
82
+ "backend": "openai-compatible",
83
+ "baseUrl": "http://localhost:8080",
84
+ "model": "qwen2.5-coder-14b",
85
+ "contextWindowOverride": 32768,
86
+ "maxOutputTokensOverride": 8192
79
87
  }
80
88
  ```
81
89
 
82
- llama.cpp server (or any OpenAI-compatible server):
90
+ (For Ollama, drop `backend`/`contextWindowOverride`/`maxOutputTokensOverride`
91
+ — just `baseUrl` and `model` are enough; see
92
+ [Configuration](#configuration) below for the full key list.)
93
+
94
+ **Quick alternative:** if you're always launching Claude Code from a
95
+ shell, exporting env vars works too:
96
+
97
+ ```bash
98
+ export SHERPA_BASE_URL="http://localhost:11434" # Ollama default
99
+ export SHERPA_MODEL="qwen2.5-coder:14b" # whatever you have pulled
100
+ ```
101
+
102
+ For an `openai-compatible` backend (llama.cpp server, LM Studio), also
103
+ export `SHERPA_BACKEND=openai-compatible` plus `SHERPA_CONTEXT_WINDOW`
104
+ and `SHERPA_MAX_OUTPUT_TOKENS` set to your server's real values. There's
105
+ no standard endpoint to discover the context window, so without one of
106
+ these two config methods sherpa falls back to a conservative 4096/2048,
107
+ which makes `delegate_transform` skip files over roughly 200 lines.
108
+
109
+ **Verify:** open a new session and run `/sherpa-status`. It shows the
110
+ active backend, the loaded model, and where each config value actually
111
+ came from, so a typo doesn't go unnoticed.
112
+
113
+ ### Alternative: MCP server only, via npx
114
+
115
+ Use this if you just want the tools — for example, wiring sherpa into
116
+ something other than Claude Code. **You won't get the skill or
117
+ `/sherpa-status`**, which means no automatic guidance on when delegating
118
+ is worth it and no built-in way to check what's configured; you'll need
119
+ to invoke the tools explicitly and know your own setup.
120
+
121
+ Add this to `~/.claude.json` (or a project-level `.mcp.json`) — here the
122
+ `env` block is explicit and does work, since you're registering the MCP
123
+ server directly rather than through a plugin:
83
124
 
84
125
  ```json
85
126
  {
@@ -88,31 +129,22 @@ llama.cpp server (or any OpenAI-compatible server):
88
129
  "command": "npx",
89
130
  "args": ["-y", "sherpa-mcp"],
90
131
  "env": {
91
- "SHERPA_BACKEND": "openai-compatible",
92
- "SHERPA_BASE_URL": "http://localhost:8080",
93
- "SHERPA_MODEL": "qwen2.5-coder-14b",
94
- "SHERPA_CONTEXT_WINDOW": "32768",
95
- "SHERPA_MAX_OUTPUT_TOKENS": "8192"
132
+ "SHERPA_BASE_URL": "http://localhost:11434",
133
+ "SHERPA_MODEL": "qwen2.5-coder:14b"
96
134
  }
97
135
  }
98
136
  }
99
137
  }
100
138
  ```
101
139
 
102
- On `openai-compatible` backends, set `SHERPA_CONTEXT_WINDOW` and
103
- `SHERPA_MAX_OUTPUT_TOKENS` to your server's real values. There's no
104
- standard endpoint to discover them, so without these sherpa falls back
105
- to a conservative 4096/2048 — which makes `delegate_transform` skip
106
- files over roughly 200 lines.
107
-
108
- **Verify:** run `/sherpa-status` in Claude Code. It shows the active
109
- backend, the loaded model, and — critically — where each config value
110
- actually came from, so a typo doesn't go unnoticed.
140
+ For an `openai-compatible` backend, add `SHERPA_BACKEND`,
141
+ `SHERPA_CONTEXT_WINDOW`, and `SHERPA_MAX_OUTPUT_TOKENS` to that same
142
+ `env` block, same as above.
111
143
 
112
144
  Tested with llama.cpp server. Also supports Ollama and LM Studio through
113
145
  the same OpenAI-compatible interface.
114
146
 
115
- ### Installing from a clone (development)
147
+ #### Installing from a clone (development)
116
148
 
117
149
  If you're working on `sherpa` itself, build locally instead of using
118
150
  `npx`:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sherpa-mcp",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "MCP server that delegates high-volume file exploration, search, and transformation to a local LLM backend",
5
5
  "author": "Gastón Parravicini",
6
6
  "license": "MIT",