Any Model Plugin MCP server
Commit Nov 13, 2026Delegates tasks and adversarial reviews from AI agents to any provider or model, decoupling the execution harness from the model provider.
Also known as pealmeida/anymodel-plugin
- Stars
- 0
- Tools
- —
- Downloads, 30 days
- —
- Latest version
- —
- Last commit
- Nov 13, 2026
- License
- Apache-2.0
What is Any Model Plugin MCP?
Any Model Plugin delegates tasks and adversarial reviews from AI agents to any provider or model, decoupling the execution harness from the model provider.
Summary generated from the project's README
About Any Model Plugin MCP server
Any Model Plugin acts as a universal interface for AI agents, allowing developers to separate the execution harness from the specific model provider. This decoupling enables you to use different engines for planning and file editing while routing the actual reasoning through various models like Z.AI GLM, Ollama Cloud, or OpenCode Go. It is designed for developers who want to avoid vendor lock-in by choosing the most suitable engine and model for specific tasks independently.
The server can be integrated into several environments, including Claude Code via slash commands, a universal CLI, or as an MCP server for hosts like Cursor, Windsurf, VS Code, and Codex. It requires Node.js 18.18 or higher and uses environment variables such as ZAI_API_KEY, OLLAMA_API_KEY, or OPENCODE_API_KEY to manage provider access. The system supports background jobs, allowing you to monitor task status, retrieve results, or cancel active processes through specific tools.
What you can do with it
- 1Perform adversarial code reviewsUse a different model to challenge your current implementation and design choices before you ship code.
- 2Manage long-running background jobsYou can trigger tasks that run in the background and later check their progress or final output.
- 3Audit local git stateRun automated reviews against your local repository to ensure code quality.
Written from the project's README. Every use case is checked against a quote from it.
Configuration
ANYMODEL_ENV_FILEOLLAMA_API_KEYOPENCODE_API_KEYZAI_API_KEY
| Name | Description | |
|---|---|---|
| ANYMODEL_ENV_FILE | — | |
| OLLAMA_API_KEY | — | |
| OPENCODE_API_KEY | — | |
| ZAI_API_KEY | — |
Automated checks
Ran Nov 15, 2026Full report →Not verified yet. A server needs a score of 80, no serious finding, and enough data for us to check. How checks work · What to fix for more points
- Source repository linked and reachablepealmeida/anymodel-plugin is public and reachablegithub.com/pealmeida/anymodel-plugin ↗Pass
- Package names this repository as its sourceNot checked
- Build provenance (Sigstore attestation)Not checked
- Open source license (OSI)Apache-2.0spdx.org/licenses/Apache-2.0.html ↗Pass
- Commit or release in the last yearLast commit or release 2026-11-13github.com/pealmeida/anymodel-plugin ↗Pass
- OpenSSF ScorecardNot checked
- Package name not close to a popular packageNot checked
- No critical advisory in the package or its dependenciesNot checked
- No hidden instructions to the model0 tool descriptions and the README read; no override phrases, credential paths or hidden charactersPass
- Destructive tools are labelledNot checked
- Remote endpoint answers the MCP handshakeNot checked
README
View on GitHubAny 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.
Why
Stop being locked into one AI provider. Most agent tools hardwire you to a single model vendor. Any Model Plugin is the universal remote for AI agents — delegate tasks to any engine, route through any provider, and run adversarial reviews where a different model challenges the implementation before you ship. Vendor-agnostic by design, zero dependencies, one core.
Table of contents
- Features
- Quick start
- Usage
- Commands
- Engines
- Providers
- Configuration
- Documentation
- Roadmap
- Contributing
- Attribution
- Security
- License
Features
- Multi-engine delegation — run tasks through Codex, Claude, or the built-in
directagent loop - Multi-provider routing — use Z.AI GLM, Ollama Cloud, OpenCode Go, or add your own via
registry.toml - Adversarial reviews — challenge your implementation with a different model before shipping
- Background jobs — delegate long-running tasks and check
status/result/cancel - Three 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 --version). No npm install — zero dependencies.
One-line install (Claude Code):
git clone https://github.com/pealmeida/anymodel-plugin.git && cd anymodel-plugin && claude plugin marketplace add . && claude plugin install anymodel@any-model
1 · Claude Code plugin
git clone https://github.com/pealmeida/anymodel-plugin.git
cd anymodel-plugin
claude plugin marketplace add .
claude plugin install anymodel@any-model
2 · Universal CLI (no install)
node plugins/anymodel/scripts/companion.mjs setup
3 · MCP server (Cursor, Windsurf, VS Code, Codex, Claude)
Add to your host's MCP config:
{
"mcpServers": {
"anymodel": {
"command": "node",
"args": ["/absolute/path/to/anymodel-plugin/plugins/anymodel/scripts/mcp-server.mjs"]
}
}
}
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
/anymodel:setup
/anymodel:models
First delegation
/anymodel:delegate --engine direct --model zai/glm-5.2 "explain the architecture of this project"
AI agents: every turn command accepts
--jsonfor machine-readable output. Usesetup --jsonto check readiness,models --jsonto list available models, anddelegate --jsonto capture results programmatically. The MCP server exposes the same surface as 8 tools — see INTEGRATIONS.md for per-host wiring.
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 job
Delegate 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 architecture
Universal 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 |
Delegate a task to an engine | --engine, --model, --write, --background, --resume |
review |
Run a code review | --engine, --model, --base, --scope |
adversarial-review |
Challenge implementation choices | --engine, --model, --base, --scope, focus text |
choose |
Interactive action/provider/model chain | --engine, --write |
delegate-with |
Delegate with guided model selection | --engine, --bridge, --write |
review-with |
Adversarial review with guided model selection | --engine, --base, --scope |
models |
Probe provider model lists | --provider |
setup |
Check engine/provider readiness | --json |
status |
Show active/recent jobs | --all, --json |
result |
Show finished job output | --json |
cancel |
Cancel an active job | --json |
Engines
The executor harness — the agent runtime that plans, runs commands, and edits files.
| Engine | Harness | Sandbox | Native review | Resume | Requires |
|---|---|---|---|---|---|
codex |
codex app-server JSON-RPC |
OS-level sandbox | Yes (review/start) |
Yes | npm install -g @openai/codex |
claude |
claude -p --output-format json |
Permission modes | No (schema fallback) | No | claude CLI |
direct |
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 |
|---|---|---|---|
zai |
GLM-5.2, GLM-4.6 | ZAI_API_KEY |
function-tools-only, flat-assistant-content, strict-tool-adjacency |
ollama |
qwen3-coder, gpt-oss, minimax | OLLAMA_API_KEY |
— |
opencode-go |
glm, kimi, qwen, deepseek | OPENCODE_API_KEY |
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 > defaults
Environment variables:
| Variable | Purpose |
|---|---|
ZAI_API_KEY |
Z.AI provider key |
OLLAMA_API_KEY |
Ollama Cloud provider key |
OPENCODE_API_KEY |
OpenCode Go provider key |
ANYMODEL_ENV_FILE |
Path to a .env-style file to load |
ANYMODEL_BRIDGE |
Bridge mode: builtin (default) or litellm |
CODEX_HOME |
Override the Codex CLI config directory (default: ~/.codex) |
Documentation
| Document | Covers |
|---|---|
| ARCHITECTURE.md | Design rationale, engine adapter interface, provider layer, config resolution, testing strategy |
| INTEGRATIONS.md | Per-host setup: CLI, MCP server, Claude Code native plugin |
| CONTRIBUTING.md | Development setup, adding providers and engines, code style, testing |
| CHANGELOG.md | Release history and notable changes |
| Project site | Landing page — features, surfaces, engines, providers |
| SECURITY.md | 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; models/setup; direct engine; marketplace install |
| Phase 4 | In progress | Semantic /anymodel:* chains for guided provider/model selection |
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
npm test # hermetic: no API keys or network needed
Live-fire tests against real providers are opt-in: ANYMODEL_LIVE_TESTS=1 npm test (spends tokens).
See 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
Any Model Plugin MCP questions
What engines are supported for task execution?
The plugin supports Codex, Claude, and a built-in 'direct' agent loop that requires no external dependencies.
Can I use this with Cursor or VS Code?
Yes, you can add it as an MCP server to hosts like Cursor, Windsurf, VS Code, and Codex.
How do I add a new AI provider?
You can add your own provider by editing the registry.toml file with the base URL and environment key.
Does it require any npm installations?
No, the plugin is designed with zero dependencies and uses the Node.js standard library.