@adaptiqai/mcp 0.1.1 → 0.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/plugin.json +1 -1
- package/README.md +46 -12
- package/lib/index.js +1065 -392
- package/package.json +4 -3
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# AdaptiqAI for Claude Code, Cline and any MCP app
|
|
1
|
+
# AdaptiqAI for Claude Code, Cline, Codex and any MCP app
|
|
2
2
|
|
|
3
3
|
Your AdaptiqAI knowledge and this conversation's memory, as tools for the
|
|
4
4
|
agent: an MCP server, over stdio, on the AdaptiqAI core.
|
|
@@ -33,6 +33,33 @@ That writes `~/.cline/data/settings/cline_mcp_settings.json`:
|
|
|
33
33
|
{ "mcpServers": { "adaptiqai": { "transport": { "type": "stdio", "command": "npx", "args": ["-y", "@adaptiqai/mcp"] } } } }
|
|
34
34
|
```
|
|
35
35
|
|
|
36
|
+
**Codex** (0.166)
|
|
37
|
+
|
|
38
|
+
Connect to app in the AdaptiqAI console sets it up in the `adaptiq` profile it
|
|
39
|
+
writes (`codex --profile adaptiq`). By hand, add it to the profile that runs
|
|
40
|
+
Codex on AdaptiqAI, not to `config.toml`: Codex tells the server nothing of
|
|
41
|
+
where its model requests go, and on another provider the tools would act on
|
|
42
|
+
a conversation the model never reads.
|
|
43
|
+
|
|
44
|
+
```toml
|
|
45
|
+
[mcp_servers.adaptiqai]
|
|
46
|
+
command = "npx"
|
|
47
|
+
args = ["-y", "@adaptiqai/mcp"]
|
|
48
|
+
env_vars = ["CODEX_HOME"]
|
|
49
|
+
|
|
50
|
+
[mcp_servers.adaptiqai.tools.adaptiq_knowledge]
|
|
51
|
+
approval_mode = "approve"
|
|
52
|
+
|
|
53
|
+
[mcp_servers.adaptiqai.tools.adaptiq_memory]
|
|
54
|
+
approval_mode = "approve"
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
Codex offers an MCP server's tools in a `namespace` tool of the Responses
|
|
58
|
+
API (`mcp__adaptiqai`), and asks before each call of a tool that does not say
|
|
59
|
+
it only reads, unless `approval_mode` says otherwise; saving knowledge still
|
|
60
|
+
asks. Codex passes a server only a few variables of its environment, so
|
|
61
|
+
`CODEX_HOME`, where it keeps its conversations, is named.
|
|
62
|
+
|
|
36
63
|
**Any other MCP app**: run `npx -y @adaptiqai/mcp` as a stdio server.
|
|
37
64
|
|
|
38
65
|
## Sign in
|
|
@@ -45,6 +72,8 @@ comes first: knowledge has to be in the workspace the app's model reads.
|
|
|
45
72
|
passes its environment on to the servers it starts, and the server uses the
|
|
46
73
|
key Claude Code runs on when `ANTHROPIC_BASE_URL` is AdaptiqAI's. Cline's
|
|
47
74
|
OpenRouter provider, pointed at AdaptiqAI, keeps its key in Cline's settings.
|
|
75
|
+
Codex hands a server no key of its own: Connect to app's profile starts the
|
|
76
|
+
server with the key Codex runs on as `ADAPTIQAI_API_KEY`.
|
|
48
77
|
- **A key**: `ADAPTIQAI_API_KEY` in the server's environment.
|
|
49
78
|
- **In the browser**: `npx -y @adaptiqai/mcp login`, or simply ask the agent
|
|
50
79
|
for your knowledge: while the computer is signed out, the first tool call
|
|
@@ -58,12 +87,16 @@ alone.
|
|
|
58
87
|
|
|
59
88
|
## What it does
|
|
60
89
|
|
|
61
|
-
- **`adaptiq_knowledge`**: what this conversation uses;
|
|
62
|
-
|
|
90
|
+
- **`adaptiq_knowledge`**: what this conversation uses; find words, ids or
|
|
91
|
+
names in the text of its collections, with the exact lines as
|
|
92
|
+
document:line; search your saved knowledge by name; use or stop a
|
|
93
|
+
collection here. An MCP server has no hook into a turn, so it can't tell a
|
|
94
|
+
turn which collections the conversation reads, as the other plugins do; the
|
|
95
|
+
tool and the server's instructions lead with find instead.
|
|
63
96
|
- **`adaptiq_memory`**: how full the memory is; your saved collections; opens
|
|
64
97
|
Knowledge in the browser to tidy up. It can't keep a conversation private,
|
|
65
|
-
as the DeepSeek Harness and Pi plugins can: Claude Code
|
|
66
|
-
model requests themselves, so AdaptiqAI saves what they send.
|
|
98
|
+
as the DeepSeek Harness and Pi plugins can: Claude Code, Cline and Codex
|
|
99
|
+
send their model requests themselves, so AdaptiqAI saves what they send.
|
|
67
100
|
- **`adaptiq_create_knowledge`**: save material (text, files, links) as a
|
|
68
101
|
collection, only when you ask for it. The server checks the request
|
|
69
102
|
against your own messages in the conversation, as every AdaptiqAI plugin
|
|
@@ -77,15 +110,16 @@ Harness and Pi plugins have (`agentTools` in `@adaptiqai/core`).
|
|
|
77
110
|
MCP has no conversation id, so the server reads each app where it keeps its
|
|
78
111
|
own:
|
|
79
112
|
|
|
80
|
-
| | Claude Code 2.1.308 | Cline 3.0.74 |
|
|
81
|
-
|
|
82
|
-
| What the app hands the server | `CLAUDE_CODE_SESSION_ID`, `CLAUDE_PROJECT_DIR` and its own environment; `_meta["claudecode/toolUseId"]` on every call | nothing (no id in the environment or `_meta`) |
|
|
83
|
-
| What its model requests name | `x-claude-code-session-id`, the same id | body `session_id`, only on its OpenRouter provider |
|
|
84
|
-
| How the server finds the call's conversation | the transcript (`~/.claude/projects/…/<id>.jsonl`) that holds the call's tool-use id: Claude Code keeps the server across `/clear` and `/resume`, so the starting id goes stale. An agent's call is in the agent's own transcript (`<id>/subagents/…/agent-<agent>.jsonl`), and is the session `<id>.<agent>`, as the gateway names an agent's requests; what an agent saves stays the chat's | the conversation whose messages file (`~/.cline/data/sessions/<id>/<id>.messages.json`) holds the call, not answered yet: Cline writes it there a few milliseconds before it makes it. Cline's hub runs every task in one process, so when two tasks make the same call at once, or no file holds it, the record started last before this server wins: Cline starts a server for each conversation |
|
|
85
|
-
| What has to be true for it to reach the model | Claude Code on the AdaptiqAI gateway with `CLAUDE_CODE_GATEWAY_HINT_HEADERS=1` (the gateway names a chat only from `x-claude-code-request-class: main`) | Cline's OpenRouter provider with its base URL set to the AdaptiqAI gateway |
|
|
113
|
+
| | Claude Code 2.1.308 | Cline 3.0.74 | Codex 0.166 |
|
|
114
|
+
|---|---|---|---|
|
|
115
|
+
| What the app hands the server | `CLAUDE_CODE_SESSION_ID`, `CLAUDE_PROJECT_DIR` and its own environment; `_meta["claudecode/toolUseId"]` on every call | nothing (no id in the environment or `_meta`) | `_meta.threadId` and `_meta.sessionId` on every call |
|
|
116
|
+
| What its model requests name | `x-claude-code-session-id`, the same id | body `session_id`, only on its OpenRouter provider | body `client_metadata.thread_id`, the same thread |
|
|
117
|
+
| How the server finds the call's conversation | the transcript (`~/.claude/projects/…/<id>.jsonl`) that holds the call's tool-use id: Claude Code keeps the server across `/clear` and `/resume`, so the starting id goes stale. An agent's call is in the agent's own transcript (`<id>/subagents/…/agent-<agent>.jsonl`), and is the session `<id>.<agent>`, as the gateway names an agent's requests; what an agent saves stays the chat's | the conversation whose messages file (`~/.cline/data/sessions/<id>/<id>.messages.json`) holds the call, not answered yet: Cline writes it there a few milliseconds before it makes it. Cline's hub runs every task in one process, so when two tasks make the same call at once, or no file holds it, the record started last before this server wins: Cline starts a server for each conversation | the thread `_meta.threadId` names: an agent the chat starts is a thread of its own, as its requests are; what an agent saves stays the chat's (`_meta.sessionId`). The chat's rollout (`$CODEX_HOME/sessions/<year>/<month>/<day>/rollout-<time>-<thread>.jsonl`, under the day the thread began) gives its folder and the person's messages |
|
|
118
|
+
| What has to be true for it to reach the model | Claude Code on the AdaptiqAI gateway with `CLAUDE_CODE_GATEWAY_HINT_HEADERS=1` (the gateway names a chat only from `x-claude-code-request-class: main`) | Cline's OpenRouter provider with its base URL set to the AdaptiqAI gateway | Codex on the AdaptiqAI gateway with a key Connect to app made for Codex (the gateway names a thread only for one), and the server in that profile alone |
|
|
86
119
|
|
|
87
120
|
When that is not so, every tool says why instead of attaching knowledge to a
|
|
88
|
-
conversation the model never reads
|
|
121
|
+
conversation the model never reads; Codex alone gives the server no sign of
|
|
122
|
+
it, so there it rests on the profile. An app other than these three names no
|
|
89
123
|
conversation, so its tool calls are refused the same way.
|
|
90
124
|
|
|
91
125
|
The transcript also holds your own messages, which `adaptiq_create_knowledge`
|