Skip to content

Commit fab40d2

Browse files
committed
fix docs for remote
1 parent 7ee80ba commit fab40d2

File tree

2 files changed

+13
-39
lines changed

2 files changed

+13
-39
lines changed

src/client/mcp/rag/README.md

Lines changed: 11 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ mcp = FastMCP("rag") #Local
116116
#mcp.run(transport='sse')
117117
```
118118

119-
* Start MCP server with:
119+
* Start MCP server in another shell with:
120120
```bash
121121
uv run rag_base_optimizer_config_mcp.py
122122
```
@@ -142,55 +142,29 @@ npx @modelcontextprotocol/inspector
142142

143143
## Claude Desktop setup for remote/local server
144144
Claude Desktop, in free version, not allows to connect remote server. You can overcome, for testing purpose only, with a proxy library called `mcp-remote`. These are the options.
145-
146-
### Option 1:
147-
If you have already installed Node.js v18+, it should work:
145+
If you have already installed Node.js v20.17.0+, it should work:
148146

149147
* replace `rag` mcpServer, setting in `claude_desktop_config.json`:
150148
```json
151149
{
152150
"mcpServers": {
153151
"remote": {
154-
"command": "npx",
155-
"args": ["mcp-remote", "http://localhost:8001/sse"]
156-
}
152+
"command": "npx",
153+
"args": [
154+
"mcp-remote",
155+
"http://127.0.0.1:8001/sse"
156+
]
157+
}
157158
}
158159
}
159160
```
160161
* restart Claude Desktop.
161162

162-
163-
### Option 2:
164-
If for any reason Claude desktop has issue in starting this connection, even recent Node has been installed:
165-
166-
* find the absolute position:
167-
```bash
168-
which node
169-
```
170-
171-
* create a file in `<PROJECT_DIR>/src/client/mcp/rag/` named `claude-remote-wrapper.sh`, with the absolute path to Node. For example, if you have `Node v20.17.0`:
172-
173-
```bash
174-
#!/bin/bash
175-
export PATH="$HOME/.nvm/versions/node/v20.17.0/bin:$PATH"
176-
export NODE_VERSION=20.17.0
177-
exec npx mcp-remote "$@"
178-
```
179-
180-
* change the permission:
181-
163+
**NOTICE**: If you have any problem running, check the logs if it's related to an old npx/nodejs version used with mcp-remote library. Check with:
182164
```bash
183-
chmod +x claude-remote-wrapper.sh
184-
```
185-
186-
* change the `claude_desktop_config.json`:
187-
188-
```json
189-
"remote": {
190-
"command": "<PROJECT_DIR>/src/client/mcp/rag/claude-remote-wrapper.sh",
191-
"args": ["http://localhost:8001/sse"]
192-
}
165+
nvm -list
193166
```
167+
if you have any other versions available than the default. It could happen that Claude Desktop uses the older one. Try to remove any other nvm versions available to force the use the only one avalable, at minimum v20.17.0+.
194168

195169
* restart and test as remote server
196170

src/client/mcp/rag/rag_base_optimizer_config_mcp.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -186,5 +186,5 @@ def get_vectorstore(data,embeddings):
186186
with open(file_path, "r") as file:
187187
#rag_tool.__doc__=rag_tool_desc[0]
188188
data = json.load(file)
189-
#mcp.run(transport='stdio')
190-
mcp.run(transport='sse')
189+
mcp.run(transport='stdio')
190+
#mcp.run(transport='sse')

0 commit comments

Comments
 (0)