How to Integrate Claude with MCP for File Access
The Model Context Protocol (MCP) connects Claude to external tools and data sources, giving the AI access to files, databases, and APIs. This guide walks through setting up MCP servers, configuring Claude Desktop, and connecting to file storage services like Fast.io for persistent agent storage.
What Is the Model Context Protocol?
The Model Context Protocol is an open standard that creates two-way connections between AI assistants and external systems. MCP lets Claude interact with your local files, query databases, call APIs, and access cloud storage without manual copy-paste workflows.
Anthropic introduced MCP in November 2024, and it now lives under the Linux Foundation's Agentic AI Foundation. The protocol has become a common way to extend what Claude can do beyond conversation.
What MCP enables:
- File system access (read, write, organize files)
- Database queries (PostgreSQL, SQLite, etc.)
- API integrations (GitHub, Slack, cloud storage)
- Tool execution (run scripts, automate tasks)
Before MCP, giving Claude access to external data meant downloading files, pasting content into chat, and copying results back by hand. MCP removes that extra work.
How MCP Architecture Works
MCP uses a client-server model. Claude (or another AI) acts as the client, while MCP servers provide specific capabilities.
Core components:
- MCP Client: The AI application (Claude Desktop, Claude Code) that requests access to tools and resources
- MCP Server: A program exposing specific capabilities through the protocol
- Transport Layer: Communication channel (stdio for local, HTTP for remote)
- Resources: Data the server can provide (files, database records)
- Tools: Actions the server can perform (upload, query, execute)
Each server specializes in one domain. A filesystem server handles local files. A GitHub server manages repositories. A storage server like Fast.io's handles cloud files. You can run multiple servers simultaneously, giving Claude access to all their capabilities.
Setting Up Claude Desktop for MCP
Claude Desktop is the primary way to use MCP on Mac and Windows. The app manages server connections and handles user approval for tool access.
Prerequisites:
- Claude Desktop app installed (download from claude.ai)
- Node.js v18 or later (required by most MCP servers)
- A text editor for configuration files
Step 1: Locate the configuration file
On macOS:
~/Library/Application Support/Claude/claude_desktop_config.json
On Windows:
%APPDATA%\Claude\claude_desktop_config.json
Step 2: Add your first MCP server
The configuration file lists all servers Claude should connect to. Here's a minimal example with the filesystem server:
{
"mcpServers": {
"filesystem": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-filesystem",
"/Users/yourname/Documents"
]
}
}
}
Step 3: Restart Claude Desktop
After saving the configuration, quit and reopen Claude Desktop. The app will spawn the configured servers on startup.
Step 4: Verify the connection
Click the hammer icon in Claude's input area. You should see the server's tools listed. Ask Claude to list files in your configured directory to confirm it works.
Connecting Claude to Cloud Storage with Fast.io
Local file access is useful, but AI agents often need persistent cloud storage. Fast.io provides an official MCP server that gives Claude direct access to cloud-based workspaces.
Why cloud storage for AI agents?
- Files persist across sessions (local files get lost when machines change)
- Share files between multiple agents and humans
- Organize outputs in workspaces with proper permissions
- Access files from Claude Desktop, Claude Code, or API-based agents
Setting up the Fast.io MCP server:
Sign up for a Fast.io account at fast.io. Agents get 5,000 free credits per month.
Generate an API key from your workspace settings.
Add the Fast.io server to your Claude Desktop configuration:
{
"mcpServers": {
"fastio": {
"command": "npx",
"args": ["-y", "@anthropic/fastio-mcp-server"],
"env": {
"FASTIO_API_KEY": "your-api-key-here"
}
}
}
}
- Restart Claude Desktop.
Now Claude can upload files to your Fast.io workspace, download existing files, create folders, and manage permissions. The Fast.io MCP documentation covers all available tools.
Popular MCP Servers for Development
The MCP ecosystem includes servers for most common developer tools. Here are the most useful ones:
File and Data Access:
@modelcontextprotocol/server-filesystem- Local file read/write@modelcontextprotocol/server-postgres- PostgreSQL queries@modelcontextprotocol/server-sqlite- SQLite database access
Development Tools:
@modelcontextprotocol/server-github- Repository management, issues, PRs@modelcontextprotocol/server-git- Local git operations@modelcontextprotocol/server-puppeteer- Browser automation
Productivity:
@modelcontextprotocol/server-slack- Slack messaging@modelcontextprotocol/server-google-drive- Google Drive files
Example multi-server configuration:
{
"mcpServers": {
"filesystem": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-filesystem", "/Users/dev/projects"]
},
"github": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-github"],
"env": {
"GITHUB_TOKEN": "ghp_xxxx"
}
},
"postgres": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-postgres"],
"env": {
"DATABASE_URL": "postgresql://user:pass@localhost:5432/mydb"
}
}
}
}
Claude will have access to all configured servers simultaneously.
Using MCP with Claude Code
Claude Code is Anthropic's terminal-based coding assistant. It supports MCP through the same configuration file format as Claude Desktop, with some differences in behavior.
Configuration location:
~/.claude/mcp_settings.json
Claude Code MCP features:
- Automatic tool approval for trusted servers
- Background server management
- Project-specific configurations via
.mcp.jsonin project root
Project-level configuration example:
Create .mcp.json in your project directory:
{
"servers": {
"project-db": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-sqlite", "./data/app.db"]
}
}
}
Claude Code will automatically connect to this server when working in the project directory.
Security considerations:
Claude Code runs with your user permissions. MCP servers can execute commands on your system. Only install servers from trusted sources, and review server code if you're connecting to sensitive systems.
Troubleshooting Common MCP Issues
MCP connections can fail for several reasons. Here are the most common problems and fixes:
"Server not found" errors
The server package isn't installed or Node.js can't find it:
# Install the server globally
npm install -g @modelcontextprotocol/server-filesystem
# Or use npx with -y flag for automatic installation
npx -y @modelcontextprotocol/server-filesystem
Server starts but tools don't appear
Check the Claude Desktop logs:
- macOS:
~/Library/Logs/Claude/mcp.log - Windows:
%APPDATA%\Claude\logs\mcp.log
Common causes:
- Invalid JSON in configuration file (missing comma, extra bracket)
- Environment variables not set correctly
- Server crashed during startup
Permission denied errors
The server lacks access to the requested resource:
- Check file/folder permissions for filesystem servers
- Verify API keys and tokens are valid
- Ensure the server is allowed to access the network
Slow server responses
MCP servers run locally, so slowness usually means:
- The external service is slow (database, API)
- The server is processing large files
- Multiple servers competing for resources
For persistent storage, Fast.io runs in the cloud, which avoids local file system bottlenecks.
Building Custom MCP Servers
When existing servers don't meet your needs, you can build custom ones. The MCP SDK is available for Python and TypeScript.
TypeScript server skeleton:
import { Server } from "@modelcontextprotocol/sdk/server";
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio";
const server = new Server({
name: "my-custom-server",
version: "1.0.0"
}, {
capabilities: {
tools: {}
}
});
server.setRequestHandler("tools/list", async () => ({
tools: [{
name: "my_tool",
description: "Does something useful",
inputSchema: {
type: "object",
properties: {
input: { type: "string" }
}
}
}]
}));
server.setRequestHandler("tools/call", async (request) => {
if (request.params.name === "my_tool") {
return { content: [{ type: "text", text: "Result" }] };
}
});
const transport = new StdioServerTransport();
await server.connect(transport);
Key implementation points:
- Servers communicate over stdin/stdout (stdio transport) or HTTP
- Tools require JSON Schema input definitions
- Return content as structured objects (text, images, resources)
- Handle errors gracefully with proper error codes
The MCP specification documents all message types and protocols.
Frequently Asked Questions
How do I use MCP with Claude?
Install Claude Desktop, create a configuration file at ~/Library/Application Support/Claude/claude_desktop_config.json (Mac) or %APPDATA%\Claude\claude_desktop_config.json (Windows), add your MCP server configurations, and restart the app. Claude will connect to the servers and show available tools in the interface.
What MCP servers work with Claude?
Claude works with any MCP-compliant server. Popular options include filesystem access, GitHub, PostgreSQL, Slack, Google Drive, and Puppeteer. Fast.io provides an official MCP server for cloud storage. You can also build custom servers using the MCP SDK.
How do I set up Claude MCP?
Install Node.js v18+, download Claude Desktop, and create a JSON configuration file listing your MCP servers. Each server entry needs a command (usually npx), arguments (the server package), and optional environment variables for API keys. Restart Claude Desktop to connect.
Is MCP free to use with Claude?
MCP itself is an open protocol with no licensing costs. Claude Desktop includes MCP support at no extra charge. Individual MCP servers may require API keys for the services they connect to. Fast.io offers 5,000 free credits monthly for AI agents.
Can MCP access files on my computer?
Yes, with the filesystem MCP server. You specify which directories the server can access in the configuration. Claude will ask for your approval before reading or writing files. Never configure servers with access to sensitive directories like your home folder root.
Related Resources
Need cloud storage for your AI agents?
Fast.io's MCP server gives Claude persistent file storage. Agents get 5,000 free credits monthly.