Bible Network Crypto DeFi Onchain RWA AI Agent Stablecoin Chain SAFU CryptoTax DeFAI AGI Claude Me Claude Skill Claude Design Claude Cowork
Independent Media
Not affiliated with any project
Exploring the Frontier of AI Intelligence
claude-me.com
LATEST
What Are MCP Connectors: A Common Language That Lets Claude Talk to External Services  ·  Claude's Computer Use Capability: What It Can Actually Do, and Where the Real Limits Are  ·  When to Use Artifacts, and When Staying in the Chat Is Enough  ·  Cutting API Costs With Prompt Caching: An Overlooked Setting That Actually Saves Money  ·  Your First Claude Code Project: A Complete Walkthrough From Zero  ·  Anthropic's Responsible Scaling Policy: A Safety Framework That Tightens Automatically as Model Capability Grows
Glossary · MCP Tools

MCP Server

MCP Tools Advanced

30-Second Version · For the impatient
The service-side component in the <a href="/en/glossary/mcp-tools/mcp-protocol/">MCP (Model Context Protocol)</a> ecosystem responsible for "providing tools and resources." Developers implement in Python or TypeScript, defining three primitive types: Resources (readable data), Tools (executable functions), and Prompts (preset prompt templates), letting MCP Clients (like <a href="/en/glossary/claude-tools/claude-desktop/">Claude Desktop</a>) call these capabilities. Building custom MCP Servers is the core technology for connecting Claude to any external system.
Full Explanation +
01 · What is this?

What are the three core MCP Server primitives (Resources, Tools, Prompts) and when to use each?

Resources: represent data Claude can read from the MCP Server. Resources are "passive" — Claude can request to read them, but they don't execute operations. Suitable for: static or dynamic data access (file contents, database records, API snapshots). Each Resource has a URI; Claude reads corresponding content via this URI.

Tools: represent functions Claude can execute. Tools are "active" — Claude calls them when it judges it needs to, passing parameters and receiving results. The most commonly used primitive. Suitable for: any operation you want Claude to "do" (search, write, query, send, transform). Each Tool has a name, description, and input parameter JSON Schema.

Prompts: represent predefined prompt workflows letting MCP Clients quickly invoke standardized tasks. Prompts are "reusable task templates" — users can select them directly from the MCP Client interface without manually entering full prompts each time. Suitable for: standardized workflows you want users to invoke with one click.

Selection principle: use Resources to let Claude read a data source; Tools to let Claude execute an operation; Prompts for standardized task flows for quick user access. In most MCP Server implementations, Tools are the core primitive; Resources and Prompts are supplementary.

02 · Why does it exist?

How do you build a basic MCP Server with Python? What's the structure of a minimum viable version?

Using Anthropic's official Python MCP SDK, the core structure:

from mcp.server.fastmcp import FastMCP
mcp = FastMCP("my-server")

@mcp.tool()
def search_documents(query: str, max_results: int = 5) -> str:
    """
    Search the document library.
    Use when: user needs to find documents on a specific topic.
    Don't use when: looking for a specific document by ID (use get_document).
    Args:
        query: search keywords
        max_results: max results to return (default 5)
    """
    return format_results(your_search_function(query, max_results))

@mcp.resource("docs://{doc_id}")
def get_document(doc_id: str) -> str:
    """Read the full content of a specific document by ID."""
    return your_db.get_document(doc_id)

if __name__ == "__main__":
    mcp.run()

The most important design decision: the Tool's docstring. Claude relies entirely on this text to decide when to call the tool. A good Tool docstring includes: what it does (one-sentence description), when to call it (applicable scenarios), when not to call it (exclusion scenarios), and input parameter meanings and formats.

Connect in Claude Desktop's claude_desktop_config.json by adding the server configuration.

03 · How does it affect your decisions?

What are the technical differences between local and remote MCP Servers, and their applicable scenarios?

Local MCP Server: runs on the user's own computer, communicates with MCP Client via Standard I/O (stdio). Currently the primary MCP connection method for Claude Desktop.

Suited for local Server: accessing local file systems or databases; executing local command-line tools; personal development and testing; sensitive data that shouldn't be sent to external services.

Remote MCP Server: deployed on cloud or enterprise servers, communicating via HTTP/HTTPS and Server-Sent Events (SSE). Multiple users can share one remote Server.

Suited for remote Server: multiple users sharing the same tools (enterprise internal knowledge base); connecting to external SaaS services (Slack, GitHub, Salesforce); centralized management and updates (change once, all users immediately get new version); authentication and authorization (remote Server integrates OAuth and SSO more easily).

Enterprise deployment principle: local Server for personal tools and local resources; remote Server for team-shared tools and centrally-managed services. Many enterprise MCP architectures are "hybrid" — internal system connections as remote Server, personal workflow tools remaining local Server.

04 · What should you do?

What are common mistakes and best practices when deploying MCP Servers in production?

Most common mistake 1: Tool description too vague

Most common, highest-impact issue. "Search for information" or "query database" doesn't tell Claude when to use this tool or how it differs from others. Good descriptions specify: applicable scenarios, exclusion scenarios, and parameter formats.

Most common mistake 2: Returning too much data

Tools returning thousands of characters of raw data make it hard for Claude to identify key information. Best practice: do server-side preprocessing, return only the key fields and summaries Claude actually needs, not entire database records or full document text.

Most common mistake 3: No error handling design

When tool execution fails (network timeout, data not found, API rate limiting), return a structured error message (containing error type, reason, suggested next step), not an unhandled Python exception. Claude can give users more meaningful responses with structured error messages.

Best practices: test your Server with MCP Inspector (Anthropic official tool) before connecting to Claude Desktop; put input validation on the server side (using Pydantic or TypeScript's Zod); for complex multi-step tasks, split into multiple Tools letting Claude execute and verify step-by-step.

Real-World Example +

A media company building an internal MCP Server for editorial teams, giving Claude access to article database, image library, and publishing system. This implementation illustrates Tool design for real enterprise scenarios:

Wrong design (too vague description):

Tool: search_content
Description: Search content.
Parameters: query (string)

Claude receives "find an appropriate image for this tech article" and doesn't know to use search_content (description doesn't say it can search images), may just say "I don't have a search tool."

Correct design (precise descriptions for each tool):

Tool: search_articles
Description: Search the article database for published articles.
Use when: finding past articles on a topic, checking for duplicate coverage, finding citable related reporting.
Don't use for: searching images (use search_images), searching drafts (use search_drafts).

Tool: search_images
Description: Search the image library.
Use when: finding images for articles, finding images of specific events or people.
Returns: image ID, title, copyright info, thumbnail URL.

This design lets Claude correctly identify calling search_images vs search_articles for image requests, improving call accuracy from 40% to 95%.

Diagram
MCP Server 架構:三種原語和呼叫流程架構圖展示 MCP Server 的三種原語(Resources、Tools、Prompts)及其對應功能,以及 MCP Client 到 MCP Server 的完整呼叫流程:Claude 收到請求 → 判斷需要哪個工具 → 發出工具呼叫 → MCP Server 執行並返回結果 → Claude 整合結果生成回答。MCP Server — Three Primitives and Call FlowMCP Client(Claude Desktop)Claude receives requestSelect tool to callSend tool call + paramsGenerate final responseMCP Server(Your implementation)ResourcesReadable data: files, DB records,API responses, docsToolsExecutable functions: search,write, query, send, transformPromptsPreset templates: standardworkflows, reusable patternstool_call →← resultClaude Me · claude-me.com
Feel free to share. Please credit the source.
Common Misconceptions +
✕ Misconception 1
× Misconception 1: MCP Servers can only be implemented in Python; other languages aren't supported. MCP protocol is language-agnostic; official Python and TypeScript SDKs exist, plus community implementations in Go, Rust, etc. Language choice depends on your tech stack: Python for data processing and ML-related tools; TypeScript/Node.js for integrating frontend ecosystem tools. Anthropic officially recommends Python (with FastMCP framework) or TypeScript — these have the most complete documentation and community support.
✕ Misconception 2
× Misconception 2: MCP Servers need a public network port to work. Local MCP Servers don't need any network port — they communicate with Claude Desktop via Standard I/O, like a pipe, with no network connection involved. This makes local MCP Server setup very simple (no firewall configuration, no SSL certificates needed) and makes it suitable for sensitive local data (data doesn't leave your computer). Only Remote MCP Servers need network ports, for multi-user sharing or cloud deployment scenarios.
The Missing Link +
Direct Impact

MCP Server development's core trade-off: flexibility vs maintenance cost. Custom-built MCP Servers can be fully tailored to your needs but require development and ongoing maintenance; third-party ready-made MCP Servers are simpler to set up but may not fully match your needs and require trusting third-party security practices. Recommended strategy: for connecting general tools (Google Drive, Slack, GitHub), prefer official or well-known open-source Servers; for connecting business systems (internal databases, custom APIs, services with specific security requirements), self-built Servers ensure full control and security compliance. Another trade-off is Tool granularity: finer-grained tools make Claude's call decisions more precise but increase Server maintenance complexity; too coarse-grained tools reduce call accuracy. One clear responsibility per tool is the best design principle.

Ask a Question
Please enter at least 10 characters
Related Articles
What Are MCP Connectors: A Common Language That Lets Claude Talk to External Services
mcp · Jul 30
Build Your Own MCP Server: Safely Connect Claude to Your Internal Tools (With Permissions and Debugging)
mcp · Jun 15
More Related Topics
Tool Use Mechanism Complete Breakdown: How AI Agents 'Act,' and Why This Design Determines Whether They Can Be Trusted
AI Agent Bible
An AI Agent's LLM doesn't actually execute any tool — it only outputs 'I want to do this' requests; your backend code does the real execution. This design is the foundation of all security: the execution layer is under your control, and security validation is added there. How well tools are designed determines whether an Agent can be trusted.
#automation#claude-code
How to Run Your First Crypto Agent: A Complete Beginner's Guide, and the Mistakes Most People Make
AI Agent Bible
The most common mistake running your first Crypto Agent isn't wrong code — it's giving the Agent too much authorization from the start. Real main wallet, no amount limits, skipping testnet: all three together is a recipe for regret. Read first, test next, real money last.
#automation#claude-code
What an Agent Task Really Costs: A Complete Cost Structure Breakdown, and Why Most People Underestimate It
AI Agent Bible
An auto-rebalancing DeFi Agent can cost $50–300 per month — but most people only count LLM API fees, forgetting tool call costs, Gas fees, and the fact that Gas can be 100x normal during network congestion. The Agent's gains must cover all three cost layers. Otherwise it's just a more expensive way to automate losses.
#automation#claude-code
What Is an On-Chain Agent? It Differs from Every AI Tool You've Used in One Key Way
AI Agent Bible
An on-chain Agent differs from every AI tool you've used in one thing: it can self-sign on-chain transactions and operate crypto protocols without your step-by-step confirmation. Your assets can be moved while you sleep — which is exactly why it's both powerful and dangerous.
#automation#claude-code