any-model-plugin
Enables delegation of tasks and adversarial reviews to OpenAI models, including Codex agent capabilities.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@any-model-plugindelegate fix flaky test to codex"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Any Model Plugin
Delegate tasks and run adversarial reviews from any AI agent to any provider and model.
Any Model Plugin separates the executor harness (the agent runtime that plans, runs commands, and edits files) from the model (the provider the harness thinks with). Pick the best engine for the job and the best model for the task — independently.
Table of contents
Related MCP server: random-agent
Features
Multi-engine delegation — run tasks through Codex, Claude, or the built-in
directagent loopMulti-provider routing — use Z.AI GLM, Ollama Cloud, OpenCode Go, or add your own via
registry.tomlAdversarial reviews — challenge your implementation with a different model before shipping
Background jobs — delegate long-running tasks and check
status/result/cancelThree access surfaces — Claude Code slash commands, universal CLI, or MCP server (Cursor, Windsurf, VS Code, Codex)
Zero dependencies — pure ESM, Node.js standard library only
Built-in wire shim — translates the engine's Responses API to any provider's chat-completions, with a quirk pipeline for provider-specific fixes
Quick start
Prerequisites
Node.js ≥ 18.18 —
node --versionNo
npm installneeded — the plugin has zero npm dependencies
Install as a Claude Code plugin
git clone https://github.com/pealmeida/anymodel-plugin.git
cd anymodel-plugin
claude plugin marketplace add .
claude plugin install anymodel@any-modelSet up provider API keys
export ZAI_API_KEY="your-key"
export OLLAMA_API_KEY="your-key"
export OPENCODE_API_KEY="your-key"Or load from a file:
export ANYMODEL_ENV_FILE="$HOME/.anymodel.env"Verify your setup
/anymodel:setup
/anymodel:modelsDelegate your first task
/anymodel:delegate --engine direct --model zai/glm-5.2 "explain the architecture of this project"Usage
Claude Code plugin
Once installed, 11 slash commands are available:
/anymodel:delegate Delegate a task to any engine and model
/anymodel:review Run a code review against local git state
/anymodel:adversarial-review Challenge the implementation approach and design choices
/anymodel:choose Interactive chain: pick action, provider, model, then dispatch
/anymodel:delegate-with Delegate with guided provider/model selection
/anymodel:review-with Adversarial review with guided provider/model selection
/anymodel:models Probe configured providers for available models
/anymodel:setup Check engine and provider setup
/anymodel:status Show active and recent jobs
/anymodel:result Show a finished job's output
/anymodel:cancel Cancel an active background jobDelegate a task:
/anymodel:delegate --engine codex --model zai/glm-5.2 --write "fix the flaky auth test"
/anymodel:delegate --engine claude "refactor the error handling in src/api"
/anymodel:delegate --engine direct --model ollama/qwen3-coder "add unit tests for the parser"Run a review:
/anymodel:review --base main
/anymodel:review --engine claude --scope working-tree
/anymodel:adversarial-review "check for race conditions in the connection pool"Guided selection chains:
/anymodel:choose delegate with zai fix the flaky test
/anymodel:delegate-with ollama implement the parser guard
/anymodel:review-with opencode-go --base main challenge the architectureUniversal CLI
The same CLI powers every surface. Run it from any shell, CI pipeline, or agent:
COMPANION="plugins/anymodel/scripts/companion.mjs"
# Delegate a task
node "$COMPANION" delegate --engine direct --model zai/glm-5.2 "explain this codebase"
# Run a review
node "$COMPANION" review --base main
# Adversarial review with focus text
node "$COMPANION" adversarial-review "audit auth and session handling"
# Check available models
node "$COMPANION" models
# Verify setup
node "$COMPANION" setup
# Job management
node "$COMPANION" status
node "$COMPANION" result <job-id>
node "$COMPANION" cancel <job-id>All turn commands accept --json for machine-readable output.
MCP server
Expose all capabilities as MCP tools in any MCP-compatible host:
{
"mcpServers": {
"anymodel": {
"command": "node",
"args": ["/absolute/path/to/anymodel-plugin/plugins/anymodel/scripts/mcp-server.mjs"]
}
}
}Supported hosts: Claude Code, Codex CLI, Cursor, Windsurf, VS Code. See INTEGRATIONS.md for per-host configuration details.
The MCP server exposes 8 tools: delegate, review, adversarial_review, status, result, cancel, models, setup.
Commands
Command | Description | Key flags |
| Delegate a task to an engine |
|
| Run a code review |
|
| Challenge implementation choices |
|
| Interactive action/provider/model chain |
|
| Delegate with guided model selection |
|
| Adversarial review with guided model selection |
|
| Probe provider model lists |
|
| Check engine/provider readiness |
|
| Show active/recent jobs |
|
| Show finished job output |
|
| Cancel an active job |
|
Engines
The executor harness — the agent runtime that plans, runs commands, and edits files.
Engine | Harness | Sandbox | Native review | Resume | Requires |
|
| OS-level sandbox | Yes ( | Yes |
|
|
| Permission modes | No (schema fallback) | No |
|
| Built-in agent loop (fetch → chat API) | Tool whitelist | No (schema fallback) | No | Nothing — zero deps |
The direct engine is the "any model, no harness installed" floor. It implements a minimal agent loop with read_file, list_dir, write_file, and exec_command tools, speaking OpenAI-compatible chat directly to any registry provider. Sandbox is weakest — use --write deliberately.
Providers
The model — what the harness thinks with. Configured declaratively in registry.toml:
Provider | Models | Env key | Quirks |
| GLM-5.2, GLM-4.6 |
| function-tools-only, flat-assistant-content, strict-tool-adjacency |
| qwen3-coder, gpt-oss, minimax |
| — |
| glm, kimi, qwen, deepseek |
| function-tools-only, flat-assistant-content, strict-tool-adjacency, empty-choices-chunks |
Use a provider by prefixing the model: zai/glm-5.2, ollama/qwen3-coder, opencode-go/kimi.
Adding a provider
Edit plugins/anymodel/scripts/lib/providers/registry.toml:
[providers.my-provider]
base_url = "https://api.example.com/v1"
env_key = "MY_PROVIDER_API_KEY"
wire = "chat"
quirks = []Set the env var, then verify with /anymodel:models. See CONTRIBUTING.md for details on quirk flags.
Configuration
Config is resolved in order of precedence:
CLI flags > env vars > <repo>/.anymodel.toml > ~/.config/anymodel/config.toml > defaultsEnvironment variables:
Variable | Purpose |
| Z.AI provider key |
| Ollama Cloud provider key |
| OpenCode Go provider key |
| Path to a |
| Bridge mode: |
| Override the Codex CLI config directory (default: |
Documentation
Document | Covers |
Design rationale, engine adapter interface, provider layer, config resolution, testing strategy | |
Per-host setup: CLI, MCP server, Claude Code native plugin | |
Development setup, adding providers and engines, code style, testing | |
API key handling, sandboxing per engine, bridge isolation, vulnerability reporting |
Roadmap
Phase | Status | Goal |
Phase 0 | Done | Scaffold repo; lift core orchestration; codex adapter + LiteLLM bridge; provider registry; loopback CI |
Phase 1 | Done | Codex + Claude adapters; per-thread config override; native + schema reviews on all engines |
Phase 2 | Done | Built-in Responses→Chat shim; quirk pipeline; unit test suite |
Phase 3 | Done | Plugin command surface + runner agent; |
Phase 4 | In progress | Semantic |
Contributing
Contributions are welcome. The project has zero npm dependencies and uses Node's built-in test runner — clone and go.
git clone https://github.com/pealmeida/anymodel-plugin.git
cd anymodel-plugin
node --test tests/*.test.mjs # 125 tests, 0 failuresSee CONTRIBUTING.md for guidelines on adding providers, engines, and tests.
Attribution
This project derives from openai/codex-plugin-cc under the Apache-2.0 license. The orchestration core under plugins/anymodel/scripts/lib/core/ began as a fork of that project and has been generalized to support any engine and provider. See LICENSE and NOTICE for details.
Security
API keys are never stored in this repository. Providers reference keys by env var name in
registry.toml..envfiles are gitignored.Sandboxing varies by engine.
codexhas an OS-level sandbox;claudeuses permission modes;directhas tool-level guards only. Never default--writeon engines without real sandboxing.The bridge listens on
127.0.0.1only — not exposed to the network.Report vulnerabilities privately via GitHub Security Advisories rather than public issues.
See SECURITY.md for the full policy.
License
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Alicense-qualityBmaintenanceEnables multiple LLM agents across devices to form teams, share knowledge, memory, and tasks with live status via a web dashboard and distributed-systems reliability.Last updatedApache 2.0
- Flicense-qualityCmaintenanceEnables multi-worker autonomous agent orchestration: decompose complex tasks, run parallel workers, auto-review, and generate follow-up tasks via the Model Context Protocol.Last updated
- Alicense-qualityAmaintenanceCoordinates parallel AI coding agents by providing task ownership, scoped file locks, handoffs, and verification workflows.Last updatedMIT
- Alicense-qualityCmaintenanceEnables AI to delegate boilerplate, drafts, tests, and refactors to free LLM providers, saving tokens and running tasks in parallel.Last updated458MIT
Related MCP Connectors
Reliable async execution for agent tool calls: schema gating, retries, idempotency, audit trail.
Durable agent-to-agent handoffs and shared scratchpad for multi-agent workflows.
Agent-native collaboration network: orchestrate a team of long-running agents from any MCP client.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/pealmeida/anymodel-plugin'
If you have feedback or need assistance with the MCP directory API, please join our Discord server