Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
I
imagej-elphel
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
3
Issues
3
List
Board
Labels
Milestones
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Elphel
imagej-elphel
Commits
bf701868
Commit
bf701868
authored
Feb 06, 2026
by
Andrey Filippov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
configurable path for MCP/RAG
parent
c911c2a7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
3 deletions
+13
-3
mcp-http-howto.md
scripts/mcp-http-howto.md
+5
-0
McpServer.java
src/main/java/com/elphel/imagej/mcp/McpServer.java
+8
-3
No files found.
scripts/mcp-http-howto.md
View file @
bf701868
...
@@ -147,6 +147,11 @@ Query parameters:
...
@@ -147,6 +147,11 @@ Query parameters:
curl "http://127.0.0.1:48888/mcp/rag/query?text=Explain%20differential%20rectification&topK=5"
curl "http://127.0.0.1:48888/mcp/rag/query?text=Explain%20differential%20rectification&topK=5"
```
```
RAG root path (optional, for non-standard checkouts):
```
-Delphel.rag.root=/home/elphel/wksp2/imagej-elphel
```
Example (config directory):
Example (config directory):
```
```
-Delphel.mcp.allowed.configdir=/media/elphel/btrfs-data/lwir16-proc/NC/config
-Delphel.mcp.allowed.configdir=/media/elphel/btrfs-data/lwir16-proc/NC/config
...
...
src/main/java/com/elphel/imagej/mcp/McpServer.java
View file @
bf701868
...
@@ -552,8 +552,12 @@ public class McpServer {
...
@@ -552,8 +552,12 @@ public class McpServer {
if
(
topK
<
1
)
{
if
(
topK
<
1
)
{
topK
=
1
;
topK
=
1
;
}
}
String
venvPython
=
"/home/elphel/git/imagej-elphel/attic/CODEX/rag_index/.venv/bin/python"
;
String
ragRoot
=
System
.
getProperty
(
"elphel.rag.root"
);
String
script
=
"/home/elphel/git/imagej-elphel/scripts/rag_query.py"
;
if
(
ragRoot
==
null
||
ragRoot
.
trim
().
isEmpty
())
{
ragRoot
=
"/home/elphel/git/imagej-elphel"
;
}
String
venvPython
=
ragRoot
+
"/attic/CODEX/rag_index/.venv/bin/python"
;
String
script
=
ragRoot
+
"/scripts/rag_query.py"
;
List
<
String
>
cmd
=
new
ArrayList
<
String
>();
List
<
String
>
cmd
=
new
ArrayList
<
String
>();
cmd
.
add
(
venvPython
);
cmd
.
add
(
venvPython
);
cmd
.
add
(
script
);
cmd
.
add
(
script
);
...
@@ -567,7 +571,8 @@ public class McpServer {
...
@@ -567,7 +571,8 @@ public class McpServer {
try
{
try
{
p
=
pb
.
start
();
p
=
pb
.
start
();
}
catch
(
IOException
e
)
{
}
catch
(
IOException
e
)
{
sendJson
(
exchange
,
500
,
"{\"ok\":false,\"error\":\"Failed to start rag_query\"}"
);
String
detail
=
jsonEscape
(
"rag_root="
+
ragRoot
+
" venv="
+
venvPython
+
" script="
+
script
+
" err="
+
e
.
getMessage
());
sendJson
(
exchange
,
500
,
"{\"ok\":false,\"error\":\"Failed to start rag_query\",\"detail\":\""
+
detail
+
"\"}"
);
return
;
return
;
}
}
byte
[]
out
;
byte
[]
out
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment