codex

codex is an agent for coding agents from XucroYuri/KWJM-MCP. It costs 0 tokens per session (268 once invoked), scanned B, original, MIT.

A Codex configuration for connecting to kwjm-mcp, an MCP server that adds model and media tools to the coding assistant.

In plain words
What is it for?
Use it to list models, send text requests through OpenAI- or Claude-style interfaces, create images, and start and check video jobs.
Why use it?
It avoids configuring each model service separately inside Codex and provides one place to discover available capabilities.

Agent

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/xucroyuri/kwjm-mcp/codex
Clone the repo
git clone --depth 1 https://github.com/XucroYuri/KWJM-MCP

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for codex

README.md
[![agentmods](https://agentmods.dev/badge/agents/xucroyuri/kwjm-mcp/codex.svg)](https://agentmods.dev/agents/xucroyuri/kwjm-mcp/codex)
Your own site
<a href="https://agentmods.dev/agents/xucroyuri/kwjm-mcp/codex"><img src="https://agentmods.dev/badge/agents/xucroyuri/kwjm-mcp/codex.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 268 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.00268
Opus 5 $0.00000 $0.00134
Sonnet 5 $0.00000 $0.00054
Haiku 4.5 $0.00000 $0.00027

Measured 4d ago against content hash a43b84ee9931, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade B, and why

codex scanned grade B with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Reads agent configuration directoriesmediumAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

Codex 支持通过配置添加 MCP 服务器。在 `~/.codex/config.toml`(或项目 `codex.toml`)中追加 `mcp_servers`:
docs/agents/codex.md · 22 lines

What it actually says

Codex 接入 kwjm-mcp

Codex 支持通过配置添加 MCP 服务器。在 ~/.codex/config.toml(或项目 codex.toml)中追加 mcp_servers

[mcp_servers.kwjm-mcp]
command = "npx"
args = ["kwjm-mcp"]
env = { KWJM_API_KEY = "sk-你的平台令牌", KWJM_API_KEY_ID = "你的数字 Key ID" }

确保已 npm linknpx kwjm-mcp 可达;若未发布 npm 包,可用 args = ["node", "/绝对路径/dist/index.js"] 指向本地编译产物。

使用

重启 Codex 后,模型工具已注册。常用做法:

  • list_models 查看能力边界与默认模型。
  • 直接请求文本:chat_completions(OpenAI 系)或 messages(claude 系)。
  • 生图 generate_image、生视频 generate_video + get_video_result
  • 指名歧义模型(如 deepseek)时,先看返回的候选清单再选定。
Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 22 lines · 0 tokens per session scan B a43b84ee9931

Subscribe to this mod's changes

codex is an agent published in the GitHub repository XucroYuri/KWJM-MCP (0 stars, last pushed 11d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 268 tokens. A static security scan graded it B with 1 finding (reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.