luigidemasi opened a new issue, #113: URL: https://github.com/apache/camel-kit/issues/113
> Imported from [luigidemasi/camel-kit#259](https://github.com/luigidemasi/camel-kit/issues/259), opened by [Croway](https://github.com/Croway) on 2026-10-20. --- ## Problem The OpenCode MCP configuration that `camel-kit init --ai opencode` writes to `opencode.json` (`templates/mcp-configs/opencode-mcp.json`, 0.4.1 and `main`) has two settings that break or risk breaking non-interactive use: 1. **Every Camel MCP tool is `"ask"`:** ```json "permission": { "camel_*": "ask", "camel-knowledge_*": "ask", "citrus_*": "ask" } ``` In the TUI the user approves each call. In headless mode (`opencode run "..."`, scripts, CI), OpenCode rejects every permission request it would ask about unless `--auto` is passed. OpenCode 1.19.3, `packages/opencode/src/cli/cmd/run.ts`, on `permission.asked`: ```ts UI.println(... `permission requested: ${permission.permission} (...); auto-rejecting`) await client.permission.reply({ requestID: permission.id, reply: "reject" }) ``` So in `opencode run` every `camel_catalog_*`, `camel_validate_*` and `camel_docs_*` call fails, and Law 1 ("Verify ALL components/EIPs/dataformats via MCP before use") cannot be followed. The alternative, `--auto`, approves everything, including shell commands. 2. **No `timeout` on the MCP servers.** OpenCode waits 30 s for a local MCP server to connect (`packages/opencode/src/mcp/index.ts`, `DEFAULT_TIMEOUT = 30_000`). The servers start with `jbang ...:runner`; on a first run jbang resolves and downloads the runner jars (camel-jbang-mcp, camel-kit-knowledge-mcp with its index, citrus-mcp-server), which can take longer, and the server is then dropped for the session. For Claude Code the equivalent is `MCP_TIMEOUT` (camel-evals sets 180000 for its MCP arms). ## Evidence camel-evals runs OpenCode headless (`opencode run --format json`) in containers with the runners prefetched; it has to pass `--auto`, otherwise the agent gets no MCP results at all. With `--auto` the camel-kit OpenCode trials made 14-21 successful Camel MCP calls each. ## Proposal - [ ] Allow the read-only tools by default (catalog lookups, docs search, validation, e.g. `camel_catalog_*`, `camel_validate_*`, `camel-knowledge_*`, `citrus_catalog_*`, `citrus_docs_*`), keeping `"ask"` for anything that writes or runs; or document `--auto` / a permission override for headless use in the README. - [ ] Set `"timeout": 120000` (or similar) on the generated local MCP servers. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
