Lee's BlogLee's Blog
Article
Project
Category
Tag
Timeline
Article
Project
Category
Tag
Timeline
  • Model Context Protocol (MCP)

Model Context Protocol (MCP)

Model Context Protocol (MCP)

What is it?

The Model Context Protocol (MCP) is an open protocol that enables seamless integration between LLM applications and external data sources and tools.

MCP is a stateless protocol.

img

Architecture

image-20260928164943657

Data layer

JSON-RPC 2.0

Transport layer

  • Stdio transport

    • process communication
  • Streamable HTTP transport

    • HTTP POST

primitives

Tools

Executable functions

Resources

Data sources

Prompts

Configuration

claude

{
  "mcpServers": {
    "filesystem": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-filesystem",
        "/Users/username/Desktop",
        "/Users/username/Downloads"
      ]
    }
  }
}

VSCode/JetBrains IDE mcp.json

{
  "servers": {
    "intellij-idea-2026.1": {
      "type": "sse",
      "url": "http://127.0.0.1:64342/sse",
      "x-metadata": {
        "plugin": {
          "id": "com.github.copilot",
          "name": "GitHub Copilot",
          "publisher": "GitHub",
          "description": "JetBrains IDE built-in MCP server providing IDE tools (file operations, search, refactoring, debugging, VCS, etc.)"
        }
      }
    }
  }
}

MCP Inspector

npx @modelcontextprotocol/inspector
npx -y @modelcontextprotocol/inspector npx @modelcontextprotocol/server-filesystem ~/Desktop
npx @modelcontextprotocol/inspector uvx mcp-server-git --repository ~/code/mcp/servers.git
npx @modelcontextprotocol/inspector --server-url https://api.example.com/mcp --transport http

MCP Registry

  • Official: https://registry.modelcontextprotocol.io

  • GitHub: https://github.com/mcp

stdio常用命令

  • npx
  • node
  • uvx
  • python
  • java -jar
Last Updated: 10/12/26, 6:01 AM
Contributors: zlx01

CC BY-NC-SA 4.0 © 2021~present 粤ICP备2021090228号