Mcp mock client
Skill a5c-ai/babysitter/library/specializations/cli-mcp-development/skills/mcp-mock-client
Babysitter enforces obedience on agentic workforces and enables them to manage extremely complex tasks and workflows through deterministic, hallucination-free self-orchestration
npx -y skills add a5c-ai/babysitter --skill mcp-mock-clientAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
What its author says it does
Copied from the file, not written here
Create mock MCP client for server testing with request/response simulation.
SKILL.md
1.4 KB, as published. Nobody here has run it
MCP Mock Client
Create mock MCP client for server testing.
Generated Patterns
import { Client } from '@modelcontextprotocol/sdk/client/index.js';
import { StdioClientTransport } from '@modelcontextprotocol/sdk/client/stdio.js';
import { spawn } from 'child_process';
export async function createTestClient(serverCmd: string, args: string[]) {
const proc = spawn(serverCmd, args, { stdio: ['pipe', 'pipe', 'inherit'] });
const transport = new StdioClientTransport({ reader: proc.stdout!, writer: proc.stdin! });
const client = new Client({ name: 'test-client', version: '1.0.0' }, { capabilities: {} });
await client.connect(transport);
return { client, close: () => proc.kill() };
}
export async function testTool(client: Client, name: string, args: Record<string, unknown>) {
const result = await client.callTool({ name, arguments: args });
return result;
}
Target Processes
- mcp-server-testing-suite
- mcp-tool-implementation