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 MCPAgent from mcp-use and calls agent.run({ prompt }), agent.stream(...), agent.streamEvents(...), or agent.prettyStreamEvents(...).
  • Wires an LLM (LangChain ChatModel or "provider/model" shorthand) into an agent loop that must select tools at runtime.
  • Builds a Next.js / Express / serverless handler whose body is a MCPAgent invocation 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.

Do NOT use this skill for

Related skills
Installs
23
GitHub Stars
6
First Seen
Mar 28, 2026