Cette page est affichée en anglais. Une traduction française est en cours.
ScriptsMay 12, 2026·2 min de lecture

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.

Prêt pour agents

Cet actif peut être lu et installé directement par les agents

TokRepo expose une commande CLI universelle, un contrat d'installation, le metadata JSON, un plan selon l'adaptateur et le contenu raw pour aider les agents à juger l'adaptation, le risque et les prochaines actions.

Stage only · 29/100Stage only
Surface agent
Tout agent MCP/CLI
Type
Script
Installation
Single
Confiance
Confiance : Established
Point d'entrée
README.md
Commande CLI universelle
npx tokrepo install 84631ebc-4610-44f0-a551-734d42f5d904
Introduction

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.

🙏

Source et remerciements

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

Fil de discussion

Connectez-vous pour rejoindre la discussion.
Aucun commentaire pour l'instant. Soyez le premier à partager votre avis.

Actifs similaires