Esta página se muestra en inglés. Una traducción al español está en curso.
ScriptsMay 12, 2026·2 min de lectura

AIMock — Mock LLM, MCP, A2A, Vector APIs

AIMock is a mock server for AI app testing: it simulates LLM providers, MCP tools, A2A agents, and vector/search APIs so tests avoid real paid endpoints.

Listo para agents

Este activo puede ser leído e instalado directamente por agents

TokRepo expone un comando CLI universal, contrato de instalación, metadata JSON, plan según adaptador y contenido raw para que los agents evalúen compatibilidad, riesgo y próximos pasos.

Stage only · 29/100Stage only
Superficie agent
Cualquier agent MCP/CLI
Tipo
Script
Instalación
Single
Confianza
Confianza: Established
Entrada
README.md
Comando CLI universal
npx tokrepo install 84631ebc-4610-44f0-a551-734d42f5d904
Introducción

AIMock is a mock server for AI app testing: it simulates LLM providers, MCP tools, A2A agents, and vector/search APIs so tests avoid real paid endpoints.

  • Best for: teams writing agent tests who need deterministic fixtures, record/replay, and one-port mocks
  • Works with: Node.js projects, test runners (Jest/Vitest), OpenAI-compatible SDKs via OPENAI_BASE_URL
  • Setup time: 10 minutes

Practical Notes

  • Mocks many surfaces from one port (LLM APIs, MCP, A2A, vector/search/rerank, etc.)
  • Supports 12 LLM providers (per project docs) and streaming behaviors for realistic tests
  • GitHub stars/forks (verified): see Source & Thanks

AIMock pays for itself the first time you avoid a flaky test or a surprise token bill.

Use it in three steps:

  1. Start llmock (fixtures-first) or the full suite via --config.
  2. Point your SDK to the mock by setting OPENAI_BASE_URL (and a dummy key if the SDK requires it).
  3. Record real traces once (optional), then replay deterministically in CI forever.

Two good guardrails:

  • Keep fixtures in version control and review them like code.
  • Add a CI check that fails if your tests accidentally talk to real endpoints (base URL not patched).

FAQ

Q: What does it mock? A: LLM APIs plus agent protocols like MCP/A2A and common infra like vector DBs, search, and rerank.

Q: Can it record real responses? A: Yes — it supports record & replay so you can capture and replay fixtures deterministically.

Q: How do I adopt it safely? A: Patch base URLs via env vars in tests and add a CI guard to prevent real endpoint calls.

🙏

Fuente y agradecimientos

Source: https://github.com/CopilotKit/aimock > License: MIT > GitHub stars: 581 · forks: 37

Discusión

Inicia sesión para unirte a la discusión.
Aún no hay comentarios. Sé el primero en compartir tus ideas.

Activos relacionados