MCP Protocol
Integration framework for external tools and data sources
Prerequisites
- Basic Claude Code usage
- Familiarity with APIs
What You'll Learn
- Understand MCP architecture and concepts
- Configure MCP servers in settings
- Use popular servers (filesystem, PostgreSQL, GitHub)
- Build custom MCP servers for your needs
What MCP Enables
Query PostgreSQL, SQLite, or other databases directly from conversations
Read, write, and search files across your filesystem
Connect to GitHub, Slack, Linear, and other services
Control browsers via Puppeteer or Playwright for testing
Configuring MCP Servers
MCP servers are configured in your Claude settings. Here's an example configuration:
// ~/.claude/settings.json
{
"mcpServers": {
"filesystem": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-filesystem", "/home/user"]
},
"postgres": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-postgres"],
"env": { "DATABASE_URL": "postgres://..." }
}
}
}Top-level key containing all server configs
How to start the MCP server process
Environment variables for the server
Popular MCP Servers
@modelcontextprotocol/server-filesystemRead, write, and search files
@modelcontextprotocol/server-postgresQuery PostgreSQL databases
@modelcontextprotocol/server-githubInteract with GitHub repos
@modelcontextprotocol/server-puppeteerBrowser automation and screenshots
@modelcontextprotocol/server-slackSend messages, search channels
@modelcontextprotocol/server-memoryPersistent key-value storage
Tools vs Resources
Actions that Claude can execute. Tools perform operations and return results.
- •Can have side effects (write files, send messages)
- •Called explicitly when needed
- •Examples: query, create_issue, post_message
Data that Claude can read. Resources provide context without executing actions.
- •Read-only access to data
- •Can be loaded into context automatically
- •Examples: file contents, database schema, config
Installing MCP Servers
Browse the MCP server registry or npm for @modelcontextprotocol/server-* packages
Configure the server in ~/.claude/settings.json under mcpServers
Claude will connect to the new server and discover its tools and resources
⚠️ Security Considerations
- •MCP servers run with your user permissions—they can access anything you can access.
- •Only install servers from trusted sources. Review the code if possible.
- •Use environment variables for sensitive credentials—never hardcode them in settings.
- •Limit filesystem server paths to directories you want Claude to access.
💡 Pro Tips
- 1.Start with the filesystem server—it's the most universally useful and helps Claude navigate your projects.
- 2.Use
/mcpto see which servers are connected and what tools are available. - 3.Combine database + filesystem servers for powerful data analysis workflows.
- 4.Create project-specific MCP configs in
.claude/settings.jsonfor team consistency.
Master Claude Code faster
Get notified when new animated guides are released.
Subscribe to the newsletter