Skip to content

Commit 5566f21

Browse files
committed
Restructure Sophia MCP docs for clarity
1 parent 777e011 commit 5566f21

1 file changed

Lines changed: 26 additions & 49 deletions

File tree

docs/cloud/sophia/mcp.adoc

Lines changed: 26 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -10,45 +10,18 @@ applies_to: both
1010

1111
Connect any link:https://modelcontextprotocol.io[MCP-compatible] AI client to your RESTHeart knowledge base in minutes.
1212

13-
=== Public vs Authenticated Access
13+
=== Public MCP Contexts
1414

15-
Sophia MCP supports two access modes:
15+
Sophia exposes two public MCP contexts — no account or token required:
1616

1717
[cols="1,2,2", options="header"]
1818
|===
19-
| Mode | When to use | Headers required
20-
| *Public* | Knowledge bases with `public` tag | _(none)_
21-
| *Authenticated* | Private knowledge bases | `Authorization: Bearer <token>`
22-
|===
23-
24-
For authenticated access, issue an API token from the admin panel (see link:/docs/cloud/sophia/administrator-guide#_api_token_management[API Token Management]). The admin panel can generate ready-to-paste MCP configuration snippets for each token.
25-
26-
The token can be passed either as a standard `Authorization: Bearer <token>` header or as a `?token=<jwt>` query parameter — useful for clients that do not support custom headers:
27-
28-
`https://sophia-api.restheart.com/mcp/restheart/?token=<your-token>`
29-
30-
image::../../../images/sophia/token-mcp-config.png[MCP config generation]
31-
32-
=== Selecting a Context
33-
34-
Sophia supports multiple *Contexts*, each representing a distinct knowledge base with its own prompt template, tag filters, and RAG options. The context is selected via the URL path.
35-
36-
[cols="1,2,2", options="header"]
37-
|===
38-
| Context | URL | Knowledge base
19+
| Context | Endpoint | Knowledge base
3920
| `restheart` | `https://sophia-api.restheart.com/mcp/restheart/` | RESTHeart documentation, plugin API, configuration guides
4021
| `cloud` | `https://sophia-api.restheart.com/mcp/cloud/` | RESTHeart Cloud managed service docs
4122
|===
4223

43-
NOTE: Available contexts depend on your Sophia instance. Use the admin panel to create and manage contexts.
44-
45-
==== Filtering by Tag
46-
47-
Within a context, documents are organized by *tags*. Pass the optional `tags` parameter to the `sophia_search` tool to narrow retrieval to documents that carry the specified tags. Use `sophia_list_tags` to discover which tags are available in your context.
48-
49-
=== Configuration Examples
50-
51-
==== Claude Desktop (public context)
24+
To connect immediately with Claude Desktop, add this to `claude_desktop_config.json`:
5225

5326
[source,json]
5427
----
@@ -62,9 +35,19 @@ Within a context, documents are organized by *tags*. Pass the optional `tags` pa
6235
}
6336
----
6437

65-
==== Claude Desktop (authenticated)
38+
=== Authenticated Access
39+
40+
Private knowledge bases require an API token. Issue one from the admin panel (see link:/docs/cloud/sophia/administrator-guide#_api_token_management[API Token Management]). The admin panel generates ready-to-paste MCP configuration snippets for each token.
41+
42+
image::../../../images/sophia/token-mcp-config.png[MCP config generation]
43+
44+
The token can be passed as an `Authorization: Bearer <token>` header or, for clients that do not support custom headers, as a `?token=<jwt>` query parameter:
45+
46+
`https://sophia-api.restheart.com/mcp/<context>/?token=<your-token>`
6647

67-
When configuring via `claude_desktop_config.json`, pass the token as a header:
48+
=== Configuration Examples
49+
50+
==== Claude Desktop (authenticated via config file)
6851

6952
[source,json]
7053
----
@@ -82,25 +65,11 @@ When configuring via `claude_desktop_config.json`, pass the token as a header:
8265
}
8366
----
8467

85-
When configuring via the Claude Desktop UI, custom headers are not available — use OAuth client credentials instead, which Sophia supports natively.
86-
8768
Add the snippet under `mcpServers` in `claude_desktop_config.json` (`~/Library/Application Support/Claude/` on macOS, `%APPDATA%\Claude\` on Windows), then restart.
8869

89-
==== Cursor / VS Code (SSE transport)
90-
91-
Cursor and VS Code support HTTP/SSE natively:
92-
93-
[source,json]
94-
----
95-
{
96-
"sophia-restheart": {
97-
"type": "sse",
98-
"url": "https://sophia-api.restheart.com/mcp/restheart/"
99-
}
100-
}
101-
----
70+
When configuring via the Claude Desktop UI, custom headers are not available — use OAuth client credentials instead, which Sophia supports natively.
10271

103-
With authentication:
72+
==== Cursor / VS Code (SSE transport)
10473

10574
[source,json]
10675
----
@@ -121,6 +90,14 @@ Add to your project's `.mcp.json` or global MCP config.
12190

12291
The snippets above use link:https://www.npmjs.com/package/mcp-remote[`mcp-remote`], a small Node.js bridge that exposes the HTTP endpoint as a local `stdio` process — the format most clients expect. It requires link:https://nodejs.org[Node.js >= 18] and is downloaded automatically by `npx` on first run.
12392

93+
=== Selecting a Context
94+
95+
Each context has its own URL path. Contexts define the knowledge base scope, prompt template, and RAG options. Use the admin panel to create and manage additional contexts.
96+
97+
==== Filtering by Tag
98+
99+
Within a context, documents are organized by *tags*. Pass the optional `tags` parameter to the `sophia_search` tool to narrow retrieval to documents that carry the specified tags. Use `sophia_list_tags` to discover which tags are available.
100+
124101
=== Available Tools
125102

126103
[cols="1,3", options="header"]

0 commit comments

Comments
 (0)