MCP Server Setup
MCP lets Claude access your local machine — files, databases, APIs, and more.
What is MCP?
MCP (Model Context Protocol) is an open standard developed by Anthropic that lets Claude connect to external tools and data sources through a standardized interface. Instead of Claude being limited to what you paste in the chat, MCP lets it:
- Read and write files on your local machine
- Query your databases directly
- Interact with APIs (GitHub, Slack, Jira)
- Execute code in your local environment
- Search the web
- Interact with your browser
How MCP works
MCP uses a client-server architecture:
- Claude Desktop (or Claude Code) is the MCP client
- MCP servers are processes running on your machine that expose tools and resources
- Claude discovers available tools and calls them when you ask it to do something
Step 1: Install Claude Desktop
MCP currently works with Claude Desktop (not the web version). Download it from claude.ai/download. Available for macOS and Windows.
Step 2: Install Node.js
Most MCP servers are Node.js packages. Install Node.js 18 or later from nodejs.org.
Step 3: Configure MCP servers
Claude Desktop reads its MCP configuration from a JSON file:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"filesystem": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-filesystem",
"/Users/yourname/projects"
]
}
}
}
Replace /Users/yourname/projects with the directory you want Claude to access. Restart Claude Desktop. You'll see MCP tools listed when you start a new chat.
Step 4: Useful MCP servers to install
| Server | Package | What it gives Claude |
|---|---|---|
| Filesystem | @modelcontextprotocol/server-filesystem | Read/write your local files |
| PostgreSQL | @modelcontextprotocol/server-postgres | Query your Postgres databases |
| SQLite | @modelcontextprotocol/server-sqlite | Query local SQLite files |
| GitHub | @modelcontextprotocol/server-github | Read repos, issues, PRs |
| Brave Search | @modelcontextprotocol/server-brave-search | Web search with Brave API |
| Puppeteer | @modelcontextprotocol/server-puppeteer | Browser automation |
| Fetch | @modelcontextprotocol/server-fetch | HTTP requests to any URL |
Step 5: Add the Postgres MCP server
{
"mcpServers": {
"filesystem": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-filesystem", "/Users/yourname/projects"]
},
"postgres": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-postgres",
"postgresql://localhost/mydb?user=postgres&password=yourpassword"]
}
}
}
Now you can ask Claude: "Look at the orders table in my database and show me the top 5 customers by revenue this month." — and Claude will actually run the SQL against your local database.
Using Claude Code for MCP
Claude Code (the command-line tool) also supports MCP. Run:
npm install -g @anthropic-ai/claude-code claude mcp add filesystem /path/to/your/project claude mcp list # see connected servers