build-mcp-use-agent
Installation
SKILL.md
Build MCP Use Agent
Build or audit TypeScript MCPAgent code from the mcp-use package — the LLM-driven loop where a model chooses, calls, and chains MCP tools across one or more servers.
This SKILL.md is a routing spine. Load-bearing rules and the minimal runnable path live here; deep detail lives in references/.
When to use this skill
Trigger on any of these:
- Imports
MCPAgentfrommcp-useand callsagent.run({ prompt }),agent.stream(...),agent.streamEvents(...), oragent.prettyStreamEvents(...). - Wires an LLM (LangChain
ChatModelor"provider/model"shorthand) into an agent loop that must select tools at runtime. - Builds a Next.js / Express / serverless handler whose body is a
MCPAgentinvocation against one or more MCP servers. - Adds streaming, structured output (Zod), memory, server-manager, code mode, observability (Langfuse), or production hardening to an existing
MCPAgent. - Debugging an agent that loops, stalls, hits
maxSteps, leaks sessions, or returns wrong-shaped output. - Picks a model/provider for an
MCPAgent(OpenAI, Anthropic, Google, Groq, custom LangChain adapter) or migrates between them.