GA

gopisuresh-akula/mcp

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

0 stars 0 forks 质量 44 趋势 0

is an (by Anthropic, Nov 2024) that gives AI models a universal, standardized way to connect to , , and — no matter which AI app or model is using them.

概览

is an (by Anthropic, Nov 2024) that gives AI models a universal, standardized way to connect to , , and — no matter which AI app or model is using them. Think of it as — one standard connector for everything. Before MCP, every AI application had to build its own integrations: With MCP, you build an integration once as an MCP Server, and any AI app can use it:

README

MCP — Model Context Protocol

MCP is an open standard (by Anthropic, Nov 2024) that gives AI models a universal, standardized way to connect to tools, data, and services — no matter which AI app or model is using them.

Think of it as USB-C for AI — one standard connector for everything.


The Problem MCP Solves

Before MCP, every AI application had to build its own integrations:

App A → custom code → Database
App A → custom code → GitHub
App A → custom code → Slack

App B → different custom code → Database   (built twice!)
App B → different custom code → GitHub     (built twice!)

With MCP, you build an integration once as an MCP Server, and any AI app can use it:

MCP Server: Database ←── App A (Claude Desktop)
                    ←── App B (Cursor)
                    ←── App C (your custom app)

Folder Structure

mcp/
├── README.md
├── concepts/
│   ├── 01-what-is-mcp.md           ← The big idea
│   ├── 02-architecture.md          ← Host / Client / Server
│   ├── 03-tools.md                 ← Callable functions (like function calling)
│   ├── 04-resources.md             ← Readable data (like RAG)
│   ├── 05-prompts.md               ← Reusable prompt templates
│   ├── 06-transports.md            ← stdio vs HTTP/SSE
│   ├── 07-mcp-vs-function-calling.md ← Key differences
│   └── 08-best-use-cases.md        ← Real-world applications
│
└── implementation/
    ├── requirements.txt
    ├── 01_minimal_server.py        ← Simplest MCP server (2 tools)
    ├── 02_tools_server.py          ← Server with 6 real tools
    ├── 03_resources_server.py      ← Server exposing files as resources
    ├── 04_full_server.py           ← Tools + Resources + Prompts
    └── 05_client.py               ← MCP client connecting to a server

Three Things an MCP Server Can Expose

Primitive What it is Equivalent
Tools Functions the LLM can call Function Calling
Resources Data/files the LLM can read RAG / Context
Prompts Reusable prompt templates System prompts

Quick Start

cd implementation
pip install -r requirements.txt

# Run the full server
python 04_full_server.py

# In another terminal, connect the client
python 05_client.py

Read Concepts in Order

# Topic
1 What is MCP and why it exists
2 Architecture: Host, Client, Server
3 Tools — the callable functions
4 Resources — the readable data
5 Prompts — reusable templates
6 Transports: stdio vs HTTP/SSE
7 MCP vs Function Calling
8 Best use cases
在 GitHub 查看完整 README

安装

This server does not publish a one-line install command.

Open the repository installation guide 新手?先看 mcpskill.org 教程 →