You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/client/mcp/rag/README.md
+25-23Lines changed: 25 additions & 23 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,9 +4,9 @@
4
4
**Version:***Developer preview*
5
5
6
6
## Introduction
7
-
This document describe how to re-use the configuration tested in the **AI Optimizer & Toolkit** an expose it as an MCP tool to a local **Claude Desktop** and how to setup as a remote MCP server. This early draft implementation utilizes the `stdio`and`sse` to interact between the agent dashboard, represented by the **Claude Desktop**, and the tool.
7
+
This document describe how to re-use the configuration tested in the **AI Optimizer & Toolkit** an expose it as an MCP tool to a local **Claude Desktop** and how to setup as a remote MCP server. This early draft implementation utilizes the `stdio`, `sse`and, by default, the `streamable-http` to interact between the agent dashboard, represented by the **Claude Desktop**, and the tool.
8
8
9
-
**NOTICE**: Only `Ollama` or `OpenAI`configurations are currently supported. Full support will come.
9
+
**NOTICE**: Only `Ollama`, `OpenAI`, `hosted_vllm`configurations are currently supported. Full support will come.`DB23ai`, `26ai` and `Autonomous DB` with wallet configuration is also supported.
10
10
11
11
## Pre-requisites.
12
12
You need:
@@ -34,12 +34,14 @@ In the **AI Optimizer & Toolkit** web interface, after tested a configuration, i
34
34
* press button `Download LangchainMCP` to download an VectorSearch MCP Agent built on current configuration.
35
35
* unzip the file in a `<PROJECT_DIR>` dir.
36
36
37
+
**NOTICE**: if you want to run the application in another server, remember to change in the `optimizer_settings.json` any reference no more local, like hostname for LLM servers, Database, wallet dir and so on.
38
+
37
39
38
40
## Standalone client
39
41
There is a client that you can run without MCP via command-line to test it:
40
42
41
43
```bash
42
-
uv run rag_base_optimizer_config.py "[YOUR_QUESTION]"
44
+
uv run rag_base_optimizer_config_direct.py "[YOUR_QUESTION]"
43
45
```
44
46
In `rag_base_optimizer_config_mcp.py`:
45
47
@@ -117,15 +119,15 @@ uv run rag_base_optimizer_config_mcp.py
117
119
}
118
120
}
119
121
```
120
-
* Set `Local` with `Remote client` line in `<PROJECT_DIR>/rag_base_optimizer_config_mcp.py`:
122
+
* Set `Remote client` line of code with `Local` in `<PROJECT_DIR>/rag_base_optimizer_config_mcp.py`:
121
123
122
124
```python
123
-
#mcp.run(transport='stdio')
124
-
#mcp.run(transport='sse')
125
-
mcp.run(transport='streamable-http')
125
+
# Initialize FastMCP server
126
+
#mcp = FastMCP("rag", port=9090) #Remote client
127
+
mcp = FastMCP("rag") #Local
126
128
```
127
129
128
-
* Substitute `stdio` with `streamable-http` line of code:
130
+
* Substitute line of code `streamable-http` with `stdio`:
129
131
130
132
```python
131
133
mcp.run(transport='stdio')
@@ -144,7 +146,7 @@ uv run rag_base_optimizer_config_mcp.py
0 commit comments