MCP 서버란 무엇인가 (그리고 실제로 무슨 일이 일어나는가)
Source: Dev.to
Overview
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?
What an MCP Server Is
- The component that exposes tools and executes them.
- Not just your backend – it sits on top of your backend and is designed specifically for LLM interaction.
Responsibilities of the MCP Server
-
Describe available tools to the model
- What tools exist
- What they do
- What inputs they need
This is the information the model “sees”.
-
Validate requests before execution
- Are required fields present?
- Are types correct?
Validation prevents bad or unsafe execution.
-
Perform the real work
- Database queries
- API calls
- Business logic
Simple Flow Example
User request
Show my last 3 orders
Model output (structured)
{
"tool": "get_user_orders",
"arguments": {
"user_id": "123",
"limit": 3
}
}
MCP server processing
- Checks that
user_idis present andlimitis a number. - Executes something like:
SELECT * FROM orders WHERE user_id = 123 LIMIT 3;
- Sends the structured data back to the model.
Model final response
Here are your last 3 orders…
What the Model Never Does
- Touches your database
- Calls APIs directly
- Runs any code
The MCP server handles all of that.
Benefits of This Separation
- Better security – the model never accesses resources directly.
- Cleaner architecture – clear division between decision‑making and execution.
- Controlled execution – validation and sandboxing happen in the server.
- Reusable systems – tools can be shared across models.
Analogy: Restaurant
- Model → decides what to order.
- MCP server → kitchen that prepares it.
- Tools → items on the menu.
The model doesn’t cook; it only selects.
LLM‑Friendly Tool Design
LLMs need:
- Clear, descriptive names
- Structured inputs (e.g., JSON)
- Simple actions
Poorly designed tools can lead to crashes, incorrect actions, or security issues.
What the Model Does Not Do
- Decide which tool to use (the model selects, but the server executes).
- Understand user intent beyond tool selection.
- Generate the final response (the model does this after receiving tool results).
Foundation of MCP
- Model decides which tool to use.
- Server executes the tool.
Now that we understand the execution layer, who connects the model and the server?
That’s the MCP client – the component that makes everything work together.