MCP Fundamentals
Model Context Protocol
🔌 MCP (Model Context Protocol) — an open protocol for connecting AI models to external systems. It's like USB for AI: a standard interface for integrating with databases, APIs, file systems.
MCP Server translates Claude's requests into commands for external systems
filesystem
File system access: read, write, search files
postgres
Work with PostgreSQL database: queries, schema, data
github
GitHub integration: issues, PRs, commits, actions
brave-search
Web search via Brave Search API
// ~/.claude/settings.json
{
"mcpServers": {
"postgres": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-postgres"],
"env": {
"DATABASE_URL": "postgresql://user:pass@localhost/mydb"
}
},
"filesystem": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-filesystem", "/path/to/allowed/dir"]
}
}
}Add configuration to ~/.claude/settings.json and restart Claude Code
🔒 Security
Data stays local. Claude doesn't see passwords directly — only query results.
🔌 Extensibility
You can write your own MCP server for any system — APIs, databases, IoT devices.
📦 Reusability
One MCP server works with any AI client that supports the protocol.
🚀 Performance
Server runs locally — no network latency for local resources.
MCP turns Claude Code into a universal interface to any system. Instead of writing integrations for each AI, you write one MCP server — and it works everywhere.
This lesson is part of a structured LLM course.
My Learning Path