From 70662d27ecda4c051844b41178f7ad1ecf184416 Mon Sep 17 00:00:00 2001 From: Angus Chiu Date: Fri, 16 Oct 2026 14:34:51 +0100 Subject: [PATCH] Add Codex support: skill-only plugin plus config.toml instructions Codex loads a root .mcp.json automatically but drops OAuth settings from plugin MCP entries, so Claude's MCP config moves to .claude-mcp.json (referenced from the Claude manifest) and the Codex plugin carries only the skill. The README documents the config.toml entries and the two server-side blockers for Codex sign-in. Co-Authored-By: Claude Sonnet 5.5 Claude-Session: https://claude.ai/code/session_01Mkpcphc9ZEjNpw867crpNF --- .agents/plugins/marketplace.json | 12 ++++++++++ .mcp.json => .claude-mcp.json | 0 .claude-plugin/plugin.json | 3 ++- .codex-plugin/plugin.json | 26 +++++++++++++++++++++ README.md | 39 +++++++++++++++++++++++++++++++- 5 files changed, 78 insertions(+), 2 deletions(-) create mode 100644 .agents/plugins/marketplace.json rename .mcp.json => .claude-mcp.json (100%) create mode 100644 .codex-plugin/plugin.json diff --git a/.agents/plugins/marketplace.json b/.agents/plugins/marketplace.json new file mode 100644 index 0000000..c8f9820 --- /dev/null +++ b/.agents/plugins/marketplace.json @@ -0,0 +1,12 @@ +{ + "name": "soloma-internal", + "interface": { "displayName": "Soloma Internal" }, + "plugins": [ + { + "name": "soloma-kb-plugin", + "source": { "source": "local", "path": "./" }, + "policy": { "installation": "AVAILABLE", "authentication": "ON_INSTALL" }, + "category": "Productivity" + } + ] +} diff --git a/.mcp.json b/.claude-mcp.json similarity index 100% rename from .mcp.json rename to .claude-mcp.json diff --git a/.claude-plugin/plugin.json b/.claude-plugin/plugin.json index dfd1e0f..c8b430b 100644 --- a/.claude-plugin/plugin.json +++ b/.claude-plugin/plugin.json @@ -4,5 +4,6 @@ "version": "0.1.0", "author": { "name": "Soloma" - } + }, + "mcpServers": "./.claude-mcp.json" } diff --git a/.codex-plugin/plugin.json b/.codex-plugin/plugin.json new file mode 100644 index 0000000..6feb5f2 --- /dev/null +++ b/.codex-plugin/plugin.json @@ -0,0 +1,26 @@ +{ + "name": "soloma-kb-plugin", + "version": "0.1.0", + "description": "Soloma drone knowledge base skill: how to search the approved corpus and submit sources. The MCP servers are configured separately in config.toml (see README).", + "author": { + "name": "Soloma" + }, + "license": "UNLICENSED", + "keywords": [ + "knowledge-base", + "drone", + "mcp" + ], + "skills": "./skills/", + "interface": { + "displayName": "Soloma KB", + "shortDescription": "Search and contribute to the Soloma drone knowledge base", + "longDescription": "A skill for the Soloma drone knowledge base. Add the drone-kb and drone-kb-scribe MCP servers to ~/.codex/config.toml as described in the README; Codex does not load OAuth settings from plugins.", + "developerName": "Soloma", + "category": "Productivity", + "defaultPrompt": [ + "Search the drone knowledge base for ...", + "Add this document to the drone knowledge base." + ] + } +} diff --git a/README.md b/README.md index 11a1895..5779141 100644 --- a/README.md +++ b/README.md @@ -33,12 +33,49 @@ Each server signs in separately, because Claude Code keeps one token per server. Both servers use OAuth callback port **8127**: finish one sign-in before starting the other. -## About the `clientId` in `.mcp.json` +## About the `clientId` in `.claude-mcp.json` `soloma-kb-mcp` is the public client ID of the `kb-mcp-agent` provider in Authentik. It is a PKCE public client with no secret, and it is needed because Authentik does not support dynamic client registration. Access is enforced by Authentik group membership, not by that value. If sign-in suddenly fails at the authorize step, the ID may have changed: update the plugin (`/plugin marketplace update soloma-internal`) and reinstall. +## Codex + +The plugin also installs in Codex, but **Codex does not read OAuth settings from a plugin**, so the plugin only carries the skill. Add the two MCP servers to `~/.codex/config.toml` yourself: + +```toml +[mcp_servers.drone-kb] +url = "https://kb-mcp.soloma.ai/mcp" + +[mcp_servers.drone-kb.oauth] +client_id = "soloma-kb-mcp" +callback_port = 8127 + +[mcp_servers.drone-kb-scribe] +url = "https://kb-mcp.soloma.ai/inbox/mcp" + +[mcp_servers.drone-kb-scribe.oauth] +client_id = "soloma-kb-mcp" +callback_port = 8127 +``` + +Then install the skill and sign in: + +``` +codex plugin marketplace add https://git.soloma.ai/anguschiu/soloma-kb-plugin.git +codex plugin add soloma-kb-plugin@soloma-internal +codex mcp login drone-kb-scribe +codex mcp login drone-kb +``` + +Status: see "Known Codex limits" below before relying on this. + +### Known Codex limits + +- **Sign-in needs one Authentik setting.** Codex's OAuth redirect is `http://127.0.0.1:8127/callback/`, which the `kb-mcp-agent` provider rejects today. An Authentik admin must add the redirect URI (regex) `^http://127\.0\.0\.1:8127/callback/.*$`. +- **`drone-kb` (read) cannot sign in from Codex yet.** Its endpoint publishes no OAuth discovery metadata, so Codex falls back to `https://kb-mcp.soloma.ai/authorize`, which does not exist. Claude Code works around this with `authServerMetadataUrl`; Codex has no equivalent for these servers. Fixing it needs a server-side change. +- `drone-kb-scribe` (write) discovers its authorization server correctly. + ## Updating ```