https://claude.ai/public/artifacts/e780b23a-85f1-4350-b6ef-fcbd59b7a979
# Hoặc Ctrl+C để exit
```
### Bước 2: Install MCP Servers
```bash
# Install MCP servers via npm
npm install -g @modelcontextprotocol/server-filesystem
npm install -g @modelcontextprotocol/server-git
npm install -g @modelcontextprotocol/server-brave-search
npm install -g @modelcontextprotocol/server-sqlite
npm install -g @modelcontextprotocol/server-github
```
### Bước 3: Create MCP Configuration
```bash
# Tạo MCP config directory
mkdir -p ~/.config/claude-code
# Create MCP config file
nano ~/.config/claude-code/mcp-config.json
```
**MCP Configuration:**
```json
{
"mcpServers": {
"filesystem": {
"command": "npx",
"args": ["@modelcontextprotocol/server-filesystem", "/home/binhvuong/workspace"],
"env": {}
},
"git": {
"command": "npx",
"args": ["@modelcontextprotocol/server-git"],
"env": {}
},
"sqlite": {
"command": "npx",
"args": ["@modelcontextprotocol/server-sqlite"],
"env": {}
},
"github": {
"command": "npx",
"args": ["@modelcontextprotocol/server-github"],
"env": {
"GITHUB_PERSONAL_ACCESS_TOKEN": "your-github-token-here"
}
}
}
}
```
### Bước 4: Configure Claude Code với MCP
```bash
# Load MCP config trong Claude Code
npx @anthropic-ai/claude-code --mcp-config ~/.config/claude-code/mcp-config.json
# Hoặc set as default
echo 'export CLAUDE_MCP_CONFIG=~/.config/claude-code/mcp-config.json' >> ~/.bashrc
source ~/.bashrc
```
### Bước 5: Advanced MCP Setup
```bash
# Install additional useful MCP servers
npm install -g @modelcontextprotocol/server-puppeteer
npm install -g @modelcontextprotocol/server-postgres
npm install -g @modelcontextprotocol/server-fetch
# Create comprehensive MCP config
nano ~/.config/claude-code/advanced-mcp.json
```
**Advanced MCP Config:**
```json
{
"mcpServers": {
"filesystem": {
"command": "npx",
"args": [
"@modelcontextprotocol/server-filesystem",
"/home/binhvuong/workspace",
"/home/binhvuong/workspace/claude-projects"
],
"env": {}
},
"git": {
"command": "npx",
"args": ["@modelcontextprotocol/server-git"],
"env": {
"GIT_AUTHOR_NAME": "Binh Vuong",
"GIT_AUTHOR_EMAIL": "your-email@domain.com"
}
},
"sqlite": {
"command": "npx",
"args": ["@modelcontextprotocol/server-sqlite"],
"env": {}
},
"web-search": {
"command": "npx",
"args": ["@modelcontextprotocol/server-brave-search"],
"env": {
"BRAVE_API_KEY": "your-brave-api-key"
}
},
"github": {
"command": "npx",
"args": ["@modelcontextprotocol/server-github"],
"env": {
"GITHUB_PERSONAL_ACCESS_TOKEN": "your-github-token"
}
}
}
}
```
### Bước 6: Test MCP Integration
```bash
# Start Claude Code với MCP
npx @anthropic-ai/claude-code --mcp-config ~/.config/claude-code/mcp-config.json
# Trong Claude Code session, test MCP features:
# - File operations: "List files in my workspace"
# - Git operations: "Show git status of my projects"
# - Database queries: "Help me with SQL queries"
```
## 🔧 Setup MCP Tools permissions
```bash
# Give permissions for filesystem access
chmod +r /home/binhvuong/workspace -R
# Setup Git configuration
git config --global user.name "Binh Vuong"
git config --global user.email "your-email@domain.com"
# Create sample databases for testing
mkdir -p ~/workspace/databases
touch ~/workspace/databases/sample.db
```
## 📱 Update Tmux session with MCP
```bash
# Update start script
nano ~/start-claude-dev.sh
```
```bash
#!/bin/bash
SESSION_NAME="claude-dev"
WORKSPACE_DIR="$HOME/workspace/claude-projects"
MCP_CONFIG="$HOME/.config/claude-code/mcp-config.json"
echo "🚀 Starting Claude Code Development Environment with MCP..."
if tmux has-session -t $SESSION_NAME 2>/dev/null; then
echo "📱 Attaching to existing session..."
tmux attach-session -t $SESSION_NAME
else
echo "🆕 Creating new Claude Code session with MCP..."
# Main Claude Code window with MCP
tmux new-session -d -s $SESSION_NAME -n "claude-mcp" -c "$WORKSPACE_DIR"
tmux send-keys -t $SESSION_NAME:claude-mcp "echo '🤖 Claude Code with MCP Integration'" Enter
tmux send-keys -t $SESSION_NAME:claude-mcp "echo '⚙️ MCP Config: $MCP_CONFIG'" Enter
tmux send-keys -t $SESSION_NAME:claude-mcp "echo '💡 Starting Claude Code with MCP...'" Enter
tmux send-keys -t $SESSION_NAME:claude-mcp "npx @anthropic-ai/claude-code --mcp-config $MCP_CONFIG" Enter
# Workspace window
tmux new-window -t $SESSION_NAME -n "workspace" -c "$WORKSPACE_DIR"
tmux send-keys -t $SESSION_NAME:workspace "ls -la" Enter
# Git window
tmux new-window -t $SESSION_NAME -n "git" -c "$WORKSPACE_DIR"
tmux send-keys -t $SESSION_NAME:git "git status" Enter
# Database window
tmux new-window -t $SESSION_NAME -n "database" -c "$WORKSPACE_DIR"
tmux send-keys -t $SESSION_NAME:database "echo 'Database tools ready'" Enter
# Monitoring
tmux new-window -t $SESSION_NAME -n "monitor"
tmux send-keys -t $SESSION_NAME:monitor "htop" Enter
# Return to main Claude window
tmux select-window -t $SESSION_NAME:claude-mcp
tmux attach-session -t $SESSION_NAME
fi
```
## 🎯 Test MCP functionality
**Start Claude Code với MCP:**
```bash
~/start-claude-dev.sh
# Hoặc direct:
npx @anthropic-ai/claude-code --mcp-config ~/.config/claude-code/mcp-config.json
```
**Test commands trong Claude Code:**
```
> chat
I'm ready to help with your development tasks with enhanced MCP capabilities!
> List all files in my workspace
> Show me the git status of my current project
> Help me create a new Python project with proper structure
> Search for Python best practices online
> Create a SQLite database for my project
```
## 🔥 MCP Benefits cho bạn:
1. **📁 File System**: Claude có thể đọc/ghi files trực tiếp
1. **🔧 Git Integration**: Git operations thông qua Claude
1. **🗄️ Database Access**: Query và manage databases
1. **🌐 Web Search**: Claude có thể search web real-time
1. **💻 GitHub Integration**: Interact với GitHub repos
**Hãy setup MCP config và test! Điều này sẽ làm Claude Code powerful hơn rất nhiều! 🚀**
Công khai Cập nhật lần cuối: 2025-07-26 11:18:10 PM