agenticros 0.3.1 → 0.3.4

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.
Files changed (55) hide show
  1. package/README.md +13 -5
  2. package/dist/__tests__/claude-config.test.d.ts +2 -0
  3. package/dist/__tests__/claude-config.test.d.ts.map +1 -0
  4. package/dist/__tests__/claude-config.test.js +77 -0
  5. package/dist/__tests__/claude-config.test.js.map +1 -0
  6. package/dist/__tests__/hermes-config.test.d.ts +2 -0
  7. package/dist/__tests__/hermes-config.test.d.ts.map +1 -0
  8. package/dist/__tests__/hermes-config.test.js +88 -0
  9. package/dist/__tests__/hermes-config.test.js.map +1 -0
  10. package/dist/__tests__/mcp-setup.test.d.ts +2 -0
  11. package/dist/__tests__/mcp-setup.test.d.ts.map +1 -0
  12. package/dist/__tests__/mcp-setup.test.js +23 -0
  13. package/dist/__tests__/mcp-setup.test.js.map +1 -0
  14. package/dist/commands/claude.d.ts +16 -0
  15. package/dist/commands/claude.d.ts.map +1 -0
  16. package/dist/commands/claude.js +30 -0
  17. package/dist/commands/claude.js.map +1 -0
  18. package/dist/commands/codex.d.ts +4 -4
  19. package/dist/commands/codex.d.ts.map +1 -1
  20. package/dist/commands/codex.js +21 -90
  21. package/dist/commands/codex.js.map +1 -1
  22. package/dist/commands/doctor.d.ts.map +1 -1
  23. package/dist/commands/doctor.js +30 -22
  24. package/dist/commands/doctor.js.map +1 -1
  25. package/dist/commands/hermes.d.ts +14 -0
  26. package/dist/commands/hermes.d.ts.map +1 -0
  27. package/dist/commands/hermes.js +21 -0
  28. package/dist/commands/hermes.js.map +1 -0
  29. package/dist/commands/init.d.ts +1 -1
  30. package/dist/commands/init.d.ts.map +1 -1
  31. package/dist/commands/init.js +16 -18
  32. package/dist/commands/init.js.map +1 -1
  33. package/dist/commands/mcp.d.ts +20 -0
  34. package/dist/commands/mcp.d.ts.map +1 -0
  35. package/dist/commands/mcp.js +31 -0
  36. package/dist/commands/mcp.js.map +1 -0
  37. package/dist/index.js +76 -0
  38. package/dist/index.js.map +1 -1
  39. package/dist/util/claude-config.d.ts +47 -0
  40. package/dist/util/claude-config.d.ts.map +1 -0
  41. package/dist/util/claude-config.js +227 -0
  42. package/dist/util/claude-config.js.map +1 -0
  43. package/dist/util/hermes-config.d.ts +51 -0
  44. package/dist/util/hermes-config.d.ts.map +1 -0
  45. package/dist/util/hermes-config.js +277 -0
  46. package/dist/util/hermes-config.js.map +1 -0
  47. package/dist/util/mcp-setup.d.ts +55 -0
  48. package/dist/util/mcp-setup.d.ts.map +1 -0
  49. package/dist/util/mcp-setup.js +235 -0
  50. package/dist/util/mcp-setup.js.map +1 -0
  51. package/package.json +2 -1
  52. package/runtime/BUNDLE.json +1 -1
  53. package/runtime/README.md +87 -10
  54. package/runtime/docs/cli.md +89 -2
  55. package/runtime/packages/agenticros-claude-code/README.md +35 -0
@@ -0,0 +1,235 @@
1
+ /**
2
+ * Unified MCP host setup for Codex, Hermes, and Claude (Option C).
3
+ *
4
+ * All hosts register the same `@agenticros/claude-code` stdio server with an
5
+ * absolute path and empty AGENTICROS_ROBOT_NAMESPACE.
6
+ */
7
+ import { execa } from "execa";
8
+ import { buildCodexDoctorChecks, globalCodexConfigPath, projectCodexConfigPath, writeCodexAgenticrosConfig, } from "./codex-config.js";
9
+ import { buildHermesDoctorChecks, globalHermesConfigPath, writeHermesAgenticrosConfig, } from "./hermes-config.js";
10
+ import { buildClaudeDoctorChecks, claudeDesktopConfigPath, projectMcpJsonPath, writeClaudeAgenticrosConfig, } from "./claude-config.js";
11
+ import { findMcpEntry } from "./mcp-discovery.js";
12
+ import { colors, info, ok, warn, err } from "./logger.js";
13
+ export async function codexOnPath() {
14
+ try {
15
+ const { exitCode } = await execa("codex", ["--version"], { reject: false });
16
+ return exitCode === 0;
17
+ }
18
+ catch {
19
+ return false;
20
+ }
21
+ }
22
+ export async function hermesOnPath() {
23
+ try {
24
+ const { exitCode } = await execa("hermes", ["--version"], { reject: false });
25
+ return exitCode === 0;
26
+ }
27
+ catch {
28
+ try {
29
+ const { exitCode } = await execa("hermes", ["--help"], { reject: false });
30
+ return exitCode === 0;
31
+ }
32
+ catch {
33
+ return false;
34
+ }
35
+ }
36
+ }
37
+ export async function claudeOnPath() {
38
+ try {
39
+ const { exitCode } = await execa("claude", ["--version"], { reject: false });
40
+ return exitCode === 0;
41
+ }
42
+ catch {
43
+ try {
44
+ const { exitCode } = await execa("claude", ["--help"], { reject: false });
45
+ return exitCode === 0;
46
+ }
47
+ catch {
48
+ return false;
49
+ }
50
+ }
51
+ }
52
+ export function resolveMcpHosts(opts) {
53
+ if (opts.codexScope === "project" && opts.codex !== false) {
54
+ return ["codex"];
55
+ }
56
+ const explicit = ["codex", "hermes", "claude"].filter((h) => opts[h]);
57
+ if (explicit.length > 0)
58
+ return [...explicit];
59
+ if (opts.all !== false)
60
+ return ["codex", "hermes", "claude"];
61
+ return ["codex", "hermes", "claude"];
62
+ }
63
+ export function requireMcpEntry() {
64
+ const mcpEntry = findMcpEntry();
65
+ if (!mcpEntry) {
66
+ err("AgenticROS MCP server is not built.");
67
+ info("Run `pnpm --filter @agenticros/claude-code build` or `agenticros init` first.");
68
+ process.exit(1);
69
+ }
70
+ return mcpEntry;
71
+ }
72
+ export function setupCodexMcp(mcpEntry, scope, cwd) {
73
+ const configPath = scope === "global" ? globalCodexConfigPath() : projectCodexConfigPath(cwd);
74
+ writeCodexAgenticrosConfig(configPath, mcpEntry, { namespace: "" });
75
+ return configPath;
76
+ }
77
+ export function setupHermesMcp(mcpEntry) {
78
+ const configPath = globalHermesConfigPath();
79
+ writeHermesAgenticrosConfig(configPath, mcpEntry, { namespace: "" });
80
+ return configPath;
81
+ }
82
+ export function setupClaudeMcp(mcpEntry, target, cwd) {
83
+ const configPath = target === "project" ? projectMcpJsonPath(cwd) : claudeDesktopConfigPath();
84
+ writeClaudeAgenticrosConfig(configPath, mcpEntry, { namespace: "" });
85
+ return configPath;
86
+ }
87
+ export async function mcpSetupCommand(opts = {}) {
88
+ const mcpEntry = requireMcpEntry();
89
+ const hosts = resolveMcpHosts(opts);
90
+ const repoRoot = opts.repoRoot;
91
+ const cwd = opts.cwd ?? process.cwd();
92
+ if (!opts.quiet) {
93
+ info(`Configuring AgenticROS MCP for: ${hosts.join(", ")}`);
94
+ info(`MCP server: ${mcpEntry}\n`);
95
+ }
96
+ const written = [];
97
+ const explicitHosts = ["codex", "hermes", "claude"].filter((h) => opts[h]);
98
+ const isFullSetup = explicitHosts.length === 0 || explicitHosts.length === 3;
99
+ if (hosts.includes("codex")) {
100
+ if (opts.codexScope === "project") {
101
+ written.push(setupCodexMcp(mcpEntry, "project", repoRoot ?? cwd));
102
+ }
103
+ else {
104
+ written.push(setupCodexMcp(mcpEntry, "global"));
105
+ if (opts.project || (isFullSetup && repoRoot)) {
106
+ written.push(setupCodexMcp(mcpEntry, "project", repoRoot ?? cwd));
107
+ }
108
+ }
109
+ }
110
+ if (hosts.includes("hermes")) {
111
+ written.push(setupHermesMcp(mcpEntry));
112
+ }
113
+ if (hosts.includes("claude")) {
114
+ const desktopOnly = opts.desktop && !opts.project;
115
+ const projectOnly = opts.project && !opts.desktop;
116
+ if (!projectOnly) {
117
+ written.push(setupClaudeMcp(mcpEntry, "desktop"));
118
+ }
119
+ if (!desktopOnly && (opts.project || (isFullSetup && repoRoot) || projectOnly)) {
120
+ written.push(setupClaudeMcp(mcpEntry, "project", repoRoot ?? cwd));
121
+ }
122
+ }
123
+ for (const path of written) {
124
+ ok(`Wrote: ${path}`);
125
+ }
126
+ if (hosts.includes("codex")) {
127
+ const hasCodex = await codexOnPath();
128
+ if (hasCodex) {
129
+ info("Codex CLI detected — verify with `/mcp` in a Codex session.");
130
+ }
131
+ else {
132
+ warn("Codex CLI not on PATH.");
133
+ }
134
+ }
135
+ if (hosts.includes("hermes")) {
136
+ const hasHermes = await hermesOnPath();
137
+ if (hasHermes) {
138
+ info("Hermes detected — run `/reload-mcp` or `hermes mcp test agenticros`.");
139
+ }
140
+ else {
141
+ warn("Hermes CLI not on PATH.");
142
+ }
143
+ }
144
+ if (hosts.includes("claude")) {
145
+ const hasClaude = await claudeOnPath();
146
+ if (hasClaude) {
147
+ info("Claude Code CLI detected — run `claude` from the project with `.mcp.json`.");
148
+ }
149
+ else {
150
+ warn("Claude CLI not on PATH (Desktop config may still apply).");
151
+ }
152
+ info("Restart Claude Desktop fully (Cmd+Q) after desktop config changes.");
153
+ }
154
+ }
155
+ export function buildMcpDoctorChecks(mcpEntryExpected, repoRoot, hosts) {
156
+ const active = hosts ?? ["codex", "hermes", "claude"];
157
+ const checks = [];
158
+ if (active.includes("codex")) {
159
+ checks.push(...buildCodexDoctorChecks(mcpEntryExpected, repoRoot));
160
+ }
161
+ if (active.includes("hermes")) {
162
+ checks.push(...buildHermesDoctorChecks(mcpEntryExpected));
163
+ }
164
+ if (active.includes("claude")) {
165
+ checks.push(...buildClaudeDoctorChecks(mcpEntryExpected, repoRoot));
166
+ }
167
+ return checks;
168
+ }
169
+ export async function mcpDoctorCommand(opts = {}) {
170
+ const mcpEntry = findMcpEntry();
171
+ const hosts = opts.hosts ?? ["codex", "hermes", "claude"];
172
+ const checks = buildMcpDoctorChecks(mcpEntry, opts.repoRoot, hosts);
173
+ const cliChecks = [];
174
+ if (hosts.includes("codex")) {
175
+ const on = await codexOnPath();
176
+ cliChecks.push({
177
+ id: "codex-cli",
178
+ label: on ? "Codex CLI installed" : "Codex CLI not detected",
179
+ severity: on ? "green" : "yellow",
180
+ hint: on ? undefined : "Install from https://developers.openai.com/codex/",
181
+ });
182
+ }
183
+ if (hosts.includes("hermes")) {
184
+ const on = await hermesOnPath();
185
+ cliChecks.push({
186
+ id: "hermes-cli",
187
+ label: on ? "Hermes CLI installed" : "Hermes CLI not detected",
188
+ severity: on ? "green" : "yellow",
189
+ hint: on ? undefined : "Install from https://github.com/NousResearch/hermes-agent",
190
+ });
191
+ }
192
+ if (hosts.includes("claude")) {
193
+ const on = await claudeOnPath();
194
+ cliChecks.push({
195
+ id: "claude-cli",
196
+ label: on ? "Claude Code CLI installed" : "Claude Code CLI not detected",
197
+ severity: on ? "green" : "yellow",
198
+ hint: on ? undefined : "Install from https://claude.com/product/claude-code",
199
+ });
200
+ }
201
+ const allChecks = [...checks, ...cliChecks];
202
+ const exitCode = allChecks.some((c) => c.severity === "red")
203
+ ? 1
204
+ : allChecks.some((c) => c.severity === "yellow")
205
+ ? 0
206
+ : 0;
207
+ if (opts.json) {
208
+ process.stdout.write(JSON.stringify({ hosts, mcpEntry, checks: allChecks }, null, 2) + "\n");
209
+ return allChecks.some((c) => c.severity === "red") ? 1 : 0;
210
+ }
211
+ if (!opts.quiet) {
212
+ process.stdout.write(`${colors.bold("MCP doctor")}\n`);
213
+ if (!mcpEntry) {
214
+ err("MCP server not built.");
215
+ return 1;
216
+ }
217
+ info(`Expected MCP entry: ${mcpEntry}\n`);
218
+ }
219
+ for (const c of allChecks) {
220
+ const icon = c.severity === "green"
221
+ ? colors.green("✓")
222
+ : c.severity === "red"
223
+ ? colors.red("✗")
224
+ : colors.yellow("○");
225
+ process.stdout.write(` ${icon} ${c.label}\n`);
226
+ if ("detail" in c && c.detail) {
227
+ process.stdout.write(` ${colors.dim(c.detail)}\n`);
228
+ }
229
+ if (c.hint) {
230
+ process.stdout.write(` ${colors.dim("→ " + c.hint)}\n`);
231
+ }
232
+ }
233
+ return allChecks.some((c) => c.severity === "red") ? 1 : 0;
234
+ }
235
+ //# sourceMappingURL=mcp-setup.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mcp-setup.js","sourceRoot":"","sources":["../../src/util/mcp-setup.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,KAAK,EAAE,MAAM,OAAO,CAAC;AAE9B,OAAO,EAEL,sBAAsB,EACtB,qBAAqB,EACrB,sBAAsB,EACtB,0BAA0B,GAC3B,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACL,uBAAuB,EACvB,sBAAsB,EACtB,2BAA2B,GAC5B,M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AAK,CAAC,GAAG,CAAC;YACnB,CAAC,CAAC,CAAC,CAAC,QAAQ,KAAK,KAAK;gBACpB,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC;gBACjB,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;QAC3B,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,IAAI,IAAI,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC;QAC/C,IAAI,QAAQ,IAAI,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,CAAC;YAC9B,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,QAAQ,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QACzD,CAAC;QACD,IAAI,CAAC,CAAC,IAAI,EAAE,CAAC;YACX,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,QAAQ,MAAM,CAAC,GAAG,CAAC,IAAI,GAAG,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC9D,CAAC;IACH,CAAC;IAED,OAAO,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAC7D,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agenticros",
3
- "version": "0.3.1",
3
+ "version": "0.3.4",
4
4
  "type": "module",
5
5
  "description": "AgenticROS - agentic AI for ROS-powered robots. Single CLI to launch real-robot or simulated demos, manage configuration, and inspect status.",
6
6
  "keywords": [
@@ -11,6 +11,7 @@
11
11
  "agent",
12
12
  "claude",
13
13
  "codex",
14
+ "hermes",
14
15
  "openai",
15
16
  "openclaw",
16
17
  "gazebo",
@@ -1,5 +1,5 @@
1
1
  {
2
- "packedAt": "2026-06-30T23:41:17.957Z",
2
+ "packedAt": "2026-07-06T14:26:08.936Z",
3
3
  "repo": "https://github.com/PlaiPin/agenticros",
4
4
  "note": "This directory is a snapshot of the agenticros monorepo source. `agenticros init` will copy it to ~/agenticros and run pnpm install + colcon build there.",
5
5
  "layout": {
package/runtime/README.md CHANGED
@@ -28,6 +28,7 @@ With AgenticROS, your robot can describe what it sees, follow intent ("go check
28
28
  - **[NVIDIA NemoClaw](https://github.com/NVIDIA/NemoClaw)** — Run AgenticROS inside NemoClaw's OpenShell sandbox with policy-enforced egress and managed NVIDIA inference; ROS 2, RealSense, and rosbridge stay on the host while the plugin runs sandboxed.
29
29
  - **[Anthropic Claude](https://www.anthropic.com/claude)** — A single MCP server powers **Claude Code** (terminal), **Claude Desktop** (macOS / Windows), and **Claude Dispatch** (iOS, paired to your Mac). Ask Claude what your robot sees, and it answers with a live camera snapshot and depth reading.
30
30
  - **[OpenAI Codex CLI](https://developers.openai.com/codex/)** — Same MCP server as Claude Code. One command registers Codex: `agenticros codex setup` (writes `~/.codex/config.toml` with an absolute path to the MCP binary). Full tool surface: missions, follow-me, find-object, memory. Setup guide: [docs/codex-setup.md](docs/codex-setup.md).
31
+ - **[Hermes Agent](https://github.com/NousResearch/hermes-agent)** — Model-agnostic agent gateway (OpenRouter, Ollama, 200+ providers) with MCP client support. Same MCP server as Codex: `agenticros hermes setup` writes `~/.hermes/config.yaml`. Setup guide: [docs/hermes-setup.md](docs/hermes-setup.md).
31
32
  - **[Google Gemini](https://ai.google.dev/)** — Standalone CLI that uses Gemini function calling against the same ROS 2 tools (no MCP required) — ideal for scripting and headless agents.
32
33
 
33
34
  AgenticROS is built so that new adapters (LangGraph, OpenAI, local models, voice stacks, etc.) can be added without touching the ROS 2 layer. The core transport and tool contract are platform-agnostic; adapters are thin shims that surface those tools to each agent runtime.
@@ -38,13 +39,14 @@ AgenticROS is built so that new adapters (LangGraph, OpenAI, local models, voice
38
39
 
39
40
  - **Core** (`packages/core`): Platform-agnostic ROS2 transport (rosbridge, Zenoh, local, WebRTC), config schema, and shared types. No dependency on any specific AI platform.
40
41
  - **Adapters** (`packages/agenticros`, and later others): Implement the contract for each AI platform. The OpenClaw adapter registers tools, commands, and HTTP routes with the OpenClaw gateway and uses the core for all ROS2 communication.
41
- - `**packages/agenticros-claude-code`** — MCP server for **Claude Code**, **Claude desktop**, **Dispatch**, and **OpenAI Codex CLI**. See [packages/agenticros-claude-code/README.md](packages/agenticros-claude-code/README.md) and [docs/codex-setup.md](docs/codex-setup.md).
42
+ - `**packages/agenticros-claude-code`** — MCP server for **Claude Code**, **Claude desktop**, **Dispatch**, **OpenAI Codex CLI**, and **Hermes Agent**. See [packages/agenticros-claude-code/README.md](packages/agenticros-claude-code/README.md), [docs/codex-setup.md](docs/codex-setup.md), and [docs/hermes-setup.md](docs/hermes-setup.md).
42
43
  - `**packages/agenticros-gemini`** — **Gemini CLI**: use Google Gemini to chat with your robot from the terminal (same ROS2 tools, no MCP). See [packages/agenticros-gemini/README.md](packages/agenticros-gemini/README.md).
43
44
 
44
45
  ```
45
46
  User (messaging app) → OpenClaw Gateway → AgenticROS OpenClaw plugin → Core → ROS2 robots
46
47
  Claude (Code / desktop / Dispatch) → agenticros MCP server → Core → ROS2 robots (Zenoh/rosbridge)
47
48
  Codex CLI → agenticros MCP server → Core → ROS2 robots (Zenoh/rosbridge)
49
+ Hermes Agent → agenticros MCP server → Core → ROS2 robots (Zenoh/rosbridge)
48
50
  Gemini CLI → @agenticros/gemini (function calling) → Core → ROS2 robots
49
51
  ```
50
52
 
@@ -136,7 +138,7 @@ The first run launches the interactive menu:
136
138
  ? What would you like to do?
137
139
  Launch with real robot
138
140
  ❯ Launch with simulation
139
- First-time setup (workspace + OpenClaw plugin + API key)
141
+ First-time setup (workspace + OpenClaw plugin + Codex MCP + API key)
140
142
  Manage skills (2 registered, 0 available, 0 broken)
141
143
  Stop everything
142
144
  Doctor (health check)
@@ -144,7 +146,7 @@ The first run launches the interactive menu:
144
146
  Tail logs
145
147
  ```
146
148
 
147
- Pick **First-time setup** once (workspace + OpenClaw plugin + API key, all
149
+ Pick **First-time setup** once (workspace + OpenClaw plugin + optional Codex MCP + API key, all
148
150
  idempotent), then choose how you want to run:
149
151
 
150
152
  | You want to … | Pick |
@@ -154,14 +156,18 @@ idempotent), then choose how you want to run:
154
156
  | Demo a **simulated 6-DOF arm** (UR5e-shaped, per-joint position control) | **Launch with simulation → 6-DOF arm** |
155
157
 
156
158
  Once a stack is up, point any of the supported agents — OpenClaw, Claude Code,
157
- Claude Desktop / Dispatch, or Gemini CLI — at the same robot and start talking
159
+ OpenAI Codex, Hermes Agent, Claude Desktop / Dispatch, or Gemini CLI — at the same robot and start talking
158
160
  to it. The CLI tracks what it spawned (pidfiles + logs under `/tmp/agenticros-*`),
159
161
  so **Stop everything** cleanly tears the demo down.
160
162
 
161
163
  Prefer scripted invocations? Every menu item maps to a direct command:
162
164
 
163
165
  ```bash
164
- npx agenticros init # one-time workspace + plugin + API key
166
+ npx agenticros init # one-time workspace + plugin + Codex/Hermes MCP + API key
167
+ agenticros codex setup # register AgenticROS MCP for OpenAI Codex CLI
168
+ agenticros codex doctor # validate ~/.codex/config.toml
169
+ agenticros hermes setup # register AgenticROS MCP for Hermes Agent
170
+ agenticros hermes doctor # validate ~/.hermes/config.yaml
165
171
  agenticros up real # real robot stack
166
172
  agenticros up sim-amr # simulated AMR (Gazebo + RViz, headless on Jetson)
167
173
  agenticros up sim-arm # simulated 6-DOF arm
@@ -296,15 +302,15 @@ Full walkthrough, troubleshooting, and a "full-embed" alternative (ROS / RealSen
296
302
 
297
303
  ## Claude + AgenticROS (MCP)
298
304
 
299
- The same **AgenticROS MCP server** (`@agenticros/claude-code`) can drive the robot from **Claude Code** (terminal) or from the **Claude desktop app** on macOS (including **Claude Dispatch** on iPhone when paired to Claude on your Mac). Both use MCP; they use **different config files**.
305
+ The **AgenticROS MCP server** (`@agenticros/claude-code`) drives the robot from **Claude Code** (terminal) or from the **Claude desktop app** on macOS (including **Claude Dispatch** on iPhone when paired to Claude on your Mac). **OpenAI Codex CLI** uses the same server — see **[Codex + AgenticROS](#codex--agenticros-mcp)** below. Claude clients use **different config files** than Codex (`.mcp.json` / `claude_desktop_config.json` vs `.codex/config.toml`).
300
306
 
301
- Shared setup:
307
+ Shared MCP setup (Claude and Codex):
302
308
 
303
309
  1. **Build** (from repo root): `pnpm install && pnpm build`
304
310
  2. **AgenticROS config**: `~/.agenticros/config.json` — set `zenoh.routerEndpoint`, `robot.namespace`, `robot.cameraTopic`, etc. (see [packages/agenticros-claude-code/README.md](packages/agenticros-claude-code/README.md)).
305
311
  3. **Zenoh**: Run `zenohd` with the remote-api plugin (e.g. port 10000) — see `scripts/zenohd-agenticros.json5` or [docs/zenoh-agenticros.md](docs/zenoh-agenticros.md).
306
312
 
307
- Optional: override `robot.namespace` per MCP launch with env `**AGENTICROS_ROBOT_NAMESPACE`** (must match the robot’s topic namespace exactly; many setups use **no dashes** in the UUID segment).
313
+ Optional: override `robot.namespace` per MCP launch with env `**AGENTICROS_ROBOT_NAMESPACE`**. Prefer leaving it empty in MCP/Codex config so `agenticros mode real|sim` drives the active profile (see [docs/codex-setup.md](docs/codex-setup.md)).
308
314
 
309
315
  ### Claude Code CLI (terminal)
310
316
 
@@ -347,6 +353,77 @@ Example `mcpServers` entry (adjust the path and namespace to your machine):
347
353
 
348
354
  Full steps, permissions (`mcp__agenticros`), and troubleshooting are in **[packages/agenticros-claude-code/README.md](packages/agenticros-claude-code/README.md)**.
349
355
 
356
+ ## Codex + AgenticROS (MCP)
357
+
358
+ **OpenAI Codex CLI** is a standard MCP client — it uses the same `@agenticros/claude-code` server as Claude Code (missions, follow-me, find-object, memory, full ROS tool surface). No separate adapter package.
359
+
360
+ ### Quick setup
361
+
362
+ ```bash
363
+ pnpm install && pnpm build # or: npx agenticros init
364
+ agenticros codex setup # ~/.codex/config.toml (global)
365
+ agenticros codex setup --project # .codex/config.toml in repo root
366
+ agenticros codex doctor # validate absolute MCP path + namespace policy
367
+ ```
368
+
369
+ Start Codex in your project directory, run `/mcp` — you should see **agenticros** connected with the full tool list. Then ask e.g. “List ROS2 topics” or “What do you see?”
370
+
371
+ ### Config files
372
+
373
+ | File | Scope |
374
+ |------|--------|
375
+ | `~/.codex/config.toml` | Global — all Codex sessions |
376
+ | `<project>/.codex/config.toml` | Project — when Codex runs in that directory |
377
+
378
+ `agenticros codex setup` writes an **absolute path** to `packages/agenticros-claude-code/dist/index.js` (or the bundled MCP path after `npx agenticros init`). Relative paths fail because Codex does not spawn MCP servers from the repo root.
379
+
380
+ Leave `AGENTICROS_ROBOT_NAMESPACE = ""` in the Codex env block so `~/.agenticros/config.json` and `agenticros mode real|sim` drive the active robot (same policy as `.mcp.json`).
381
+
382
+ ### Manual registration
383
+
384
+ ```bash
385
+ codex mcp add agenticros -- node "$(pwd)/packages/agenticros-claude-code/dist/index.js"
386
+ ```
387
+
388
+ Use an absolute path if not run from the repo root.
389
+
390
+ ### Troubleshooting
391
+
392
+ - **`/mcp` does not list agenticros** → run `agenticros codex setup`; check `agenticros codex doctor`
393
+ - **Transport timeout** → bring up Zenoh/rosbridge or run `agenticros up sim-amr` / `agenticros up real`
394
+ - **Logs** → `/tmp/agenticros-mcp.log`
395
+
396
+ Full guide: **[docs/codex-setup.md](docs/codex-setup.md)**.
397
+
398
+ ## Hermes + AgenticROS (MCP)
399
+
400
+ **[Hermes Agent](https://github.com/NousResearch/hermes-agent)** is a model-agnostic MCP client — it uses the same `@agenticros/claude-code` server as Claude Code and Codex (missions, follow-me, find-object, memory, full ROS tool surface). No separate adapter package. Works with OpenRouter, Ollama, Anthropic, OpenAI, and 200+ other providers.
401
+
402
+ ### Quick setup
403
+
404
+ ```bash
405
+ pnpm install && pnpm build # or: npx agenticros init
406
+ agenticros hermes setup # ~/.hermes/config.yaml
407
+ agenticros hermes doctor # validate absolute MCP path + namespace policy
408
+ ```
409
+
410
+ In Hermes, run `/reload-mcp` or restart, then `hermes mcp test agenticros`. Ask e.g. “List ROS2 topics” or “What do you see?”
411
+
412
+ ### Config file
413
+
414
+ | File | Scope |
415
+ |------|--------|
416
+ | `~/.hermes/config.yaml` | Global — default Hermes profile |
417
+
418
+ `agenticros hermes setup` writes an **absolute path** to the MCP server and leaves `AGENTICROS_ROBOT_NAMESPACE: ""` so `agenticros mode real|sim` drives the active robot (same policy as Codex).
419
+
420
+ ### Troubleshooting
421
+
422
+ - **MCP tools missing** → run `agenticros hermes setup`; `/reload-mcp` in Hermes; check `agenticros hermes doctor`
423
+ - **Transport timeout** → bring up Zenoh/rosbridge or run `agenticros up sim-amr` / `agenticros up real`
424
+
425
+ Full guide: **[docs/hermes-setup.md](docs/hermes-setup.md)**.
426
+
350
427
  ## Gemini CLI
351
428
 
352
429
  Use **Google Gemini** to chat with your robot from the terminal (same ROS2 tools as Claude Code, no MCP).
@@ -362,7 +439,7 @@ See **[packages/agenticros-gemini/README.md](packages/agenticros-gemini/README.m
362
439
 
363
440
  ## Memory (optional)
364
441
 
365
- AgenticROS can give every adapter a **shared, persistent, cross-process** long-term memory so facts you teach the robot from one agent are immediately available in the others — Claude Desktop, Claude Code, Gemini CLI, OpenClaw chat. Off by default. Two backends:
442
+ AgenticROS can give every adapter a **shared, persistent, cross-process** long-term memory so facts you teach the robot from one agent are immediately available in the others — Claude Desktop, Claude Code, OpenAI Codex, Hermes Agent, Gemini CLI, OpenClaw chat. Off by default. Two backends:
366
443
 
367
444
  - **`local`** — zero deps, JSON-on-disk at `~/.agenticros/memory.json`, keyword + recency search. Enable with one config flag.
368
445
  - **`mem0`** — semantic search via the pure-Node [`mem0ai`](https://www.npmjs.com/package/mem0ai) package (`pnpm add mem0ai`); file-backed vector store at `~/.mem0/vector_store.db` (shared across all processes on the host, no server to run); embedder auto-detects Ollama (`http://localhost:11434`) → `OPENAI_API_KEY` → clear error.
@@ -378,7 +455,7 @@ pnpm add mem0ai
378
455
  ollama pull nomic-embed-text # ~270 MB embedder model
379
456
  ```
380
457
 
381
- Add `{ "memory": { "enabled": true, "backend": "mem0" } }` to `~/.agenticros/config.json` (or the OpenClaw config UI). Restart the gateway / MCP client. Then ask Claude Desktop *"remember that I have a RealSense D435i for eyes"* and ask OpenClaw *"what do I have for eyes?"* — same fact, both agents.
458
+ Add `{ "memory": { "enabled": true, "backend": "mem0" } }` to `~/.agenticros/config.json` (or the OpenClaw config UI). Restart the gateway / MCP client. Then ask Claude Desktop *"remember that I have a RealSense D435i for eyes"* and ask Codex or OpenClaw *"what do I have for eyes?"* — same fact, every agent.
382
459
 
383
460
  ## Skills
384
461
 
@@ -65,7 +65,8 @@ skipped (with a checkmark) when already done:
65
65
  4. OpenClaw plugin install (via `scripts/setup_gateway_plugin.sh`)
66
66
  5. Robot config (writes `~/.agenticros/config.json`)
67
67
  6. OpenAI API key (paste once → `scripts/configure_agenticros.sh`)
68
- 7. Final `agenticros doctor` summary
68
+ 7. MCP client config (optional — `agenticros mcp setup` for Codex, Hermes, and Claude)
69
+ 8. Final `agenticros doctor` summary
69
70
 
70
71
  Pass `--force` to re-run every step regardless of state.
71
72
 
@@ -83,6 +84,81 @@ same report as a structured object for CI / scripting:
83
84
 
84
85
  Exits non-zero if any check is red.
85
86
 
87
+ Checks include MCP server build status, OpenClaw plugin health, **MCP client configs**
88
+ (Codex, Hermes, Claude — path and namespace policy), and CLI presence on `PATH`.
89
+
90
+ ### `agenticros mcp setup [--codex] [--hermes] [--claude] [--project] [--desktop]`
91
+
92
+ **Primary command** — register the AgenticROS MCP server for all MCP clients at once:
93
+
94
+ | Flag | Effect |
95
+ |---|---|
96
+ | (default) | Codex (`~/.codex/config.toml` + project `.codex/config.toml`), Hermes (`~/.hermes/config.yaml`), Claude Desktop + project `.mcp.json` |
97
+ | `--codex` | Codex global config only |
98
+ | `--hermes` | Hermes global config only |
99
+ | `--claude` | Claude Desktop + project `.mcp.json` |
100
+ | `--project` | Also write project-scoped Codex / Claude configs |
101
+ | `--desktop` | With `--claude`, Claude Desktop config only |
102
+
103
+ Uses an **absolute path** to the MCP server binary. Sets `AGENTICROS_ROBOT_NAMESPACE` empty so `agenticros mode real|sim` drives the active robot namespace.
104
+
105
+ Also offered as an optional step during `agenticros init`.
106
+
107
+ See **[docs/mcp-setup.md](mcp-setup.md)** for the unified onboarding guide.
108
+
109
+ ### `agenticros mcp doctor [--json] [--codex] [--hermes] [--claude]`
110
+
111
+ Validate MCP configuration for Codex, Hermes, and Claude. Exits non-zero on red checks.
112
+
113
+ ### `agenticros codex setup [--project]`
114
+
115
+ Register the AgenticROS MCP server for **OpenAI Codex CLI**:
116
+
117
+ | Flag | Effect |
118
+ |---|---|
119
+ | (default) | Writes `[mcp_servers.agenticros]` to `~/.codex/config.toml` |
120
+ | `--project` | Writes `.codex/config.toml` in the current repo root instead |
121
+
122
+ Uses an **absolute path** to the MCP server binary (`packages/agenticros-claude-code/dist/index.js` in workspace mode, or the bundled path after `npx agenticros init`). Sets `AGENTICROS_ROBOT_NAMESPACE = ""` so `agenticros mode real|sim` drives the active robot namespace.
123
+
124
+ Also offered as an optional step during `agenticros init`.
125
+
126
+ ### `agenticros codex doctor [--json]`
127
+
128
+ Validate Codex MCP configuration: global and (when in a workspace) project `.codex/config.toml`, MCP binary path, and namespace policy. Exits non-zero on red checks. With `--json`, emits structured output for scripting.
129
+
130
+ See **[docs/codex-setup.md](codex-setup.md)** for the full Codex onboarding guide.
131
+
132
+ ### `agenticros hermes setup`
133
+
134
+ Register the AgenticROS MCP server for **[Hermes Agent](https://github.com/NousResearch/hermes-agent)**:
135
+
136
+ Writes `mcp_servers.agenticros` to `~/.hermes/config.yaml` with an **absolute path** to the MCP server binary and `AGENTICROS_ROBOT_NAMESPACE: ""` so `agenticros mode real|sim` drives the active robot namespace.
137
+
138
+ Also offered as an optional step during `agenticros init`. After setup, run `/reload-mcp` in Hermes or `hermes mcp test agenticros`.
139
+
140
+ ### `agenticros hermes doctor [--json]`
141
+
142
+ Validate Hermes MCP configuration: `~/.hermes/config.yaml`, MCP binary path, and namespace policy. Exits non-zero on red checks. With `--json`, emits structured output for scripting.
143
+
144
+ See **[docs/hermes-setup.md](hermes-setup.md)** for the full Hermes onboarding guide.
145
+
146
+ ### `agenticros claude setup [--desktop] [--project]`
147
+
148
+ Register the AgenticROS MCP server for **Claude Code** and **Claude Desktop**:
149
+
150
+ | Flag | Effect |
151
+ |---|---|
152
+ | (default) | Claude Desktop config + project `.mcp.json` (when in a repo) |
153
+ | `--desktop` | `claude_desktop_config.json` only |
154
+ | `--project` | `.mcp.json` in repo root only |
155
+
156
+ Alias for `agenticros mcp setup --claude`. Restart Claude Desktop fully after desktop config changes.
157
+
158
+ ### `agenticros claude doctor [--json]`
159
+
160
+ Validate Claude MCP configuration (desktop + project `.mcp.json`). Exits non-zero on red checks.
161
+
86
162
  ### `agenticros status [--json]`
87
163
 
88
164
  Shows running components (camera / sim / mcp / rosbridge / openclaw-gateway)
@@ -111,6 +187,11 @@ Read or edit `~/.agenticros/config.json`. Actions:
111
187
  |---|---|---|
112
188
  | `~/.agenticros/config.json` | User | AgenticROS runtime config (transport mode, namespace, safety limits). |
113
189
  | `~/.agenticros/cli-state.json` | CLI | Last-used mode/namespace for the menu's "(yesterday)" hint. |
190
+ | `~/.hermes/config.yaml` | Hermes Agent | MCP server registrations (written by `agenticros mcp setup` or `agenticros hermes setup`). |
191
+ | `~/.codex/config.toml` | Codex CLI | MCP server registrations (written by `agenticros mcp setup` or `agenticros codex setup`). |
192
+ | `.codex/config.toml` | Codex CLI | Project-scoped MCP config (written by `agenticros mcp setup` or `agenticros codex setup --project`). |
193
+ | `.mcp.json` | Claude Code | Project-scoped MCP config (written by `agenticros mcp setup` or `agenticros claude setup`). |
194
+ | `~/Library/Application Support/Claude/claude_desktop_config.json` | Claude Desktop | MCP server registrations (written by `agenticros mcp setup` or `agenticros claude setup --desktop`). |
114
195
  | `~/agenticros/` | CLI (npm-install mode) | Copy of the monorepo, with built dist + colcon install. |
115
196
  | `/tmp/agenticros-*.pid` | CLI | PIDs of background processes the CLI spawned. |
116
197
  | `/tmp/agenticros-*.log` | CLI | Stdout/stderr from those processes. |
@@ -140,7 +221,13 @@ Read or edit `~/.agenticros/config.json`. Actions:
140
221
  ## Troubleshooting
141
222
 
142
223
  - **`doctor` shows red checks** → run `agenticros init` to walk through every
143
- step. Re-run `doctor` afterward.
224
+ step. Re-run `doctor` afterward. For MCP-specific issues, run
225
+ `agenticros mcp doctor` (or `agenticros codex doctor`, `agenticros hermes doctor`, `agenticros claude doctor`).
226
+ - **MCP tools missing in any client** → run `agenticros mcp setup`. See [mcp-setup.md](mcp-setup.md).
227
+ - **Codex `/mcp` does not list agenticros** → run `agenticros mcp setup --codex`
228
+ (absolute MCP path required). See [codex-setup.md](codex-setup.md).
229
+ - **Hermes MCP tools missing** → run `agenticros mcp setup --hermes`, then `/reload-mcp`
230
+ in Hermes. See [hermes-setup.md](hermes-setup.md).
144
231
  - **`up` exits immediately** → `agenticros logs <component>` (the CLI now
145
232
  records where every child wrote its output) and read the error in context.
146
233
  - **`up sim-amr` warns "scripts/sim/run_sim.sh not found"** → simulation
@@ -136,6 +136,41 @@ Two Codex-specific notes:
136
136
  - **Absolute path required.** Codex's working directory at server-spawn time is not the AgenticROS repo root, so `args = ["packages/agenticros-claude-code/dist/index.js"]` will fail. Use the full absolute path.
137
137
  - **Project-scoped config.** Codex also supports a `.codex/config.toml` in a project directory (and a `mcp.json` in cwd on recent builds) — handy for per-repo MCP setups when you don't want `agenticros` enabled globally. See OpenAI's [Codex config reference](https://developers.openai.com/codex/config-reference) for the precedence rules.
138
138
 
139
+ ## Hermes Agent
140
+
141
+ The same MCP server works unmodified with **[Hermes Agent](https://github.com/NousResearch/hermes-agent)** — Hermes is a model-agnostic MCP client (OpenRouter, Ollama, Anthropic, OpenAI, 200+ providers).
142
+
143
+ **Option A — `agenticros hermes setup` (recommended)**
144
+
145
+ ```bash
146
+ agenticros hermes setup
147
+ agenticros hermes doctor
148
+ ```
149
+
150
+ **Option B — edit YAML directly**
151
+
152
+ ```yaml
153
+ # ~/.hermes/config.yaml
154
+ mcp_servers:
155
+ agenticros:
156
+ command: "node"
157
+ args: ["/ABSOLUTE/PATH/TO/agenticros/packages/agenticros-claude-code/dist/index.js"]
158
+ env:
159
+ AGENTICROS_ROBOT_NAMESPACE: ""
160
+ connect_timeout: 60
161
+ timeout: 120
162
+ ```
163
+
164
+ Then `/reload-mcp` in Hermes or restart the agent. Verify with `hermes mcp test agenticros`.
165
+
166
+ Hermes-specific notes:
167
+
168
+ - **Absolute path required.** Same as Codex — Hermes does not spawn MCP servers from the repo root.
169
+ - **Empty namespace.** Leave `AGENTICROS_ROBOT_NAMESPACE: ""` so `agenticros mode real|sim` drives the active robot (same policy as Codex).
170
+ - **Model choice is independent.** OpenRouter, Ollama, or any other Hermes LLM provider does not change AgenticROS MCP setup.
171
+
172
+ Full guide: [docs/hermes-setup.md](../../docs/hermes-setup.md).
173
+
139
174
  ## Claude desktop app + Claude Dispatch (iOS)
140
175
 
141
176
  The Claude **desktop** app uses a different MCP config file than Claude Code: