How to Use MCP Servers in Claude Code Today: A Practical Guide
What MCP Actually Does in Your Editor
The Model Context Protocol (MCP) isn't just theoretical—it's changing how Claude Code interacts with your entire development environment. While APIs are deterministic contracts for developers, MCP servers give Claude Code dynamic access to tools, resources, and prompts. This means instead of just generating code, Claude can now:
- Query your database schema directly
- Check your calendar for meeting conflicts
- Search documentation without leaving the editor
- Access version control history
- Interact with cloud services
Setting Up Your First MCP Server
Claude Code has built-in MCP client support. Here's how to get started:
- Install the MCP CLI (if not already available):
npm install -g @modelcontextprotocol/cli
- Add MCP servers to your Claude Code configuration (
~/.config/claude-code/config.jsonor project-specific):
{
"mcpServers": {
"filesystem": {
"command": "npx",
"args": ["@modelcontextprotocol/server-filesystem", "/path/to/your/project"]
},
"sqlite": {
"command": "npx",
"args": ["@modelcontextprotocol/server-sqlite", "your-database.db"]
}
}
}
- Restart Claude Code and check the MCP connection status in the bottom status bar.
Essential MCP Servers for Developers
Here are the most useful MCP servers you should install right now:
1. Filesystem Server (Already mentioned above)
- What it does: Gives Claude Code read/write access to your project files
- Why it matters: Claude can now navigate your entire codebase contextually, not just what's in the current file
2. Git Server
{
"git": {
"command": "npx",
"args": ["@modelcontextprotocol/server-git"]
}
}
- Use case: "Claude, show me what changed in the last commit that broke the tests"
- Result: Claude can query git history and show you specific changes
3. PostgreSQL/MySQL Server
{
"postgres": {
"command": "npx",
"args": ["@modelcontextprotocol/server-postgres", "postgresql://user:pass@localhost/db"]
}
}
- Use case: "Claude, what's the schema of the users table and show me some sample data"
- Result: Claude can query your database directly, understanding your actual data structure
4. HTTP Server
{
"http": {
"command": "npx",
"args": ["@modelcontextprotocol/server-http"]
}
}
- Use case: "Claude, fetch the latest API documentation from our internal wiki"
- Result: Claude can make HTTP requests to gather context
How to Prompt Claude with MCP Tools
When MCP servers are connected, Claude Code automatically knows what tools are available. But you can be more specific:
Instead of: "Write a SQL query to find inactive users"
Try: "Using the postgres MCP server, query the users table for accounts with no login activity in the last 90 days. Show me the SQL you generate and the results."
Claude will:
- Recognize it has database access via MCP
- Generate appropriate SQL
- Execute it through the MCP server
- Return both the query and the results
The Elicitation Pattern: Two-Way Communication
MCP's most powerful feature is elicitation—when Claude needs more information from you to use a tool. For example:
You: "Claude, schedule a meeting about the API redesign"
Claude: "I can use the calendar MCP server to schedule that. What time should the meeting be, and who should I invite?"
This creates a conversational workflow where Claude doesn't just guess parameters—it asks for them, then uses the tools with the correct information.
Building Your Own MCP Servers
If you have internal tools or APIs, you can create custom MCP servers. The basic structure:
// simple-mcp-server.js
import { Server } from '@modelcontextprotocol/sdk/server/index.js';
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
const server = new Server(
{ name: 'my-tool-server', version: '1.0.0' },
{ capabilities: { tools: {} } }
);
server.setRequestHandler(
'tools/list',
async () => ({
tools: [
{
name: 'deploy_to_staging',
description: 'Deploy the current branch to staging environment',
inputSchema: {
type: 'object',
properties: {
force: {
type: 'boolean',
description: 'Force deploy even if tests fail'
}
}
}
}
]
})
);
const transport = new StdioServerTransport();
await server.connect(transport);
Add it to your config:
{
"deploy": {
"command": "node",
"args": ["/path/to/simple-mcp-server.js"]
}
}
Now you can say: "Claude, deploy this to staging" and it will use your internal deployment tool.
Performance Considerations
MCP servers run locally or connect to your services. This means:
- No data leaves your environment (for local servers)
- Latency depends on your connections
- You control authentication and security
Start with read-only servers (filesystem, git) before adding write capabilities.
Next Steps
- Install the filesystem and git servers today—they're safe and immediately useful
- Experiment with one database server for your main project
- Watch the MCP GitHub repository for new servers
- Consider building a simple MCP server for your team's most common workflow
MCP transforms Claude Code from a code generator to a true development assistant that understands and interacts with your entire environment. The protocol is stable, the servers are maturing, and the workflow improvements are real.



