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
Documentation fixes:
- README.md: Go version badge 1.25+ → 1.24.4+ to match go.mod
- internal/service/tools/README.md: corrected filenames in tool table
and package tree (update_tools.go → updates.go, agent_skills.go → skills.go)
- internal/updater/README.md: sha256sums.txt → checksums.txt, removed
non-existent info.UpdateAvailable field from example code
- docs/headless-usage.md: rewritten to match current implementation —
SSE/session endpoints → stateless /mcp, --port → --http-port,
ragcode-sse skill → ragcode-http
Code fixes:
- pkg/telemetry/metrics_reader.go: increased scanner buffer to 1MB for
long JSONL lines, added explicit HybridSearches counter (was incorrectly
counted as VectorSearches)
- smart_search_pipeline.go: normalizeInput now clamps min_score to
[0.0, 1.0] range, buildFallbackNote no longer emits empty 'Progress: .'
when all languages have TotalFiles==0, restored SessionMetrics population
in buildResponseMeta via telemetry.ReadAggregatedMetrics
Deferred (4 items for separate PRs):
- existingCollections edge case in engine fan-out
- lazy embed optimization for unindexed workspaces
- reportLang/reportColl accuracy for polyglot workspaces
- score filter unit test coverage
RagCode MCP is primarily an MCP Server designed to be invoked via `stdio` by conforming clients (like Cursor, Windsurf, Claude Desktop). However, the architecture is **Protocol Agnostic**, allowing it to be used "headlessly" without IDE integration.
4
4
5
5
This is especially useful for purely autonomous AI agents (like Antigravity scripts, custom Python bots, or CI/CD integrations) that need to issue JSON-RPC queries to the engine over TCP instead of standard I/O pipes.
6
6
7
-
## SSE (Server-Sent Events) Mode
7
+
## Streamable HTTP Mode
8
8
9
-
RagCode features a subpackage `internal/daemon/` which can spawn an SSE HTTP server that perfectly conforms to the MCP standard over HTTP GET/POST.
9
+
RagCode features a subpackage `internal/daemon/` which spawns a stateless Streamable HTTP handler that conforms to the MCP standard.
10
10
11
11
To start the daemon:
12
12
13
13
```bash
14
-
rag-code-mcp --port 8080
14
+
rag-code-mcp --http-port 8080
15
15
```
16
16
17
17
When the server starts successfully, it will print:
18
-
`[INFO] SSE MCP server listening on :8080`
18
+
`[INFO] HTTP MCP server listening on :8080`
19
19
20
20
### Example Integration (Using cURL or HTTP Agents)
21
21
22
-
Once the daemon is active, your AI Script can connect to it using standard MCP-over-SSE endpoints:
22
+
Once the daemon is active, your AI Script can send standard MCP JSON-RPC requests directly to the `/mcp` endpoint:
23
23
24
-
**1. Establish an SSE Session (GET)**
24
+
**Send an MCP Command (POST)**
25
25
```bash
26
-
curl -N http://localhost:8080/sse
27
-
```
28
-
*This endpoint yields events and is intended to be kept alive. It will return a URI specifying the exact Session ID endpoint where you must send queries.*
29
-
30
-
**2. Send an MCP Command (POST)**
31
-
Suppose the SSE terminal returned `Endpoint: /message?sessionId=123`.
32
-
33
-
```bash
34
-
curl -X POST http://localhost:8080/message?sessionId=123 \
26
+
curl -X POST http://localhost:8080/mcp \
35
27
-H "Content-Type: application/json" \
36
28
-d '{
37
29
"jsonrpc": "2.0",
@@ -47,16 +39,16 @@ curl -X POST http://localhost:8080/message?sessionId=123 \
47
39
}'
48
40
```
49
41
50
-
The response will be sent via JSON-RPC 2.0 back on the open `/sse` channel you hold.
42
+
The response will be returned as a standard JSON-RPC 2.0 response in the HTTP body.
51
43
52
-
## "The `ragcode-sse` Skill" Integration
44
+
## "The `ragcode-http` Skill" Integration
53
45
54
-
For agents that do not inherently support SSE/MCP natively in their prompt cycle, developers can push the officially provided `ragcode-sse` agent skill.
46
+
For agents that do not inherently support MCP natively in their prompt cycle, developers can push the officially provided `ragcode-http` agent skill.
55
47
56
-
This skill injects bash commands that wrap `curl` payloads, allowing the agent to perform raw POST/GET queries seamlessly, extracting context from large workspaces directly into standard markdown without installing a Desktop IDE.
48
+
This skill injects bash commands that wrap `curl` payloads, allowing the agent to perform raw POST queries seamlessly, extracting context from large workspaces directly into standard markdown without installing a Desktop IDE.
3. The agent reads `SKILL.md` to learn how to frame HTTP POST queries toward port `8080`.
61
53
62
54
**Note on Workspace Context:** Always ensure the script explicitly sends `"file_path": "/absolute/path/to/project/file.ext"` inside the arguments payload. Without an IDE, RagCode completely relies on `file_path` to map the workspace identity correctly.
0 commit comments