惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

I
InfoQ
博客园_首页
美团技术团队
M
MIT News - Artificial intelligence
人人都是产品经理
人人都是产品经理
Blog — PlanetScale
Blog — PlanetScale
H
Help Net Security
J
Java Code Geeks
T
Tailwind CSS Blog
Jina AI
Jina AI
量子位
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
G
Google Developers Blog
爱范儿
爱范儿
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
宝玉的分享
宝玉的分享
小众软件
小众软件
MongoDB | Blog
MongoDB | Blog
博客园 - 三生石上(FineUI控件)
L
LangChain Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
V
Visual Studio Blog
博客园 - Franky
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant
What Is an MCP Server (And What Actually Happens Behind t...
Saras Growth Space · 2026-05-04 · via DEV Community

Saras Growth Space

So far, we’ve covered:

  • why MCP exists
  • what MCP is
  • what tools are

Now let’s answer a key question:

When the model decides to use a tool… who actually runs it?


🧠 Simple Definition

An MCP server is:

The component that exposes tools and executes them.


⚠️ Important Clarification

An MCP server is not just your backend.

It is:

  • a layer on top of your backend
  • designed specifically for LLM interaction

🧩 What the MCP Server Does

It has three main responsibilities:


1. Expose Tools

It tells the system:

  • what tools exist
  • what they do
  • what inputs they need

This is what the model “sees”.


2. Validate Inputs

Before running anything, it checks:

  • are required fields present?
  • are types correct?

This prevents bad or unsafe execution.


3. Execute Logic

This is where real work happens:

  • database queries
  • API calls
  • business logic

🔄 What Happens During Execution

Let’s walk through a simple flow.

User asks:

“Show my last 3 orders”


Step 1 — Model decides

It generates:

{
  "tool": "get_user_orders",
  "arguments": {
    "user_id": "123",
    "limit": 3
  }
}


Step 2 — Request reaches the server

The MCP server receives this request.


Step 3 — Validation

It checks:

  • is user_id present?
  • is limit a number?

Step 4 — Execution

It runs something like:

SELECT * FROM orders WHERE user_id = 123 LIMIT 3


Step 5 — Response

It sends structured data back.


Step 6 — Model formats response

The model turns it into:

“Here are your last 3 orders…”


🧠 Key Insight

The model never:

  • touches your database
  • calls APIs directly
  • runs any code

👉 The MCP server does all of that.


🔥 Why This Layer Matters

This separation gives you:

  • better security
  • cleaner architecture
  • controlled execution
  • reusable systems

🧭 Mental Model

Think of it like a restaurant:

  • Model → decides what to order
  • MCP server → kitchen that prepares it
  • Tools → items on the menu

The model doesn’t cook.
The server does.


⚠️ Common Mistakes


Treating MCP server like a normal backend

It needs to be LLM-friendly, not just functional.


Exposing raw APIs directly

LLMs need:

  • clear names
  • structured inputs
  • simple actions

Skipping validation

This can lead to:

  • crashes
  • incorrect actions
  • security issues

🧠 What the MCP Server Does NOT Do

It does NOT:

  • decide which tool to use
  • understand user intent
  • generate responses

👉 That’s the model’s job.


🧭 Why This Is Important

This separation is the foundation of MCP:

  • model decides
  • server executes

🧭 What’s Next

Now that we understand the execution layer,
there’s one missing piece:

Who connects the model and the server?

That’s the MCP client — the component that makes everything work together.