plugins/mcp-tooling/skills/mcp-use-framework/SKILL.md
Use this skill when working with the mcp-use Python/TypeScript framework for building MCP servers, clients, and agents. Use when the user asks about creating MCP servers with Python decorators, building MCP agents with LangChain, connecting to multiple MCP servers programmatically, or using the mcp-use fullstack framework for MCP application development.
npx skillsauth add nsheaps/ai-mktpl mcp-use-frameworkInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Repository: https://github.com/mcp-use/mcp-use Documentation: https://manufact.com/docs
A fullstack open-source framework for building MCP applications — servers, clients, agents, and interactive widgets.
# Python (requires 3.11+)
pip install mcp-use
# With E2B sandbox support
pip install "mcp-use[e2b]"
# LLM provider packages (as needed)
pip install langchain-openai # OpenAI
pip install langchain-anthropic # Anthropic
pip install langchain-google # Google
# TypeScript scaffold
npx create-mcp-use-app@latest
Decorator-based, async-first API:
from typing import Annotated
from pydantic import Field
from mcp_use import MCPServer
server = MCPServer(name="Weather Server", version="1.0.0")
@server.tool(
name="get_weather",
description="Get weather information for a location"
)
async def get_weather(
city: Annotated[str, Field(description="City name")]
) -> str:
return f"Temperature: 72°F, Condition: sunny, City: {city}"
# Run with built-in inspector at /inspector
server.run(transport="streamable-http", port=8000)
from mcp_use import MCPServer, ToolAnnotations
@server.tool(
name="process_data",
description="Process user data securely",
annotations=ToolAnnotations(
readOnlyHint=True,
openWorldHint=True
)
)
async def process_data(
data: Annotated[str, Field(description="Data to process")],
format: Annotated[str, Field(description="Output format")] = "json"
) -> str:
return f"Processed: {data} in {format}"
Connect to MCP servers programmatically:
from mcp_use import MCPClient
# From configuration dictionary
config = {
"mcpServers": {
"weather": {
"command": "python",
"args": ["-m", "weather_server"],
"env": {"API_KEY": "your_key"}
}
}
}
client = MCPClient.from_dict(config)
# From config file
client = MCPClient.from_config_file("config.json")
# From HTTP endpoint
client = MCPClient.from_http("http://localhost:8000/mcp")
# Direct tool invocation (no LLM needed)
result = await client.call_tool("weather", "get_weather", {"city": "San Francisco"})
Agents orchestrate multiple MCP servers with LLM reasoning:
from langchain_openai import ChatOpenAI
from mcp_use import MCPAgent, MCPClient
client = MCPClient.from_config_file("config.json")
llm = ChatOpenAI(model="gpt-4o")
agent = MCPAgent(llm=llm, client=client, max_steps=30)
# Execute a task — agent auto-routes to appropriate servers
result = await agent.run("Find the best restaurant in San Francisco")
# Stream results
async for event in agent.stream("Analyze this code"):
print(event)
# Target a specific server
result = await agent.run("Get forecast", server_name="weather")
# Restrict tool access
agent = MCPAgent(
llm=llm,
client=client,
allowed_tools=["get_weather", "list_files"]
)
{
"mcpServers": {
"weather": {
"command": "python",
"args": ["-m", "weather_server"],
"env": { "API_KEY": "your_api_key" }
},
"remote_api": {
"url": "http://api.example.com:8000/mcp"
}
}
}
| Feature | Description |
| ------------------- | -------------------------------------------------- |
| Decorator-based API | Simple @server.tool() syntax for defining tools |
| Type safety | Pydantic models for automatic parameter validation |
| Async-native | Built for concurrent operations with async/await |
| Multi-server agents | Intelligent routing across multiple MCP servers |
| Built-in inspector | Web debugger at /inspector on every server |
| Authentication | Bearer token, OAuth middleware support |
| Observability | LangFuse, OpenTelemetry integration |
| LLM agnostic | Works with OpenAI, Anthropic, Google via LangChain |
| Session management | Stateful interactions with session_id |
# INFO level
DEBUG=1 python your_server.py
# Full DEBUG level
DEBUG=2 python your_server.py
| Scenario | Recommendation | | --------------------------------------------------- | -------------------------------------------------------- | | Building a new MCP server in Python | mcp-use (decorator API, type safety, built-in inspector) | | Connecting to multiple MCP servers programmatically | mcp-use client (multi-server config, direct tool calls) | | Building an AI agent that uses MCP tools | mcp-use agent (LangChain integration, auto-routing) | | Quick CLI interaction with existing servers | Use mcp-cli or mcpc instead | | Production deployment with monitoring | mcp-use + Manufact platform |
tools
Manually reproduce what the github-app plugin's SessionStart hook does to make a GitHub App installation token usable in the current session — materialize the PEM, generate the token, isolate GH_CONFIG_DIR, write the runtime env file, and wire CLAUDE_ENV_FILE so every Bash call sees GH_TOKEN/GITHUB_TOKEN. Use when the hook did not run, the token is missing from the environment, or a shell/teammate needs the token wired up by hand. <example>GH_TOKEN isn't set even though github-app is configured</example> <example>the github-app SessionStart hook didn't run, set up the token manually</example> <example>wire the github app token into CLAUDE_ENV_FILE</example> <example>gh keeps falling back to the wrong account, isolate GH_CONFIG_DIR</example>
tools
Manually configure the GitHub App bot git identity the way the github-app plugin's SessionStart hook does — resolve the app slug and bot user ID, build the <slug>[bot] name and noreply email, set GIT_AUTHOR_*/GIT_COMMITTER_* env vars, and write an isolated GIT_CONFIG_GLOBAL with the gh auth git-credential helper. Use when commits are attributed to the wrong account, "Author identity unknown" appears, or git identity must be set up by hand. <example>my commits are showing up as the handler, not the bot</example> <example>git says Author identity unknown after the github-app hook ran</example> <example>configure the github app bot git identity manually</example> <example>set up the gh credential helper for git push</example>
tools
Manages spec files for requirements capture and validation
tools
# Bash Chaining Alternatives This skill teaches you how to work around the bash command chaining restriction enforced by this plugin. ## Why Chaining is Blocked The `bash-command-rejection` plugin blocks these operators: | Operator | Name | Why Blocked | | -------- | ---------- | ----------------------------------------------------------------------------------- | | `&&` | AND chain | Runs cmd2 only if cmd1 su