MCP Protocol Ecosystem
In the mcp_station project, I analyzed the MCP (Model Context Protocol) ecosystem and built a server from scratch.
MCP Ecosystem Structure
graph TD
A[MCP Host] --> B[MCP Client]
B --> C[MCP Server 1 - 파일]
B --> D[MCP Server 2 - DB]
B --> E[MCP Server 3 - API]
C --> F[로컬 파일 시스템]
D --> G[PostgreSQL]
E --> H[외부 API]
A --> I[Claude Desktop]
A --> J[VS Code Copilot]
A --> K[커스텀 앱]
MCP Server Implementation
from mcp.server import Server
from mcp.types import Tool, TextContent
server = Server("my-mcp-server")
@server.list_tools()
async def list_tools():
return [
Tool(
name="search_documents",
description="문서를 검색합니다",
inputSchema={
"type": "object",
"properties": {
"query": {"type": "string"}
},
"required": ["query"]
}
)
]
@server.call_tool()
async def call_tool(name: str, arguments: dict):
if name == "search_documents":
results = search(arguments["query"])
return [TextContent(type="text", text=str(results))]
Transport Protocol
sequenceDiagram
participant H as MCP Host
participant C as MCP Client
participant S as MCP Server
H->>C: 사용자 요청
C->>S: initialize
S-->>C: capabilities
C->>S: tools/list
S-->>C: 도구 목록
C->>S: tools/call (search_documents)
S-->>C: 검색 결과
C-->>H: 결과 전달
The Value of MCP
| Comparison | Function Calling | MCP |
|---|---|---|
| Standardization | Platform-specific | Open protocol |
| Compatibility | OpenAI only | All LLMs |
| Server reuse | Not possible | Supported |
| Ecosystem | Limited | Growing |
MCP has a strong chance of becoming the standard for AI agent ecosystems. Building with it hands-on in mcp_station made that clear.