MCP Servers: Getting Started with the Model Context Protocol
MCP Servers: Getting Started with the Model Context Protocol
The Model Context Protocol (MCP) is rapidly becoming the standard way AI coding tools connect to external services. If you have used USB to connect peripherals, MCP is the equivalent for AI assistants. This guide gets you up and running with your first MCP servers.
Why MCP Matters
Before MCP, every AI tool built its own integrations. Cursor had its GitHub plugin, Claude Code had its own file access, and each tool maintained separate connections. MCP standardizes this into a single protocol that any client and any server can speak.
This means:
Your First MCP Server: Filesystem
The filesystem server is the simplest starting point. It gives your AI assistant access to read and write files in specified directories.
For Claude Code
claude mcp add filesystem -- npx -y @modelcontextprotocol/server-filesystem ~/projects
Verify it was added
claude mcp list
Now when you chat with Claude Code, it can read files from your ~/projects directory directly, without you pasting file contents.
Adding a Database Server
Connect your AI to a PostgreSQL database for schema inspection and query execution:
Add PostgreSQL server with connection string
claude mcp add postgres -- npx -y @modelcontextprotocol/server-postgres "postgresql://user:pass@localhost:5432/mydb"
The AI can now inspect your database schema, write and execute queries, and help you understand your data model.
Transport Types Explained
MCP servers communicate via two mechanisms:
stdio (Standard I/O): The server runs as a local process on your machine. Communication happens through stdin/stdout pipes. This is the most common type and the easiest to set up. Streamable HTTP: The server runs as a web service, typically on a remote machine or in the cloud. The client connects over HTTP. Used for shared team servers or cloud-hosted integrations.Most servers you install locally use stdio. Remote servers (like a shared Jira integration for your team) use HTTP.
Essential Server Stack
Here is a practical starter stack for a full-stack developer:
File and Git operations
claude mcp add filesystem -- npx -y @modelcontextprotocol/server-filesystem ~/projects
claude mcp add git -- npx -y @modelcontextprotocol/server-git
GitHub integration
export GITHUB_PERSONAL_ACCESS_TOKEN=ghp_xxx
claude mcp add github -- npx -y @modelcontextprotocol/server-github
Database
claude mcp add postgres -- npx -y @modelcontextprotocol/server-postgres "$DATABASE_URL"
Web browsing
claude mcp add puppeteer -- npx -y @modelcontextprotocol/server-puppeteer
Security Best Practices
MCP servers can be powerful — and dangerous if misconfigured:
Troubleshooting
Common issues and fixes:
Server not connecting: Check that the npx package name is correct and your Node.js version is 18+. Permission denied: Ensure API tokens have the necessary scopes. GitHub tokens needrepo scope for private repos.
Slow responses: stdio servers start a new process for each session. Some servers with heavy dependencies take a few seconds to initialize.
Conclusion
MCP transforms AI coding tools from isolated assistants into connected powerhouses. Start with the filesystem and Git servers, add your database, and expand from there. The ecosystem is growing rapidly — check the MCP server directory for new integrations weekly.