Wiki Tutorial

Complete Guide to MCP Servers

🔌 What is MCP

MCP (Model Context Protocol) is a standard protocol open sourced by Anthropic for connecting AI assistants with external data sources and tools. It solves the problem of isolation of LLM applications and data, allowing AI to securely and controllably access external systems.

🎯 Core Concept

MCP uses a client-server architecture. AI assistants (such as Claude) act as clients, and MCP Server provides tools and data access capabilities. A unified protocol replaces fragmented integration solutions.

What MCP can do:

  • Tool call : Let AI perform external operations (such as sending emails, creating Issues)
  • Data Access : Let AI read external data (such as database, API, file)
  • Contextual enhancement : Provide real-time external information to AI

✨ Why use MCP

💡 Core Values

MCP allows AI to change from "only talking" to "able to do things", and from a closed system to an open platform.

Main advantages:

  • Unified interface : One protocol to connect all external services without writing custom code for each service
  • Safe and controllable : clear permission boundaries, AI can only access authorized functions
  • Rich ecology : 400+ official and community servers, covering mainstream services
  • Easy to expand : Supports multiple programming language SDKs and can customize the server

📦 Installation configuration

Claude Code configuration method

Created in the project root directory .mcp.json File:

json - .mcp.json
{
  "mcpServers": {
    "filesystem": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-filesystem", "/path/to/allowed/dir"]
    },
    "github": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-github"],
      "env": {
        "GITHUB_PERSONAL_ACCESS_TOKEN": "your-token-here"
      }
    },
    "memory": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-memory"]
    }
  }
}

Claude Desktop configuration method

Edit the Claude Desktop configuration file:

Configuration file location
# macOS
~/Library/Application Support/Claude/claude_desktop_config.json

# Windows
%APPDATA%\Claude\claude_desktop_config.json
json - claude_desktop_config.json
{
  "mcpServers": {
    "brave-search": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-brave-search"],
      "env": {
        "BRAVE_API_KEY": "your-api-key"
      }
    },
    "slack": {
      "command": "npx", 
      "args": ["-y", "@modelcontextprotocol/server-slack"],
      "env": {
        "SLACK_BOT_TOKEN": "xoxb-your-token",
        "SLACK_TEAM_ID": "T0123456789"
      }
    }
  }
}
⚠️ Safety Tips

Do not submit configuration files containing API keys to version control. It is recommended to use environment variables or key management tools.

Official reference server

📁 Filesystem Official

Secure file operations, supporting configurable directory access control

🔗 Fetch Official

Web content acquisition and conversion, optimized LLM usage

🧠 Memory Official

Persistent memory system based on knowledge graph

📂 Git Official

Read, search, and operate Git repositories

🕐 Time Official

Time and time zone conversion function

🤔 Sequential Thinking Official

Dynamic problem solving through thought sequences

Development tools

Server Function Installation command
GitHub GitHub warehouse operation, Issue, PR management @modelcontextprotocol/server-github
GitLab GitLab project management, supports OAuth @modelcontextprotocol/server-gitlab
Linear Linear Issue Search, Create, Update @modelcontextprotocol/server-linear
Sentry Error tracking and analysis @modelcontextprotocol/server-sentry

Database class

Server Function
PostgreSQL Read-only database access and schema checking
SQLite Local SQLite database operations
MongoDB MongoDB database operations
Redis Redis key-value storage interaction
Pinecone / Qdrant Vector database semantic search

Cloud services

☁️ AWS

AWS service integration, following best practices

🔷 Azure

Azure Storage、Cosmos DB、CLI

🌩️ Cloudflare

Workers, KV, R2, D1 Resource Management

▲ Vercel

Log access, document search, project management

Search and Data Class

🔍 Brave Search

Web and local search, requires API Key

🔎 Exa

AI dedicated search engine

🗺️ Google Maps

Location services, directions, location details

🐦 Twitter/X

Tweet search and publishing

Browser Automation

🎭 Playwright

Browser Automation Testing and Operations

🤖 Puppeteer

Browser Automation and Web Scraping

🚀 How to use

After configuration is complete, Claude will automatically identify available MCP tools. You can:

Directly describe the task

Sample dialogue
# Claude 会自动调用 GitHub MCP
"帮我创建一个 Issue,标题是 'Bug: 登录页面样式错乱'"

# Claude 会自动调用 Filesystem MCP
"读取 src/config.ts 文件内容"

# Claude 会自动调用 Brave Search MCP
"搜索一下 Next.js 15 的新特性"

View available tools

Available in Claude Code /mcp command to view configured MCP servers and the tools they provide.

💡 Best Practices

Install MCP servers on demand to avoid configuring too many infrequently used services. Each server takes up startup time and resources.

📚 Related Resources