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
Eight Principles Straight From Anthropic: If Claude Keeps Getting Worse, the Problem Is Probably How You're Using It  ·  Claude Code Can Now 'Loop' Through Work on Its Own: Anthropic Releases Four Loop Mode Guide That Lets AI Run Entire Processes  ·  Claude Cowork Honest Review: Three Months Later — What Actually Saved Time, What Made Me Regret Automating It  ·  Two Major Stories to Open July: Claude Sonnet 5 Launches, Fable 5 Export Controls Lifted and Globally Restored  ·  What Is RAG: Why Claude Can't Read Your Company Intranet — And How to Fix That  ·  Claude Cowork Advanced Workflows: From 'Hand Off One Task' to 'Run an Entire Process' — Three Real-World Templates
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
Build Your Own MCP Server: Safely Connect Claude to Your Internal Tools (With Permissions and Debugging)
mcp · Jun 15
More Related Topics
Content Repurposing Workflow: Using Claude to Turn One Core Piece Into Five Platform-Ready Versions Automatically
Claude Cowork Me
The most time-consuming part of content repurposing isn't the writing — it's switching between different output modes. Claude handles format conversion; you handle insights and creativity. That's the right division.
#automation#claude-code
Prompt Debugging and Iteration: Using a Systematic Method to Find the Root Cause of Prompt Problems and Make Every Modification Count
Claude Cowork Me
When a prompt doesn't work, 'modify and retry' is usually the least efficient approach — because you don't know where the problem is. Systematic diagnosis (insufficient context? vague instructions? unclear format needs? unrealistic expectations?) makes each modification a grounded hypothesis test rather than guesswork.
#claude#prompt
Daily Work Briefing Automation: Let Claude Organize Everything That Matters Today Before You Even Start Working
Claude Cowork Me
Spending 15 minutes every morning organizing 'what to do today' is actually a hidden work cost. Claude scheduling automates this — you open your computer, and today's priorities are already organized, so you can start executing immediately.
#automation#claude-code
Your First Week Using Claude at Work: Five Shifts That Turn 'Impressive Demo' Into Real Time Savings
Claude Cowork Me
The key to Claude genuinely integrating into your work isn't using it more — it's changing five habits: make it your thinking starting point, ask it before writing, set up a Project, learn to request revisions, and add it to your preparation process.
#claude#prompt