Quick Start
How It Works
| Phase | What happens |
|---|---|
| 1. Connect | MCP client connects to the server on first use |
| 2. Discover | Server reports its available tools |
| 3. Execute | Agent calls tools via the MCP protocol |
| 4. Return | Results flow back through the MCP client to the agent |
MCP Server Types
Common Patterns
Pattern 1 — File management agent
Pattern 2 — Database agent
Pattern 3 — GitHub integration
Best Practices
Use official MCP servers
Use official MCP servers
Start with the official
@modelcontextprotocol npm packages for common integrations (filesystem, SQLite, GitHub, etc.). They’re well-tested and actively maintained.Scope filesystem access
Scope filesystem access
When using the filesystem MCP server, pass the narrowest directory path you need. Giving access to
/ or /home when you only need /app/data creates unnecessary risk.Environment variables for credentials
Environment variables for credentials
Never hardcode API keys or tokens in your code. Pass them as environment variables to the MCP server via the
env parameter, and source them from your environment or secrets manager.Combine multiple servers
Combine multiple servers
Agents can use tools from multiple MCP servers simultaneously. Unpack each server’s tools with
*MCP(...) and combine them into a single tools list for maximum capability. Loading via load_mcp_tools auto-namespaces each server’s tools (e.g. filesystem_search, github_search) so overlapping names never collide.Related
Tools — built-in tools and custom tool functions
MCP Tool Filtering — filter which tools to expose per agent

