Introduction
Introduction to Model Context Protocol (MCP): Why It Matters for Scalable AI Applications
_(Click the image above to view video of this lesson)_
Generative AI applications are a great step forward as they often let the user interact with the app using natural language prompts.
However, as more time and resources are invested in such apps, you want to make sure you can easily integrate functionalities and resources in such a way that it's easy to extend, that your app can cater to more than one model being used, and handle various model intricacies.
In short, building Gen AI apps is easy to begin with, but as they grow and become more complex, you need to start defining an architecture and will likely need to rely on a standard to ensure your apps are built in a consistent way.
This is where MCP comes in to organize things and provide a standard.
---
๐ What Is the Model Context Protocol (MCP)?
The Model Context Protocol (MCP) is an open, standardized interface that allows Large Language Models (LLMs) to interact seamlessly with external tools, APIs, and data sources.
It provides a consistent architecture to enhance AI model functionality beyond their training data, enabling smarter, scalable, and more responsive AI systems.
---
๐ฏ Why Standardization in AI Matters
As generative AI applications become more complex, it's essential to adopt standards that ensure scalability, extensibility, maintainability, and avoiding vendor lock-in. MCP addresses these needs by:
Note: While MCP bills itself as an open standard, there are no plans to standardize MCP through any existing standards bodies such as IEEE, IETF, W3C, ISO, or any other standards body.
---
๐ Learning Objectives
By the end of this article, you'll be able to:
---
๐ก Why the Model Context Protocol (MCP) Is a Game-Changer
๐ MCP Solves Fragmentation in AI Interactions
Before MCP, integrating models with tools required:
โ Benefits of MCP Standardization
---
๐งฑ High-Level MCP Architecture Overview
MCP follows a client-server model, where:
Key Components:
Protocol Architecture:
MCP uses a two-layer architecture:
---
How MCP Servers Work
MCP servers operate in the following way:
1. A request is initiated by an end user or software acting on their behalf.
2. The MCP Client sends the request to an MCP Host, which manages the AI Model runtime.
3. The AI Model receives the user prompt and may request access to external tools or data via one or more tool calls.
4. The MCP Host, not the model directly, communicates with the appropriate MCP Server(s) using the standardized protocol.
- Tool Registry: Maintains a catalog of available tools and their capabilities.
- Authentication: Verifies permissions for tool access.
- Request Handler: Processes incoming tool requests from the model.
- Response Formatter: Structures tool outputs in a format the model can understand.
- The MCP Host routes tool calls to one or more MCP Servers, each exposing specialized functions (e.g., search, calculations, database queries).
- The MCP Servers perform their respective operations and return results to the MCP Host in a consistent format.
- The MCP Host formats and relays these results to the AI Model.
- The AI Model incorporates the tool outputs into a final response.
- The MCP Host sends this response back to the MCP Client, which delivers it to the end user or calling software.
---
title: MCP Architecture and Component Interactions
description: A diagram showing the flows of the components in MCP.
---
graph TD
Client[MCP Client/Application] -->|Sends Request| H[MCP Host]
H -->|Invokes| A[AI Model]
A -->|Tool Call Request| H
H -->|MCP Protocol| T1[MCP Server Tool 01: Web Search]
H -->|MCP Protocol| T2[MCP Server Tool 02: Calculator tool]
H -->|MCP Protocol| T3[MCP Server Tool 03: Database Access tool]
H -->|MCP Protocol| T4[MCP Server Tool 04: File System tool]
H -->|Sends Response| Client
subgraph "MCP Host Components"
H
G[Tool Registry]
I[Authentication]
J[Request Handler]
K[Response Formatter]
end
H <--> G
H <--> I
H <--> J
H <--> K
style A fill:#f9d5e5,stroke:#333,stroke-width:2px
style H fill:#eeeeee,stroke:#333,stroke-width:2px
style Client fill:#d5e8f9,stroke:#333,stroke-width:2px
style G fill:#fffbe6,stroke:#333,stroke-width:1px
style I fill:#fffbe6,stroke:#333,stroke-width:1px
style J fill:#fffbe6,stroke:#333,stroke-width:1px
style K fill:#fffbe6,stroke:#333,stroke-width:1px
style T1 fill:#c2f0c2,stroke:#333,stroke-width:1px
style T2 fill:#c2f0c2,stroke:#333,stroke-width:1px
style T3 fill:#c2f0c2,stroke:#333,stroke-width:1px
style T4 fill:#c2f0c2,stroke:#333,stroke-width:1px
๐จโ๐ป How to Build an MCP Server (With Examples)
MCP servers allow you to extend LLM capabilities by providing data and functionality.
Ready to try it out? Here are language and/or stack specific SDKs with examples of creating simple MCP servers in different languages/stacks:
๐ Real-World Use Cases for MCP
MCP enables a wide range of applications by extending AI capabilities:
๐ง MCP = Universal Standard for AI Interactions
The Model Context Protocol (MCP) acts as a universal standard for AI interactions, much like how USB-C standardized physical connections for devices.
In the world of AI, MCP provides a consistent interface, allowing models (clients) to integrate seamlessly with external tools and data providers (servers).
This eliminates the need for diverse, custom protocols for each API or data source.
Under MCP, an MCP-compatible tool (referred to as an MCP server) follows a unified standard.
These servers can list the tools or actions they offer and execute those actions when requested by an AI agent.
AI agent platforms that support MCP are capable of discovering available tools from the servers and invoking them through this standard protocol.
๐ก Facilitates access to knowledge
Beyond offering tools, MCP also facilitates access to knowledge.
It enables applications to provide context to large language models (LLMs) by linking them to various data sources.
For instance, an MCP server might represent a companyโs document repository, allowing agents to retrieve relevant information on demand.
Another server could handle specific actions like sending emails or updating records.
From the agentโs perspective, these are simply tools it can useโsome tools return data (knowledge context), while others perform actions.
MCP efficiently manages both.
An agent connecting to an MCP server automatically learns the server's available capabilities and accessible data through a standard format.
This standardization enables dynamic tool availability.
For example, adding a new MCP server to an agentโs system makes its functions immediately usable without requiring further customization of the agent's instructions.
This streamlined integration aligns with the flow depicted in the following diagram, where servers provide both tools and knowledge, ensuring seamless collaboration across systems.
๐ Example: Scalable Agent Solution
---
title: Scalable Agent Solution with MCP
description: A diagram illustrating how a user interacts with an LLM that connects to multiple MCP servers, with each server providing both knowledge and tools, creating a scalable AI system architecture
---
graph TD
User -->|Prompt| LLM
LLM -->|Response| User
LLM -->|MCP| ServerA
LLM -->|MCP| ServerB
ServerA -->|Universal connector| ServerB
ServerA --> KnowledgeA
ServerA --> ToolsA
ServerB --> KnowledgeB
ServerB --> ToolsB
subgraph Server A
KnowledgeA[Knowledge]
ToolsA[Tools]
end
subgraph Server B
KnowledgeB[Knowledge]
ToolsB[Tools]
end
The Universal Connector enables MCP servers to communicate and share capabilities with each other, allowing ServerA to delegate tasks to ServerB or access its tools and knowledge.
This federates tools and data across servers, supporting scalable and modular agent architectures.
Because MCP standardizes tool exposure, agents can dynamically discover and route requests between servers without hardcoded integrations.
Tool and knowledge federation: Tools and data can be accessed across servers, enabling more scalable and modular agentic architectures.
๐ Advanced MCP Scenarios with Client-Side LLM Integration
Beyond the basic MCP architecture, there are advanced scenarios where both client and server contain LLMs, enabling more sophisticated interactions.
In the following diagram, Client App could be an IDE with a number of MCP tools available for user by the LLM:
---
title: Advanced MCP Scenarios with Client-Server LLM Integration
description: A sequence diagram showing the detailed interaction flow between user, client application, client LLM, multiple MCP servers, and server LLM, illustrating tool discovery, user interaction, direct tool calling, and feature negotiation phases
---
sequenceDiagram
autonumber
actor User as ๐ค User
participant ClientApp as ๐ฅ๏ธ Client App
participant ClientLLM as ๐ง Client LLM
participant Server1 as ๐ง MCP Server 1
participant Server2 as ๐ MCP Server 2
participant ServerLLM as ๐ค Server LLM
%% Discovery Phase
rect rgb(220, 240, 255)
Note over ClientApp, Server2: TOOL DISCOVERY PHASE
ClientApp->>+Server1: Request available tools/resources
Server1-->>-ClientApp: Return tool list (JSON)
ClientApp->>+Server2: Request available tools/resources
Server2-->>-ClientApp: Return tool list (JSON)
Note right of ClientApp: Store combined tool<br/>catalog locally
end
%% User Interaction
rect rgb(255, 240, 220)
Note over User, ClientLLM: USER INTERACTION PHASE
User->>+ClientApp: Enter natural language prompt
ClientApp->>+ClientLLM: Forward prompt + tool catalog
ClientLLM->>-ClientLLM: Analyze prompt & select tools
end
%% Scenario A: Direct Tool Calling
alt Direct Tool Calling
rect rgb(220, 255, 220)
Note over ClientApp, Server1: SCENARIO A: DIRECT TOOL CALLING
ClientLLM->>+ClientApp: Request tool execution
ClientApp->>+Server1: Execute specific tool
Server1-->>-ClientApp: Return results
ClientApp->>+ClientLLM: Process results
ClientLLM-->>-ClientApp: Generate response
ClientApp-->>-User: Display final answer
end
%% Scenario B: Feature Negotiation (VS Code style)
else Feature Negotiation (VS Code style)
rect rgb(255, 220, 220)
Note over ClientApp, ServerLLM: SCENARIO B: FEATURE NEGOTIATION
ClientLLM->>+ClientApp: Identify needed capabilities
ClientApp->>+Server2: Negotiate features/capabilities
Server2->>+ServerLLM: Request additional context
ServerLLM-->>-Server2: Provide context
Server2-->>-ClientApp: Return available features
ClientApp->>+Server2: Call negotiated tools
Server2-->>-ClientApp: Return results
ClientApp->>+ClientLLM: Process results
ClientLLM-->>-ClientApp: Generate response
ClientApp-->>-User: Display final answer
end
end
๐ Practical Benefits of MCP
Here are the practical benefits of using MCP:
๐ Key Takeaways
The following are key takeaways for using MCP:
๐ง Exercise
Think about an AI application you're interested in building.
Additional Resources
What's next
Next: Chapter 1: Core Concepts
Core Concepts
MCP Core Concepts: Mastering the Model Context Protocol for AI Integration
_(Click the image above to view video of this lesson)_
The Model Context Protocol (MCP) is a powerful, standardized framework that optimizes communication between Large Language Models (LLMs) and external tools, applications, and data sources.
This guide will walk you through the core concepts of MCP. You will learn about its client-server architecture, essential components, communication mechanics, and implementation best practices.
Implementation Guidelines:
Overview
This lesson explores the fundamental architecture and components that make up the Model Context Protocol (MCP) ecosystem. You'll learn about the client-server architecture, key components, and communication mechanisms that power MCP interactions.
Key Learning Objectives
By the end of this lesson, you will:
MCP Architecture: A Deeper Look
The MCP ecosystem is built on a client-server model. This modular structure allows AI applications to interact with tools, databases, APIs, and contextual resources efficiently. Let's break down this architecture into its core components.
At its core, MCP follows a client-server architecture where a host application can connect to multiple servers:
flowchart LR
subgraph "Your Computer"
Host["Host with MCP (Visual Studio, VS Code, IDEs, Tools)"]
S1["MCP Server A"]
S2["MCP Server B"]
S3["MCP Server C"]
Host <-->|"MCP Protocol"| S1
Host <-->|"MCP Protocol"| S2
Host <-->|"MCP Protocol"| S3
S1 <--> D1[("Local\Data Source A")]
S2 <--> D2[("Local\Data Source B")]
end
subgraph "Internet"
S3 <-->|"Web APIs"| D3[("Remote\Services")]
end
The MCP Protocol is an evolving standard using date-based versioning (YYYY-MM-DD format).
The current protocol version is 2025-11-25.
You can see the latest updates to the protocol specification
1. Hosts
In the Model Context Protocol (MCP), Hosts are AI applications that serve as the primary interface through which users interact with the protocol.
Hosts coordinate and manage connections to multiple MCP servers by creating dedicated MCP clients for each server connection.
Examples of Hosts include:
Hosts are applications that coordinate AI model interactions. They:
2. Clients
Clients are essential components that maintain dedicated one-to-one connections between Hosts and MCP servers.
Each MCP client is instantiated by the Host to connect to a specific MCP server, ensuring organized and secure communication channels.
Multiple clients enable Hosts to connect to multiple servers simultaneously.
Clients are connector components within the host application. They:
3. Servers
Servers are programs that provide context, tools, and capabilities to MCP clients.
They can execute locally (same machine as the Host) or remotely (on external platforms), and are responsible for handling client requests and providing structured responses.
Servers expose specific functionality through the standardized Model Context Protocol.
Servers are services that provide context and capabilities. They:
Servers can be developed by anyone to extend model capabilities with specialized functionality, and they support both local and remote deployment scenarios.
4. Server Primitives
Servers in the Model Context Protocol (MCP) provide three core primitives that define the fundamental building blocks for rich interactions between clients, hosts, and language models.
These primitives specify the types of contextual information and actions available through the protocol.
MCP servers can expose any combination of the following three core primitives:
Resources
Resources are data sources that provide contextual information to AI applications. They represent static or dynamic content that can enhance model understanding and decision-making:
Resources are identified by URIs and support discovery through resources/list and retrieval through resources/read methods:
file://documents/project-spec.md
database://production/users/schema
api://weather/current
Prompts
Prompts are reusable templates that help structure interactions with language models. They provide standardized interaction patterns and templated workflows:
Prompts support variable substitution and can be discovered via prompts/list and retrieved with prompts/get:
Generate a {{task_type}} for {{product}} targeting {{audience}} with the following requirements: {{requirements}}
Tools
Tools are executable functions that AI models can invoke to perform specific actions. They represent the "verbs" of the MCP ecosystem, enabling models to interact with external systems:
Tools are defined with JSON Schema for parameter validation and discovered through tools/list and executed via tools/call.
Tools can also include icons as additional metadata for better UI presentation.
Tool Annotations: Tools support behavioral annotations (e.g., readOnlyHint, destructiveHint) that describe whether a tool is read-only or destructive, helping clients make informed decisions about tool execution.
Example tool definition:
server.tool(
"search_products",
{
query: z.string().describe("Search query for products"),
category: z.string().optional().describe("Product category filter"),
max_results: z.number().default(10).describe("Maximum results to return")
},
async (params) => {
// Execute search and return structured results
return await productService.search(params);
}
);
Client Primitives
In the Model Context Protocol (MCP), clients can expose primitives that enable servers to request additional capabilities from the host application.
These client-side primitives allow for richer, more interactive server implementations that can access AI model capabilities and user interactions.
Sampling
Sampling allows servers to request language model completions from the client's AI application. This primitive enables servers to access LLM capabilities without embedding their own model dependencies:
tools and toolChoice parameters to enable the client's model to invoke tools during samplingSampling is initiated through the sampling/complete method, where servers send completion requests to clients.
Roots
Roots provide a standardized way for clients to expose filesystem boundaries to servers, helping servers understand which directories and files they have access to:
file:// URIs to identify accessible directories and filesRoots are discovered through the roots/list method, with clients sending notifications/roots/list_changed when roots change.
Elicitation
Elicitation enables servers to request additional information or confirmation from users through the client interface:
Elicitation requests are made using the elicitation/request method to collect user input through the client's interface.
URL Mode Elicitation: Servers can also request URL-based user interactions, allowing servers to direct users to external web pages for authentication, confirmation, or data entry.
Logging
Logging allows servers to send structured log messages to clients for debugging, monitoring, and operational visibility:
Logging messages are sent to clients to provide transparency into server operations and facilitate debugging.
Information Flow in MCP
The Model Context Protocol (MCP) defines a structured flow of information between hosts, clients, servers, and models.
Understanding this flow helps clarify how user requests are processed and how external tools and data are integrated into model responses.
The host application (such as an IDE or chat interface) establishes a connection to an MCP server, typically via STDIO, WebSocket, or another supported transport.
The client (embedded in the host) and the server exchange information about their supported features, tools, resources, and protocol versions. This ensures both sides understand what capabilities are available for the session.
The user interacts with the host (e.g., enters a prompt or command). The host collects this input and passes it to the client for processing.
- The client may request additional context or resources from the server (such as files, database entries, or knowledge base articles) to enrich the model's understanding.
- If the model determines that a tool is needed (e.g., to fetch data, perform a calculation, or call an API), the client sends a tool invocation request to the server, specifying the tool name and parameters.
The server receives the resource or tool request, executes the necessary operations (such as running a function, querying a database, or retrieving a file), and returns the results to the client in a structured format.
The client integrates the server's responses (resource data, tool outputs, etc.) into the ongoing model interaction. The model uses this information to generate a comprehensive and contextually relevant response.
The host receives the final output from the client and presents it to the user, often including both the model's generated text and any results from tool executions or resource lookups.
This flow enables MCP to support advanced, interactive, and context-aware AI applications by seamlessly connecting models with external tools and data sources.
Protocol Architecture & Layers
MCP consists of two distinct architectural layers that work together to provide a complete communication framework:
Data Layer
The Data Layer implements the core MCP protocol using JSON-RPC 2.0 as its foundation. This layer defines the message structure, semantics, and interaction patterns:
Core Components:
Key Features:
Transport Layer
The Transport Layer manages communication channels, message framing, and authentication between MCP participants:
Supported Transport Mechanisms:
1. STDIO Transport:
- Uses standard input/output streams for direct process communication
- Optimal for local processes on the same machine with no network overhead
- Commonly used for local MCP server implementations
2. Streamable HTTP Transport:
- Uses HTTP POST for client-to-server messages
- Optional Server-Sent Events (SSE) for server-to-client streaming
- Enables remote server communication across networks
- Supports standard HTTP authentication (bearer tokens, API keys, custom headers)
- MCP recommends OAuth for secure token-based authentication
Transport Abstraction:
The transport layer abstracts communication details from the data layer, enabling the same JSON-RPC 2.0 message format across all transport mechanisms. This abstraction allows applications to switch between local and remote servers seamlessly.
Security Considerations
MCP implementations must adhere to several critical security principles to ensure safe, trustworthy, and secure interactions across all protocol operations:
By following these security principles, MCP ensures user trust, privacy, and safety are maintained across all protocol interactions while enabling powerful AI integrations.
Code Examples: Key Components
Below are code examples in several popular programming languages that illustrate how to implement key MCP server components and tools.
.NET Example: Creating a Simple MCP Server with Tools
Here is a practical .NET code example demonstrating how to implement a simple MCP server with custom tools. This example showcases how to define and register tools, handle requests, and connect the server using the Model Context Protocol.
using System;
using System.Threading.Tasks;
using ModelContextProtocol.Server;
using ModelContextProtocol.Server.Transport;
using ModelContextProtocol.Server.Tools;
public class WeatherServer
{
public static async Task Main(string[] args)
{
// Create an MCP server
var server = new McpServer(
name: "Weather MCP Server",
version: "1.0.0"
);
// Register our custom weather tool
server.AddTool<string, WeatherData>("weatherTool",
description: "Gets current weather for a location",
execute: async (location) => {
// Call weather API (simplified)
var weatherData = await GetWeatherDataAsync(location);
return weatherData;
});
// Connect the server using stdio transport
var transport = new StdioServerTransport();
await server.ConnectAsync(transport);
Console.WriteLine("Weather MCP Server started");
// Keep the server running until process is terminated
await Task.Delay(-1);
}
private static async Task<WeatherData> GetWeatherDataAsync(string location)
{
// This would normally call a weather API
// Simplified for demonstration
await Task.Delay(100); // Simulate API call
return new WeatherData {
Temperature = 72.5,
Conditions = "Sunny",
Location = location
};
}
}
public class WeatherData
{
public double Temperature { get; set; }
public string Conditions { get; set; }
public string Location { get; set; }
}
Java Example: MCP Server Components
This example demonstrates the same MCP server and tool registration as the .NET example above, but implemented in Java.
import io.modelcontextprotocol.server.McpServer;
import io.modelcontextprotocol.server.McpToolDefinition;
import io.modelcontextprotocol.server.transport.StdioServerTransport;
import io.modelcontextprotocol.server.tool.ToolExecutionContext;
import io.modelcontextprotocol.server.tool.ToolResponse;
public class WeatherMcpServer {
public static void main(String[] args) throws Exception {
// Create an MCP server
McpServer server = McpServer.builder()
.name("Weather MCP Server")
.version("1.0.0")
.build();
// Register a weather tool
server.registerTool(McpToolDefinition.builder("weatherTool")
.description("Gets current weather for a location")
.parameter("location", String.class)
.execute((ToolExecutionContext ctx) -> {
String location = ctx.getParameter("location", String.class);
// Get weather data (simplified)
WeatherData data = getWeatherData(location);
// Return formatted response
return ToolResponse.content(
String.format("Temperature: %.1fยฐF, Conditions: %s, Location: %s",
data.getTemperature(),
data.getConditions(),
data.getLocation())
);
})
.build());
// Connect the server using stdio transport
try (StdioServerTransport transport = new StdioServerTransport()) {
server.connect(transport);
System.out.println("Weather MCP Server started");
// Keep server running until process is terminated
Thread.currentThread().join();
}
}
private static WeatherData getWeatherData(String location) {
// Implementation would call a weather API
// Simplified for example purposes
return new WeatherData(72.5, "Sunny", location);
}
}
class WeatherData {
private double temperature;
private String conditions;
private String location;
public WeatherData(double temperature, String conditions, String location) {
this.temperature = temperature;
this.conditions = conditions;
this.location = location;
}
public double getTemperature() {
return temperature;
}
public String getConditions() {
return conditions;
}
public String getLocation() {
return location;
}
}
Python Example: Building an MCP Server
This example uses fastmcp, so please ensure you install it first:
pip install fastmcp
Code Sample:
#!/usr/bin/env python3
import asyncio
from fastmcp import FastMCP
from fastmcp.transports.stdio import serve_stdio
# Create a FastMCP server
mcp = FastMCP(
name="Weather MCP Server",
version="1.0.0"
)
@mcp.tool()
def get_weather(location: str) -> dict:
"""Gets current weather for a location."""
return {
"temperature": 72.5,
"conditions": "Sunny",
"location": location
}
# Alternative approach using a class
class WeatherTools:
@mcp.tool()
def forecast(self, location: str, days: int = 1) -> dict:
"""Gets weather forecast for a location for the specified number of days."""
return {
"location": location,
"forecast": [
{"day": i+1, "temperature": 70 + i, "conditions": "Partly Cloudy"}
for i in range(days)
]
}
# Register class tools
weather_tools = WeatherTools()
# Start the server
if __name__ == "__main__":
asyncio.run(serve_stdio(mcp))
JavaScript Example: Creating an MCP Server
This example shows MCP server creation in JavaScript and how to register two weather-related tools.
// Using the official Model Context Protocol SDK
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
import { z } from "zod"; // For parameter validation
// Create an MCP server
const server = new McpServer({
name: "Weather MCP Server",
version: "1.0.0"
});
// Define a weather tool
server.tool(
"weatherTool",
{
location: z.string().describe("The location to get weather for")
},
async ({ location }) => {
// This would normally call a weather API
// Simplified for demonstration
const weatherData = await getWeatherData(location);
return {
content: [
{
type: "text",
text: `Temperature: ${weatherData.temperature}ยฐF, Conditions: ${weatherData.conditions}, Location: ${weatherData.location}`
}
]
};
}
);
// Define a forecast tool
server.tool(
"forecastTool",
{
location: z.string(),
days: z.number().default(3).describe("Number of days for forecast")
},
async ({ location, days }) => {
// This would normally call a weather API
// Simplified for demonstration
const forecast = await getForecastData(location, days);
return {
content: [
{
type: "text",
text: `${days}-day forecast for ${location}: ${JSON.stringify(forecast)}`
}
]
};
}
);
// Helper functions
async function getWeatherData(location) {
// Simulate API call
return {
temperature: 72.5,
conditions: "Sunny",
location: location
};
}
async function getForecastData(location, days) {
// Simulate API call
return Array.from({ length: days }, (_, i) => ({
day: i + 1,
temperature: 70 + Math.floor(Math.random() * 10),
conditions: i % 2 === 0 ? "Sunny" : "Partly Cloudy"
}));
}
// Connect the server using stdio transport
const transport = new StdioServerTransport();
server.connect(transport).catch(console.error);
console.log("Weather MCP Server started");
This JavaScript example demonstrates how to create an MCP server using the Model Context Protocol SDK.
It shows how to register two tools named weatherTool and forecastTool and make them available to MCP clients through the StdioServerTransport.
Security and Authorization
MCP includes several built-in concepts and mechanisms for managing security and authorization throughout the protocol:
1. Tool Permission Control:
Clients can specify which tools a model is allowed to use during a session.
This ensures that only explicitly authorized tools are accessible, reducing the risk of unintended or unsafe operations.
Permissions can be configured dynamically based on user preferences, organizational policies, or the context of the interaction.
2. Authentication:
Servers can require authentication before granting access to tools, resources, or sensitive operations.
This may involve API keys, OAuth tokens, or other authentication schemes.
Proper authentication ensures that only trusted clients and users can invoke server-side capabilities.
3. Validation:
Parameter validation is enforced for all tool invocations.
Each tool defines the expected types, formats, and constraints for its parameters, and the server validates incoming requests accordingly.
This prevents malformed or malicious input from reaching tool implementations and helps maintain the integrity of operations.
4. Rate Limiting:
To prevent abuse and ensure fair usage of server resources, MCP servers can implement rate limiting for tool calls and resource access.
Rate limits can be applied per user, per session, or globally, and help protect against denial-of-service attacks or excessive resource consumption.
By combining these mechanisms, MCP provides a secure foundation for integrating language models with external tools and data sources, while giving users and developers fine-grained control over access and usage.
Protocol Messages & Communication Flow
MCP communication uses structured JSON-RPC 2.0 messages to facilitate clear and reliable interactions between hosts, clients, and servers. The protocol defines specific message patterns for different types of operations:
Core Message Types:
Initialization Messages
initialize Request: Establishes connection and negotiates protocol version and capabilitiesinitialize Response: Confirms supported features and server information notifications/initialized: Signals that initialization is complete and the session is readyDiscovery Messages
tools/list Request: Discovers available tools from the serverresources/list Request: Lists available resources (data sources)prompts/list Request: Retrieves available prompt templatesExecution Messages
tools/call Request: Executes a specific tool with provided parametersresources/read Request: Retrieves content from a specific resourceprompts/get Request: Fetches a prompt template with optional parametersClient-side Messages
sampling/complete Request: Server requests LLM completion from the clientelicitation/request: Server requests user input through the client interfaceNotification Messages
notifications/tools/list_changed: Server notifies client of tool changesnotifications/resources/list_changed: Server notifies client of resource changes notifications/prompts/list_changed: Server notifies client of prompt changesMessage Structure:
All MCP messages follow JSON-RPC 2.0 format with:
id, method, and optional paramsid and either result or error method and optional params (no id or response expected)This structured communication ensures reliable, traceable, and extensible interactions supporting advanced scenarios like real-time updates, tool chaining, and robust error handling.
Tasks (Experimental)
Tasks are an experimental feature that provides durable execution wrappers enabling deferred result retrieval and status tracking for MCP requests:
Tasks wrap standard MCP requests to enable asynchronous execution patterns for operations that cannot complete immediately.
Key Takeaways
Exercise
Design a simple MCP tool that would be useful in your domain. Define:
1. What the tool would be named
2. What parameters it would accept
3. What output it would return
4. How a model might use this tool to solve user problems
---
What's next
Next: Chapter 2: Security
Security
MCP Security: Comprehensive Protection for AI Systems
_(Click the image above to view video of this lesson)_
Security is fundamental to AI system design, which is why we prioritize it as our second section.
This aligns with Microsoft's Secure by Design principle from the Secure Future Initiative.
The Model Context Protocol (MCP) brings powerful new capabilities to AI-driven applications while introducing unique security challenges that extend beyond traditional software risks.
MCP systems face both established security concerns (secure coding, least privilege, supply chain security) and new AI-specific threats including prompt injection, tool poisoning, session hijacking, confused deputy attacks, token passthrough vulnerabilities, and dynamic capability modification.
This lesson explores the most critical security risks in MCP implementationsโcovering authentication, authorization, excessive permissions, indirect prompt injection, session security, confused deputy problems, token management, and supply chain vulnerabilities.
You'll learn actionable controls and best practices to mitigate these risks while leveraging Microsoft solutions like Prompt Shields, Azure Content Safety, and GitHub Advanced Security to strengthen your MCP deployment.
Learning Objectives
By the end of this lesson, you will be able to:
MCP Security Architecture & Controls
Modern MCP implementations require layered security approaches that address both traditional software security and AI-specific threats.
The rapidly evolving MCP specification continues to mature its security controls, enabling better integration with enterprise security architectures and established best practices.
Research from the Microsoft Digital Defense Report demonstrates that 98% of reported breaches would be prevented by robust security hygiene.
The most effective protection strategy combines foundational security practices with MCP-specific controlsโproven baseline security measures remain the most impactful in reducing overall security risk.
Current Security Landscape
> Note: This information reflects MCP security standards as of February 5, 2026, aligned with MCP Specification 2025-11-25.
The MCP protocol continues evolving rapidly, and future implementations may introduce new authentication patterns and enhanced controls.
Always refer to the current MCP Specification, MCP GitHub repository, and security best practices documentation for the latest guidance.
๐๏ธ MCP Security Summit Workshop (Sherpa)
For hands-on security training, we highly recommend the MCP Security Summit Workshop (Sherpa) - a comprehensive guided expedition to securing MCP servers in Microsoft Azure.
Workshop Overview
The MCP Security Summit Workshop provides practical, actionable security training through a proven "vulnerable โ exploit โ fix โ validate" methodology. You'll:
The Expedition Route
Get Started: https://azure-samples.github.io/sherpa/
OWASP MCP Top 10 Security Risks
The OWASP MCP Azure Security Guide details the ten most critical security risks for MCP implementations:
Evolution of MCP Authentication
The MCP specification has evolved significantly in its approach to authentication and authorization:
Authentication & Authorization Security
Current Security Challenges
Modern MCP implementations face several authentication and authorization challenges:
Risks & Threat Vectors
Token Passthrough: A Critical Anti-Pattern
Token passthrough is explicitly prohibited in the current MCP authorization specification due to severe security implications:
##### Security Control Circumvention
##### Accountability & Audit Challenges
##### Data Exfiltration Risks
##### Multi-Service Attack Vectors
Security Controls & Mitigations
Critical Security Requirements:
> MANDATORY: MCP servers MUST NOT accept any tokens that were not explicitly issued for the MCP server
Authentication & Authorization Controls
- Implementation Guide: Azure API Management as Authentication Gateway for MCP Servers
- Identity Integration: Using Microsoft Entra ID for MCP Server Authentication
- Validate token audience claims match MCP server identity
- Implement proper token rotation and expiration policies
- Prevent token replay attacks and unauthorized usage
- Best Practices: Secure Token Storage and Encryption Guidelines
Access Control Implementation
- Regular permission reviews and updates to prevent privilege creep
- Microsoft Documentation: Secure Least-Privileged Access
- Scope roles tightly to specific resources and actions
- Avoid broad or unnecessary permissions that expand attack surfaces
- Monitor permission usage patterns for anomalies
- Promptly remediate excessive or unused privileges
AI-Specific Security Threats
Prompt Injection & Tool Manipulation Attacks
Modern MCP implementations face sophisticated AI-specific attack vectors that traditional security measures cannot fully address:
Indirect Prompt Injection (Cross-Domain Prompt Injection)
Indirect Prompt Injection represents one of the most critical vulnerabilities in MCP-enabled AI systems.
Attackers embed malicious instructions within external contentโdocuments, web pages, emails, or data sourcesโthat AI systems subsequently process as legitimate commands.
Attack Scenarios:
Real-World Impact: These attacks can result in data exfiltration, privacy breaches, generation of harmful content, and manipulation of user interactions.
For detailed analysis, see Prompt Injection in MCP (Simon Willison).
Tool Poisoning Attacks
Tool Poisoning targets the metadata that defines MCP tools, exploiting how LLMs interpret tool descriptions and parameters to make execution decisions.
Attack Mechanisms:
Hosted Server Risks: Remote MCP servers present elevated risks as tool definitions can be updated after initial user approval, creating scenarios where previously safe tools become malicious.
For comprehensive analysis, see Tool Poisoning Attacks (Invariant Labs).
Additional AI Attack Vectors
AI Security Risk Impact
High-Impact Consequences:
Microsoft AI Security Solutions
AI Prompt Shields: Advanced Protection Against Injection Attacks
Microsoft AI Prompt Shields provide comprehensive defense against both direct and indirect prompt injection attacks through multiple security layers:
##### Core Protection Mechanisms:
1. Advanced Detection & Filtering
- Machine learning algorithms and NLP techniques detect malicious instructions in external content
- Real-time analysis of documents, web pages, emails, and data sources for embedded threats
- Contextual understanding of legitimate vs. malicious prompt patterns
2. Spotlighting Techniques
- Distinguishes between trusted system instructions and potentially compromised external inputs
- Text transformation methods that enhance model relevance while isolating malicious content
- Helps AI systems maintain proper instruction hierarchy and ignore injected commands
3. Delimiter & Datamarking Systems
- Explicit boundary definition between trusted system messages and external input text
- Special markers highlight boundaries between trusted and untrusted data sources
- Clear separation prevents instruction confusion and unauthorized command execution
4. Continuous Threat Intelligence
- Microsoft continuously monitors emerging attack patterns and updates defenses
- Proactive threat hunting for new injection techniques and attack vectors
- Regular security model updates to maintain effectiveness against evolving threats
5. Azure Content Safety Integration
- Part of comprehensive Azure AI Content Safety suite
- Additional detection for jailbreak attempts, harmful content, and security policy violations
- Unified security controls across AI application components
Implementation Resources: Microsoft Prompt Shields Documentation
Advanced MCP Security Threats
Session Hijacking Vulnerabilities
Session hijacking represents a critical attack vector in stateful MCP implementations where unauthorized parties obtain and abuse legitimate session identifiers to impersonate clients and perform unauthorized actions.
Attack Scenarios & Risks
Security Controls for Session Management
Critical Requirements:
: to prevent cross-user session abuseConfused Deputy Problem
The confused deputy problem occurs when MCP servers act as authentication proxies between clients and third-party services, creating opportunities for authorization bypass through static client ID exploitation.
Attack Mechanics & Risks
Mitigation Strategies
Mandatory Controls:
Token Passthrough Vulnerabilities
Token passthrough represents an explicit anti-pattern where MCP servers accept client tokens without proper validation and forward them to downstream APIs, violating MCP authorization specifications.
Security Implications
Required Security Controls
Non-negotiable Requirements:
Supply Chain Security for AI Systems
Supply chain security has evolved beyond traditional software dependencies to encompass the entire AI ecosystem.
Modern MCP implementations must rigorously verify and monitor all AI-related components, as each introduces potential vulnerabilities that could compromise system integrity.
Expanded AI Supply Chain Components
Traditional Software Dependencies:
AI-Specific Supply Chain Elements:
Comprehensive Supply Chain Security Strategy
Component Verification & Trust
Secure Deployment Pipelines
Continuous Monitoring & Response
Access Control & Least Privilege
Incident Response & Recovery
Microsoft Security Tools & Integration
GitHub Advanced Security provides comprehensive supply chain protection including:
Azure DevOps & Azure Repos Integration:
Microsoft Internal Practices:
Microsoft implements extensive supply chain security practices across all products.
Learn about proven approaches in The Journey to Secure the Software Supply Chain at Microsoft.
Foundation Security Best Practices
MCP implementations inherit and build upon your organization's existing security posture. Strengthening foundational security practices significantly enhances the overall security of AI systems and MCP deployments.
Core Security Fundamentals
Secure Development Practices
Infrastructure Hardening
Security Monitoring & Detection
Zero Trust Architecture
Enterprise Integration Patterns
Microsoft Security Ecosystem Integration
Compliance & Governance
These foundational practices create a robust security baseline that enhances the effectiveness of MCP-specific security controls and provides comprehensive protection for AI-driven applications.
Key Security Takeaways
Comprehensive Resources
Official MCP Security Documentation
OWASP MCP Security Resources
Security Standards & Best Practices
AI Security Research & Analysis
Microsoft Security Solutions
Implementation Guides & Tutorials
DevOps & Supply Chain Security
Additional Security Documentation
For comprehensive security guidance, refer to these specialized documents in this section:
Hands-On Security Training
---
What's Next
Module 00 — ์๊ฐ
Model Context Protocol(MCP) ์๊ฐ: ํ์ฅ ๊ฐ๋ฅํ AI ์ ํ๋ฆฌ์ผ์ด์ ์์ ์ค์ํ ์ด์
_(์ ์ด๋ฏธ์ง๋ฅผ ํด๋ฆญํ๋ฉด ์ด ๊ฐ์์ ์์์ ๋ณผ ์ ์์ต๋๋ค)_
์์ฑํ AI ์ ํ๋ฆฌ์ผ์ด์ ์ ์ข ์ข ์ฌ์ฉ์๊ฐ ์์ฐ์ด ํ๋กฌํํธ๋ก ์ฑ๊ณผ ์ํธ์์ฉํ ์ ์๊ฒ ํด์ฃผ๊ธฐ ๋๋ฌธ์ ํฐ ์ง์ ์ ๋๋ค.
๊ทธ๋ฌ๋ ์ด๋ฌํ ์ฑ์ ๋ ๋ง์ ์๊ฐ๊ณผ ์์์ ํฌ์ํ ์๋ก ๊ธฐ๋ฅ๊ณผ ๋ฆฌ์์ค๋ฅผ ์ฝ๊ฒ ํตํฉํ์ฌ ํ์ฅํ๊ธฐ ์ฝ๊ณ , ์ฌ๋ฌ ๋ชจ๋ธ์ ์ง์ํ ์ ์์ผ๋ฉฐ, ๋ค์ํ ๋ชจ๋ธ์ ๋ณต์ก์ฑ์ ๋ค๋ฃฐ ์ ์๋๋ก ํด์ผ ํฉ๋๋ค.
์์ปจ๋, ์์ฑํ AI ์ฑ์ ์์์ ์ฝ์ง๋ง ์ฑ์ฅํ๊ณ ๋ณต์กํด์ง์๋ก ์ํคํ ์ฒ๋ฅผ ์ ์ํ๊ธฐ ์์ํด์ผ ํ๋ฉฐ, ์ผ๊ด๋ ๋ฐฉ์์ผ๋ก ์ฑ์ ๊ตฌ์ถํ๊ธฐ ์ํด ํ์ค์ ์์กดํด์ผ ํ ๊ฐ๋ฅ์ฑ์ด ๋์ต๋๋ค.
์ฌ๊ธฐ์ MCP๊ฐ ๋ฑ์ฅํ์ฌ ์ฒด๊ณ์ ์ผ๋ก ์ ๋ฆฌํ๊ณ ํ์ค์ ์ ๊ณตํฉ๋๋ค.
---
๐ Model Context Protocol(MCP)๋?
Model Context Protocol(MCP)๋ ๋๊ท๋ชจ ์ธ์ด ๋ชจ๋ธ(LLM)์ด ์ธ๋ถ ๋๊ตฌ, API ๋ฐ ๋ฐ์ดํฐ ์์ค์ ์ํํ๊ฒ ์ํธ์์ฉํ ์ ์๋๋ก ํ๋ ๊ฐ๋ฐฉํ, ํ์คํ๋ ์ธํฐํ์ด์ค์ ๋๋ค. ๋ชจ๋ธ์ ํ์ต ๋ฐ์ดํฐ๋ฅผ ๋์ด AI ๋ชจ๋ธ ๊ธฐ๋ฅ์ ํฅ์์ํค๋ ์ผ๊ด๋ ์ํคํ ์ฒ๋ฅผ ์ ๊ณตํ์ฌ ๋ ์ค๋งํธํ๊ณ ํ์ฅ ๊ฐ๋ฅํ๋ฉฐ ๋ฐ์์ฑ ๋์ AI ์์คํ ์ ๊ฐ๋ฅํ๊ฒ ํฉ๋๋ค.
---
๐ฏ AI์์ ํ์คํ๊ฐ ์ค์ํ ์ด์
์์ฑํ AI ์ ํ๋ฆฌ์ผ์ด์ ์ด ์ ์ ๋ณต์กํด์ง์ ๋ฐ๋ผ ํ์ฅ์ฑ, ํ์ฅ ๊ฐ๋ฅ์ฑ, ์ ์ง๋ณด์ ์ฉ์ด์ฑ, ๊ณต๊ธ์ ์ฒด ์ข ์ ํํผ๋ฅผ ๋ณด์ฅํ๋ ํ์ค ์ฑํ์ด ํ์์ ์ ๋๋ค. MCP๋ ๋ค์๊ณผ ๊ฐ์ ์๊ตฌ๋ฅผ ์ถฉ์กฑํฉ๋๋ค:
์ฐธ๊ณ : MCP๋ ๊ฐ๋ฐฉํ ํ์ค์ผ๋ก ์๊ฐ๋์ง๋ง IEEE, IETF, W3C, ISO ๋๋ ๊ธฐํ ๊ธฐ์กด ํ์คํ ๊ธฐ๊ด์ ํตํ ํ์คํ ๊ณํ์ ์์ต๋๋ค.
---
๐ ํ์ต ๋ชฉํ
์ด ๊ธ์ ๋ง์น๋ฉด ๋ค์์ ํ ์ ์์ต๋๋ค:
---
๐ก Model Context Protocol(MCP)์ด ๊ฒ์์ฒด์ธ์ ์ธ ์ด์
๐ MCP๋ AI ์ํธ์์ฉ์ ๋จํธํ๋ฅผ ํด๊ฒฐํฉ๋๋ค
MCP ์ด์ ์๋ ๋ชจ๋ธ๊ณผ ๋๊ตฌ๋ฅผ ํตํฉํ๋ ค๋ฉด ๋ค์์ด ํ์ํ์ต๋๋ค:
โ MCP ํ์คํ์ ์ด์
---
๐งฑ MCP ์ํคํ ์ฒ ๊ฐ์
MCP๋ ํด๋ผ์ด์ธํธ-์๋ฒ ๋ชจ๋ธ์ ๋ฐ๋ฅด๋ฉฐ:
ํต์ฌ ๊ตฌ์ฑ ์์:
ํ๋กํ ์ฝ ์ํคํ ์ฒ:
MCP๋ 2๊ณ์ธต ์ํคํ ์ฒ ์ฌ์ฉ:
---
MCP ์๋ฒ ๋์ ๋ฐฉ์
MCP ์๋ฒ๋ ๋ค์๊ณผ ๊ฐ์ด ๋์ํฉ๋๋ค:
1. ์์ฒญ์ ์ต์ข ์ฌ์ฉ์ ๋๋ ์ฌ์ฉ์๋ฅผ ๋์ ํ๋ ์ํํธ์จ์ด์ ์ํด ์์๋ฉ๋๋ค.
2. MCP ํด๋ผ์ด์ธํธ๊ฐ AI ๋ชจ๋ธ ๋ฐํ์์ ๊ด๋ฆฌํ๋ MCP ํธ์คํธ์ ์์ฒญ์ ๋ณด๋ ๋๋ค.
3. AI ๋ชจ๋ธ์ ์ฌ์ฉ์ ํ๋กฌํํธ๋ฅผ ์์ ํ๊ณ , ํ๋ ์ด์์ ๋๊ตฌ ํธ์ถ์ ํตํด ์ธ๋ถ ๋๊ตฌ ๋๋ ๋ฐ์ดํฐ ์ ๊ทผ์ ์์ฒญํ ์ ์์ต๋๋ค.
4. MCP ํธ์คํธ๊ฐ ๋ชจ๋ธ์ ์ง์ ๊ฑฐ์น์ง ์๊ณ ํ์คํ๋ ํ๋กํ ์ฝ์ ์ฌ์ฉํด ์ ์ ํ MCP ์๋ฒ์ ํต์ ํฉ๋๋ค.
- ๋๊ตฌ ๋ ์ง์คํธ๋ฆฌ: ์ฌ์ฉ ๊ฐ๋ฅํ ๋๊ตฌ์ ๊ธฐ๋ฅ ์นดํ๋ก๊ทธ ์ ์ง
- ์ธ์ฆ: ๋๊ตฌ ์ ๊ทผ ๊ถํ ๊ฒ์ฆ
- ์์ฒญ ์ฒ๋ฆฌ๊ธฐ: ๋ชจ๋ธ๋ก๋ถํฐ ๋ค์ด์ค๋ ๋๊ตฌ ์์ฒญ ์ฒ๋ฆฌ
- ์๋ต ํฌ๋งทํฐ: ๋ชจ๋ธ์ด ์ดํดํ ์ ์๋ ํ์์ผ๋ก ๋๊ตฌ ์ถ๋ ฅ ๊ตฌ์กฐํ
- MCP ํธ์คํธ๊ฐ ํ๋ ์ด์์ MCP ์๋ฒ๋ก ๋๊ตฌ ํธ์ถ์ ๋ผ์ฐํ ํ๋ฉฐ, ๊ฐ ์๋ฒ๋ ๊ฒ์, ๊ณ์ฐ, ๋ฐ์ดํฐ๋ฒ ์ด์ค ์ฟผ๋ฆฌ ๋ฑ ์ ๋ฌธ ๊ธฐ๋ฅ์ ๋ ธ์ถ
- MCP ์๋ฒ๋ ์์ฒด ์ฐ์ฐ์ ์ํํ๊ณ ๊ฒฐ๊ณผ๋ฅผ ์ผ๊ด๋ ํ์์ผ๋ก MCP ํธ์คํธ์ ๋ฐํ
- MCP ํธ์คํธ๋ ์ด ๊ฒฐ๊ณผ๋ฅผ ํฌ๋งทํ์ฌ AI ๋ชจ๋ธ์ ์ ๋ฌ
- AI ๋ชจ๋ธ์ด ๋๊ตฌ ์ถ๋ ฅ์ ์ข ํฉํด ์ต์ข ์๋ต ์์ฑ
- MCP ํธ์คํธ๋ ์ด ์๋ต์ MCP ํด๋ผ์ด์ธํธ์ ๋ณด๋ด๊ณ , ํด๋ผ์ด์ธํธ๊ฐ ์ต์ข ์ฌ์ฉ์ ๋๋ ํธ์ถ ์ํํธ์จ์ด์ ์ ๋ฌ
---
title: MCP ์ํคํ
์ฒ์ ๊ตฌ์ฑ ์์ ์ํธ์์ฉ
description: MCP ๊ตฌ์ฑ ์์๋ค์ ํ๋ฆ์ ๋ณด์ฌ์ฃผ๋ ๋ค์ด์ด๊ทธ๋จ์
๋๋ค.
---
graph TD
Client[MCP ํด๋ผ์ด์ธํธ/์ ํ๋ฆฌ์ผ์ด์
] -->|์์ฒญ ์ ์ก| H[MCP ํธ์คํธ]
H -->|ํธ์ถ| A[AI ๋ชจ๋ธ]
A -->|๋๊ตฌ ํธ์ถ ์์ฒญ| H
H -->|MCP ํ๋กํ ์ฝ| T1[MCP ์๋ฒ ๋๊ตฌ 01: ์น ๊ฒ์]
H -->|MCP ํ๋กํ ์ฝ| T2[MCP ์๋ฒ ๋๊ตฌ 02: ๊ณ์ฐ๊ธฐ ๋๊ตฌ]
H -->|MCP ํ๋กํ ์ฝ| T3[MCP ์๋ฒ ๋๊ตฌ 03: ๋ฐ์ดํฐ๋ฒ ์ด์ค ์ ๊ทผ ๋๊ตฌ]
H -->|MCP ํ๋กํ ์ฝ| T4[MCP ์๋ฒ ๋๊ตฌ 04: ํ์ผ ์์คํ
๋๊ตฌ]
H -->|์๋ต ์ ์ก| Client
subgraph "MCP ํธ์คํธ ๊ตฌ์ฑ ์์"
H
G[๋๊ตฌ ๋ ์ง์คํธ๋ฆฌ]
I[์ธ์ฆ]
J[์์ฒญ ์ฒ๋ฆฌ๊ธฐ]
K[์๋ต ํฌ๋งคํฐ]
end
H <--> G
H <--> I
H <--> J
H <--> K
style A fill:#f9d5e5,stroke:#333,stroke-width:2px
style H fill:#eeeeee,stroke:#333,stroke-width:2px
style Client fill:#d5e8f9,stroke:#333,stroke-width:2px
style G fill:#fffbe6,stroke:#333,stroke-width:1px
style I fill:#fffbe6,stroke:#333,stroke-width:1px
style J fill:#fffbe6,stroke:#333,stroke-width:1px
style K fill:#fffbe6,stroke:#333,stroke-width:1px
style T1 fill:#c2f0c2,stroke:#333,stroke-width:1px
style T2 fill:#c2f0c2,stroke:#333,stroke-width:1px
style T3 fill:#c2f0c2,stroke:#333,stroke-width:1px
style T4 fill:#c2f0c2,stroke:#333,stroke-width:1px
๐จโ๐ป MCP ์๋ฒ ๊ตฌ์ถ ๋ฐฉ๋ฒ (์์ ํฌํจ)
MCP ์๋ฒ๋ ๋ฐ์ดํฐ๋ฅผ ์ ๊ณตํ๊ณ ๊ธฐ๋ฅ์ ํ์ฅํ์ฌ LLM์ ๊ธฐ๋ฅ์ ํ์ฅํ ์ ์๊ฒ ํฉ๋๋ค.
์ง์ ์๋ํด๋ณด๊ณ ์ถ๋์? ์๋๋ ๋ค์ํ ์ธ์ด/์คํ๋ณ SDK์ ๊ฐ๋จํ MCP ์๋ฒ ์์ฑ ์์ ์ ๋๋ค:
๐ MCP์ ์ค์ ํ์ฉ ์ฌ๋ก
MCP๋ AI ๊ธฐ๋ฅ ํ์ฅ์ ํตํด ๋ค์ํ ์์ฉ์ ๊ฐ๋ฅํ๊ฒ ํฉ๋๋ค:
๐ง MCP = AI ์ํธ์์ฉ์ ์ํ ๋ฒ์ฉ ํ์ค
Model Context Protocol(MCP)๋ USB-C๊ฐ ์ฅ์น์ ๋ฌผ๋ฆฌ์ ์ฐ๊ฒฐ์ ํ์คํํ ๊ฒ์ฒ๋ผ AI ์ํธ์์ฉ์ ๋ฒ์ฉ ํ์ค ์ญํ ์ ํฉ๋๋ค. AI ์ธ๊ณ์์ MCP๋ ๋ชจ๋ธ(ํด๋ผ์ด์ธํธ)์ด ์ธ๋ถ ๋๊ตฌ์ ๋ฐ์ดํฐ ์ ๊ณต์(์๋ฒ)์ ์ํํ๊ฒ ํตํฉ๋ ์ ์๋๋ก ์ผ๊ด๋ ์ธํฐํ์ด์ค๋ฅผ ์ ๊ณตํฉ๋๋ค. ์ด๋ ๊ฐ API๋ ๋ฐ์ดํฐ ์์ค๋ง๋ค ๋ค์ํ ๋ง์ถค ํ๋กํ ์ฝ ํ์์ฑ์ ์์ ์ค๋๋ค.
MCP ํธํ ๋๊ตฌ(์ฆ, MCP ์๋ฒ)๋ ํตํฉ๋ ํ์ค์ ๋ฐ๋ฆ ๋๋ค. ์ด๋ฌํ ์๋ฒ๋ค์ ์ ๊ณตํ๋ ๋๊ตฌ๋ ์์ ๋ชฉ๋ก์ ๋์ดํ๊ณ , AI ์์ด์ ํธ์ ์์ฒญ์ ๋ฐ๋ผ ํด๋น ์์ ์ ์ํํฉ๋๋ค. MCP๋ฅผ ์ง์ํ๋ AI ์์ด์ ํธ ํ๋ซํผ์ ์๋ฒ์์ ์ฌ์ฉ ๊ฐ๋ฅํ ๋๊ตฌ๋ฅผ ํ์ํ๊ณ ์ด ํ์ค ํ๋กํ ์ฝ์ ํตํด ํธ์ถํ ์ ์์ต๋๋ค.
๐ก ์ง์ ์ ๊ทผ ์ฉ์ด์ฑ ์ ๊ณต
๋๊ตฌ ์ ๊ณต ์ธ์๋ MCP๋ ์ง์ ์ ๊ทผ์ ์ฉ์ดํ๊ฒ ํฉ๋๋ค.
์ด๋ ์ ํ๋ฆฌ์ผ์ด์ ์ด ๋ํ ์ธ์ด ๋ชจ๋ธ(LLM)์ ์ปจํ ์คํธ๋ฅผ ์ ๊ณตํ๊ธฐ ์ํด ๋ค์ํ ๋ฐ์ดํฐ ์์ค์ ์ฐ๊ฒฐํ๋๋ก ํฉ๋๋ค.
์๋ฅผ ๋ค์ด, MCP ์๋ฒ๋ ํ์ฌ ๋ฌธ์ ์ ์ฅ์๋ฅผ ๋ํ๋ด์ด ์์ด์ ํธ๊ฐ ํ์ ์ ๊ด๋ จ ์ ๋ณด๋ฅผ ๊ฒ์ํ ์ ์๊ฒ ํฉ๋๋ค.
๋ค๋ฅธ ์๋ฒ๋ ์ด๋ฉ์ผ ์ ์ก์ด๋ ๊ธฐ๋ก ์ ๋ฐ์ดํธ ๊ฐ์ ํน์ ์์ ์ ์ฒ๋ฆฌํ ์ ์์ต๋๋ค.
์์ด์ ํธ ๊ด์ ์์ ์ด๋ค์ ๋จ์ํ ์ฌ์ฉํ ์ ์๋ ๋๊ตฌ์ด๋ฉฐ, ์ผ๋ถ ๋๊ตฌ๋ ๋ฐ์ดํฐ(์ง์ ์ปจํ ์คํธ)๋ฅผ ๋ฐํํ๊ณ ๋ค๋ฅธ ๋๊ตฌ๋ ์์ ์ ์ํํฉ๋๋ค.
MCP๋ ์ด ๋์ ํจ์จ์ ์ผ๋ก ๊ด๋ฆฌํฉ๋๋ค.
MCP ์๋ฒ์ ์ฐ๊ฒฐ๋ ์์ด์ ํธ๋ ํ์ค ํ์์ ํตํด ์๋ฒ์ ์ฌ์ฉ ๊ฐ๋ฅํ ๊ธฐ๋ฅ๊ณผ ์ ๊ทผ ๊ฐ๋ฅํ ๋ฐ์ดํฐ๋ฅผ ์๋์ผ๋ก ํ์ตํฉ๋๋ค. ์ด ํ์คํ ๋๋ถ์ ๋๊ตฌ ๊ฐ์ฉ์ฑ์ด ๋์ ์ผ๋ก ๋ณํ ์ ์์ต๋๋ค. ์๋ฅผ ๋ค์ด, ์๋ก์ด MCP ์๋ฒ๋ฅผ ์์ด์ ํธ ์์คํ ์ ์ถ๊ฐํ๋ฉด ์์ด์ ํธ ์ง์๋ฌธ์ ์ถ๊ฐ๋ก ์์ ํ์ง ์์๋ ์ฆ์ ๊ทธ ๊ธฐ๋ฅ์ ์ฌ์ฉํ ์ ์์ต๋๋ค.
์ด ๊ฐ์ํ๋ ํตํฉ์ ๋ค์ ๋ค์ด์ด๊ทธ๋จ์ ๋ฌ์ฌ๋ ํ๋ฆ๊ณผ ์ผ์นํ๋ฉฐ, ์๋ฒ๊ฐ ๋๊ตฌ์ ์ง์์ ๋ชจ๋ ์ ๊ณตํ์ฌ ์์คํ ๊ฐ ์ํํ ํ์ ์ ๋ณด์ฅํฉ๋๋ค.
๐ ์์: ํ์ฅ ๊ฐ๋ฅํ ์์ด์ ํธ ์๋ฃจ์
---
title: MCP๋ฅผ ํตํ ํ์ฅ ๊ฐ๋ฅํ ์์ด์ ํธ ์๋ฃจ์
description: ์ฌ์ฉ์๊ฐ ์ฌ๋ฌ MCP ์๋ฒ์ ์ฐ๊ฒฐ๋ LLM๊ณผ ์ํธ์์ฉํ๋ ๋ฐฉ์์ ๋ณด์ฌ์ฃผ๋ ๋ค์ด์ด๊ทธ๋จ์ผ๋ก, ๊ฐ ์๋ฒ๋ ์ง์๊ณผ ๋๊ตฌ๋ฅผ ์ ๊ณตํ์ฌ ํ์ฅ ๊ฐ๋ฅํ AI ์์คํ
์ํคํ
์ฒ๋ฅผ ๋ง๋ญ๋๋ค
---
graph TD
User -->|ํ๋กฌํํธ| LLM
LLM -->|์๋ต| User
LLM -->|MCP| ServerA
LLM -->|MCP| ServerB
ServerA -->|๋ฒ์ฉ ์ปค๋ฅํฐ| ServerB
ServerA --> KnowledgeA
ServerA --> ToolsA
ServerB --> KnowledgeB
ServerB --> ToolsB
subgraph Server A
KnowledgeA[์ง์]
ToolsA[๋๊ตฌ]
end
subgraph Server B
KnowledgeB[์ง์]
ToolsB[๋๊ตฌ]
end
๋๊ตฌ ๋ฐ ์ง์ ์ฐํฉ: ๋๊ตฌ์ ๋ฐ์ดํฐ๋ฅผ ์๋ฒ ์ ๋ฐ์ ๊ฑธ์ณ ์ ๊ทผ ๊ฐ๋ฅํ๊ฒ ํ์ฌ ๋ ํ์ฅ ๊ฐ๋ฅํ๊ณ ๋ชจ๋์์ธ ์์ด์ ํธ ์ํคํ ์ฒ ์ง์.
๐ ํด๋ผ์ด์ธํธ์ธก LLM ํตํฉ์ ํตํ ๊ณ ๊ธ MCP ์๋๋ฆฌ์ค
๊ธฐ๋ณธ MCP ์ํคํ ์ฒ๋ฅผ ๋์ด, ํด๋ผ์ด์ธํธ์ ์๋ฒ ๋ชจ๋ LLM์ ํฌํจํ๋ ๊ณ ๊ธ ์๋๋ฆฌ์ค๊ฐ ์์ต๋๋ค. ๋ค์ ๋ค์ด์ด๊ทธ๋จ์์ ํด๋ผ์ด์ธํธ ์ฑ์ ์ฌ์ฉ์ LLM์ ์ํ ์ฌ๋ฌ MCP ๋๊ตฌ๊ฐ ์๋ IDE์ผ ์ ์์ต๋๋ค:
---
title: ํด๋ผ์ด์ธํธ-์๋ฒ LLM ํตํฉ์ ํตํ ๊ณ ๊ธ MCP ์๋๋ฆฌ์ค
description: ์ฌ์ฉ์, ํด๋ผ์ด์ธํธ ์ ํ๋ฆฌ์ผ์ด์
, ํด๋ผ์ด์ธํธ LLM, ์ฌ๋ฌ MCP ์๋ฒ, ์๋ฒ LLM ๊ฐ์ ์์ธ ์ํธ์์ฉ ํ๋ฆ์ ๋ณด์ฌ์ฃผ๋ ์ํ์ค ๋ค์ด์ด๊ทธ๋จ์ผ๋ก, ๋๊ตฌ ํ์, ์ฌ์ฉ์ ์ํธ์์ฉ, ์ง์ ๋๊ตฌ ํธ์ถ, ๊ธฐ๋ฅ ํ์ ๋จ๊ณ๋ฅผ ์ค๋ช
ํฉ๋๋ค
---
sequenceDiagram
autonumber
actor User as ๐ค ์ฌ์ฉ์
participant ClientApp as ๐ฅ๏ธ ํด๋ผ์ด์ธํธ ์ฑ
participant ClientLLM as ๐ง ํด๋ผ์ด์ธํธ LLM
participant Server1 as ๐ง MCP ์๋ฒ 1
participant Server2 as ๐ MCP ์๋ฒ 2
participant ServerLLM as ๐ค ์๋ฒ LLM
%% Discovery Phase
rect rgb(220, 240, 255)
Note over ClientApp, Server2: ๋๊ตฌ ํ์ ๋จ๊ณ
ClientApp->>+Server1: ์ฌ์ฉ ๊ฐ๋ฅํ ๋๊ตฌ/๋ฆฌ์์ค ์์ฒญ
Server1-->>-ClientApp: ๋๊ตฌ ๋ชฉ๋ก ๋ฐํ (JSON)
ClientApp->>+Server2: ์ฌ์ฉ ๊ฐ๋ฅํ ๋๊ตฌ/๋ฆฌ์์ค ์์ฒญ
Server2-->>-ClientApp: ๋๊ตฌ ๋ชฉ๋ก ๋ฐํ (JSON)
Note right of ClientApp: ํตํฉ ๋๊ตฌ ์นดํ๋ก๊ทธ๋ฅผ<br/>๋ก์ปฌ์ ์ ์ฅ
end
%% User Interaction
rect rgb(255, 240, 220)
Note over User, ClientLLM: ์ฌ์ฉ์ ์ํธ์์ฉ ๋จ๊ณ
User->>+ClientApp: ์์ฐ์ด ํ๋กฌํํธ ์
๋ ฅ
ClientApp->>+ClientLLM: ํ๋กฌํํธ + ๋๊ตฌ ์นดํ๋ก๊ทธ ์ ๋ฌ
ClientLLM->>-ClientLLM: ํ๋กฌํํธ ๋ถ์ ๋ฐ ๋๊ตฌ ์ ํ
end
%% Scenario A: Direct Tool Calling
alt ์ง์ ๋๊ตฌ ํธ์ถ
rect rgb(220, 255, 220)
Note over ClientApp, Server1: ์๋๋ฆฌ์ค A: ์ง์ ๋๊ตฌ ํธ์ถ
ClientLLM->>+ClientApp: ๋๊ตฌ ์คํ ์์ฒญ
ClientApp->>+Server1: ํน์ ๋๊ตฌ ์คํ
Server1-->>-ClientApp: ๊ฒฐ๊ณผ ๋ฐํ
ClientApp->>+ClientLLM: ๊ฒฐ๊ณผ ์ฒ๋ฆฌ
ClientLLM-->>-ClientApp: ์๋ต ์์ฑ
ClientApp-->>-User: ์ต์ข
๋ต๋ณ ํ์
end
%% Scenario B: Feature Negotiation (VS Code style)
else ๊ธฐ๋ฅ ํ์ (VS Code ์คํ์ผ)
rect rgb(255, 220, 220)
Note over ClientApp, ServerLLM: ์๋๋ฆฌ์ค B: ๊ธฐ๋ฅ ํ์
ClientLLM->>+ClientApp: ํ์ํ ๊ธฐ๋ฅ ์๋ณ
ClientApp->>+Server2: ๊ธฐ๋ฅ/์ญ๋ ํ์
Server2->>+ServerLLM: ์ถ๊ฐ ์ปจํ
์คํธ ์์ฒญ
ServerLLM-->>-Server2: ์ปจํ
์คํธ ์ ๊ณต
Server2-->>-ClientApp: ์ฌ์ฉ ๊ฐ๋ฅํ ๊ธฐ๋ฅ ๋ฐํ
ClientApp->>+Server2: ํ์ ๋๊ตฌ ํธ์ถ
Server2-->>-ClientApp: ๊ฒฐ๊ณผ ๋ฐํ
ClientApp->>+ClientLLM: ๊ฒฐ๊ณผ ์ฒ๋ฆฌ
ClientLLM-->>-ClientApp: ์๋ต ์์ฑ
ClientApp-->>-User: ์ต์ข
๋ต๋ณ ํ์
end
end
๐ MCP์ ์ค์ง์ ์ด์
MCP ์ฌ์ฉ์ ์ค์ง์ ์ด์ ์ ๋ค์๊ณผ ๊ฐ์ต๋๋ค:
๐ ์ฃผ์ ์์
MCP ์ฌ์ฉ์ ์ฃผ์ ์์ ์ ๋ค์๊ณผ ๊ฐ์ต๋๋ค:
๐ง ์ฐ์ต ๋ฌธ์
์ฌ๋ฌ๋ถ์ด ๋ง๋ค๊ณ ์ถ์ AI ์ ํ๋ฆฌ์ผ์ด์ ์ ์๊ฐํด๋ณด์ธ์.
์ถ๊ฐ ์๋ฃ
๋ค์ ๋ด์ฉ
๋ค์: ์ฑํฐ 1: ํต์ฌ ๊ฐ๋
---
๋ฉด์ฑ ์กฐํญ:
์ด ๋ฌธ์๋ AI ๋ฒ์ญ ์๋น์ค Co-op Translator๋ฅผ ์ฌ์ฉํ์ฌ ๋ฒ์ญ๋์์ต๋๋ค.
์ ํ์ฑ์ ์ํด ๋ ธ๋ ฅํ์์ผ๋ ์๋ ๋ฒ์ญ์๋ ์ค๋ฅ๋ ๋ถ์ ํํ ์ ์ด ํฌํจ๋ ์ ์์ผ๋ ์ฐธ๊ณ ํ์๊ธฐ ๋ฐ๋๋๋ค.
์๋ณธ ๋ฌธ์๊ฐ ๊ถ์ ์๋ ์๋ฃ๋ก ๊ฐ์ฃผ๋์ด์ผ ํฉ๋๋ค.
์ค์ํ ์ ๋ณด์ ๊ฒฝ์ฐ, ์ ๋ฌธ์ ์ธ ์ธ๋ ฅ์ ์ํ ๋ฒ์ญ์ ๊ถ์ฅํฉ๋๋ค.
์ด ๋ฒ์ญ ์ฌ์ฉ์ผ๋ก ์ธํด ๋ฐ์ํ๋ ์คํด๋ ์๋ชป๋ ํด์์ ๋ํด์ ๋น์ฌ๋ ์ฑ ์์ ์ง์ง ์์ต๋๋ค.
Module 01 — ํต์ฌ ๊ฐ๋
MCP ํต์ฌ ๊ฐ๋ : AI ํตํฉ์ ์ํ ๋ชจ๋ธ ์ปจํ ์คํธ ํ๋กํ ์ฝ ๋ง์คํฐํ๊ธฐ
_(์ ์ด๋ฏธ์ง๋ฅผ ํด๋ฆญํ์ฌ ์ด ๊ฐ์์ ์์์ ์์ฒญํ์ธ์)_
์ด ๊ฐ์ด๋์์๋ MCP์ ํต์ฌ ๊ฐ๋ ์ ์๋ดํฉ๋๋ค. ํด๋ผ์ด์ธํธ-์๋ฒ ์ํคํ ์ฒ, ์ฃผ์ ๊ตฌ์ฑ ์์, ํต์ ๋ฉ์ปค๋์ฆ ๋ฐ ๊ตฌํ ๋ชจ๋ฒ ์ฌ๋ก์ ๋ํด ๋ฐฐ์ฐ๊ฒ ๋ฉ๋๋ค.
๊ตฌํ ์ง์นจ:
๊ฐ์
์ด ๊ฐ์์์๋ Model Context Protocol(MCP) ์ํ๊ณ๋ฅผ ๊ตฌ์ฑํ๋ ๊ธฐ๋ณธ ์ํคํ ์ฒ์ ๊ตฌ์ฑ ์์๋ฅผ ํ๊ตฌํฉ๋๋ค. MCP ์ํธ์์ฉ์ ์ง์ํ๋ ํด๋ผ์ด์ธํธ-์๋ฒ ์ํคํ ์ฒ, ์ฃผ์ ๊ตฌ์ฑ ์์ ๋ฐ ํต์ ๋ฉ์ปค๋์ฆ์ ๋ํด ๋ฐฐ์ฐ๊ฒ ๋ฉ๋๋ค.
์ฃผ์ ํ์ต ๋ชฉํ
์ด ๊ฐ์๊ฐ ๋๋๋ฉด ๋ค์์ ์ดํดํ ์ ์์ต๋๋ค:
MCP ์ํคํ ์ฒ: ์ฌ์ธต ๋ถ์
MCP ์ํ๊ณ๋ ํด๋ผ์ด์ธํธ-์๋ฒ ๋ชจ๋ธ๋ก ๊ตฌ์ถ๋์ด ์์ต๋๋ค. ์ด ๋ชจ๋์ ๊ตฌ์กฐ๋ AI ์ ํ๋ฆฌ์ผ์ด์ ์ด ๋๊ตฌ, ๋ฐ์ดํฐ๋ฒ ์ด์ค, API ๋ฐ ์ปจํ ์คํธ ๋ฆฌ์์ค์ ํจ์จ์ ์ผ๋ก ์ํธ์์ฉํ ์ ์๊ฒ ํฉ๋๋ค. ์ด ์ํคํ ์ฒ๋ฅผ ํต์ฌ ๊ตฌ์ฑ ์์๋ก ๋๋์ด ์ดํด๋ณด๊ฒ ์ต๋๋ค.
๊ธฐ๋ณธ์ ์ผ๋ก MCP๋ ํ๋์ ํธ์คํธ ์ ํ๋ฆฌ์ผ์ด์ ์ด ์ฌ๋ฌ ์๋ฒ์ ์ฐ๊ฒฐํ ์ ์๋ ํด๋ผ์ด์ธํธ-์๋ฒ ์ํคํ ์ฒ๋ฅผ ๋ฐ๋ฆ ๋๋ค:
flowchart LR
subgraph "๋น์ ์ ์ปดํจํฐ"
Host["MCP๊ฐ ์๋ ํธ์คํธ (Visual Studio, VS Code, IDE, ๋๊ตฌ)"]
S1["MCP ์๋ฒ A"]
S2["MCP ์๋ฒ B"]
S3["MCP ์๋ฒ C"]
Host <-->|"MCP ํ๋กํ ์ฝ"| S1
Host <-->|"MCP ํ๋กํ ์ฝ"| S2
Host <-->|"MCP ํ๋กํ ์ฝ"| S3
S1 <--> D1[("๋ก์ปฌ\๋ฐ์ดํฐ ์์ค A")]
S2 <--> D2[("๋ก์ปฌ\๋ฐ์ดํฐ ์์ค B")]
end
subgraph "์ธํฐ๋ท"
S3 <-->|"์น API"| D3[("์๊ฒฉ\์๋น์ค")]
end
MCP ํ๋กํ ์ฝ์ ๋ ์ง ๊ธฐ๋ฐ ๋ฒ์ ๊ด๋ฆฌ(YYYY-MM-DD ํ์)๋ฅผ ์ฌ์ฉํ๋ ์งํํ๋ ํ์ค์ ๋๋ค. ํ์ฌ ํ๋กํ ์ฝ ๋ฒ์ ์ 2025-11-25์ ๋๋ค. ์ต์ ์ ๋ฐ์ดํธ๋ ํ๋กํ ์ฝ ๋ช ์ธ์์ ํ์ธํ ์ ์์ต๋๋ค.
1. ํธ์คํธ
Model Context Protocol(MCP)์์ ํธ์คํธ๋ ์ฌ์ฉ์๊ฐ ํ๋กํ ์ฝ๊ณผ ์ํธ์์ฉํ๋ ์ฃผ์ ์ธํฐํ์ด์ค ์ญํ ์ ํ๋ AI ์ ํ๋ฆฌ์ผ์ด์ ์ ๋๋ค. ํธ์คํธ๋ ๊ฐ ์๋ฒ ์ฐ๊ฒฐ์ ์ํด ์ ์ฉ MCP ํด๋ผ์ด์ธํธ๋ฅผ ์์ฑํ์ฌ ์ฌ๋ฌ MCP ์๋ฒ์์ ์ฐ๊ฒฐ์ ์กฐ์จํ๊ณ ๊ด๋ฆฌํฉ๋๋ค. ํธ์คํธ์ ์์๋ ๋ค์๊ณผ ๊ฐ์ต๋๋ค:
ํธ์คํธ๋ AI ๋ชจ๋ธ ์ํธ์์ฉ์ ์กฐ์จํ๋ ์ ํ๋ฆฌ์ผ์ด์ ์ ๋๋ค. ๊ทธ๋ค์:
2. ํด๋ผ์ด์ธํธ
ํด๋ผ์ด์ธํธ๋ ํธ์คํธ์ MCP ์๋ฒ ๊ฐ์ ์ ์ฉ 1:1 ์ฐ๊ฒฐ์ ์ ์งํ๋ ํต์ฌ ๊ตฌ์ฑ ์์์ ๋๋ค. ๊ฐ MCP ํด๋ผ์ด์ธํธ๋ ํธ์คํธ์ ์ํด ํน์ MCP ์๋ฒ์ ์ฐ๊ฒฐํ๊ธฐ ์ํด ์ธ์คํด์คํ๋์ด ์กฐ์ง์ ์ด๊ณ ์์ ํ ํต์ ์ฑ๋์ ๋ณด์ฅํฉ๋๋ค. ์ฌ๋ฌ ํด๋ผ์ด์ธํธ๋ ํธ์คํธ๊ฐ ๋์์ ์ฌ๋ฌ ์๋ฒ์ ์ฐ๊ฒฐํ ์ ์๊ฒ ํฉ๋๋ค.
ํด๋ผ์ด์ธํธ๋ ํธ์คํธ ์ ํ๋ฆฌ์ผ์ด์ ๋ด ์ฐ๊ฒฐ์ ์ญํ ๊ตฌ์ฑ ์์์ ๋๋ค. ๊ทธ๋ค์:
3. ์๋ฒ
์๋ฒ๋ MCP ํด๋ผ์ด์ธํธ์ ์ปจํ ์คํธ, ๋๊ตฌ, ๊ธฐ๋ฅ์ ์ ๊ณตํ๋ ํ๋ก๊ทธ๋จ์ ๋๋ค. ๋ก์ปฌ(ํธ์คํธ์ ๊ฐ์ ๋จธ์ ) ๋๋ ์๊ฒฉ(์ธ๋ถ ํ๋ซํผ)์ผ๋ก ์คํ ๊ฐ๋ฅํ๋ฉฐ, ํด๋ผ์ด์ธํธ ์์ฒญ์ ์ฒ๋ฆฌํ๊ณ ๊ตฌ์กฐํ๋ ์๋ต์ ์ ๊ณตํฉ๋๋ค. ์๋ฒ๋ ํ์คํ๋ Model Context Protocol์ ํตํด ํน์ ๊ธฐ๋ฅ์ ๋ ธ์ถํฉ๋๋ค.
์๋ฒ๋ ์ปจํ ์คํธ ๋ฐ ๊ธฐ๋ฅ์ ์ ๊ณตํ๋ ์๋น์ค์ ๋๋ค. ๊ทธ๋ค์:
์๋ฒ๋ ๋๊ตฌ๋ ํนํ๋ ๊ธฐ๋ฅ์ผ๋ก ๋ชจ๋ธ ์ญ๋์ ํ์ฅํ๊ธฐ ์ํด ๊ฐ๋ฐํ ์ ์์ผ๋ฉฐ, ๋ก์ปฌ ๋ฐ ์๊ฒฉ ๋ฐฐํฌ ์๋๋ฆฌ์ค๋ฅผ ๋ชจ๋ ์ง์ํฉ๋๋ค.
4. ์๋ฒ ์์ ๊ธฐ๋ฅ
Model Context Protocol(MCP) ๋ด ์๋ฒ๋ ํด๋ผ์ด์ธํธ, ํธ์คํธ ๋ฐ ์ธ์ด ๋ชจ๋ธ ๊ฐ์ ํ๋ถํ ์ํธ์์ฉ์ ์ํ ๊ธฐ๋ณธ ๊ตฌ์ฑ ์์์ธ ์ธ ๊ฐ์ง ํต์ฌ ์์ ๊ธฐ๋ฅ์ ์ ๊ณตํฉ๋๋ค. ์ด ์์ ๊ธฐ๋ฅ์ ํ๋กํ ์ฝ์ ํตํด ์ ๊ณต๋๋ ์ปจํ ์คํธ ์ ๋ณด์ ๊ฐ๋ฅํ ๋์ ์ ํ์ ์ ์ํฉ๋๋ค.
MCP ์๋ฒ๋ ๋ค์ ์ธ ๊ฐ์ง ํต์ฌ ์์ ๊ธฐ๋ฅ ์ค ์์์ ์กฐํฉ์ ๋ ธ์ถํ ์ ์์ต๋๋ค:
๋ฆฌ์์ค
๋ฆฌ์์ค๋ AI ์ ํ๋ฆฌ์ผ์ด์ ์ ์ปจํ ์คํธ ์ ๋ณด๋ฅผ ์ ๊ณตํ๋ ๋ฐ์ดํฐ ์์ค์ ๋๋ค. ์ ์ ๋๋ ๋์ ์ฝํ ์ธ ๋ก์ ๋ชจ๋ธ์ ์ดํด๋ ฅ๊ณผ ์์ฌ๊ฒฐ์ ์ ํฅ์์ํต๋๋ค:
๋ฆฌ์์ค๋ URI๋ก ์๋ณ๋๋ฉฐ resources/list๋ฅผ ํตํ ๊ฒ์ ๋ฐ resources/read๋ฅผ ํตํ ์กฐํ๋ฅผ ์ง์ํฉ๋๋ค:
file://documents/project-spec.md
database://production/users/schema
api://weather/current
ํ๋กฌํํธ
ํ๋กฌํํธ๋ ์ธ์ด ๋ชจ๋ธ๊ณผ์ ์ํธ์์ฉ์ ๊ตฌ์กฐํํ๋ ์ฌ์ฌ์ฉ ๊ฐ๋ฅํ ํ ํ๋ฆฟ์ ๋๋ค. ํ์คํ๋ ์ํธ์์ฉ ํจํด๊ณผ ํ ํ๋ฆฟํ๋ ์ํฌํ๋ก๋ฅผ ์ ๊ณตํฉ๋๋ค:
ํ๋กฌํํธ๋ ๋ณ์ ์นํ์ ์ง์ํ๋ฉฐ prompts/list๋ฅผ ํตํด ๊ฒ์, prompts/get์ผ๋ก ์กฐํํ ์ ์์ต๋๋ค:
Generate a {{task_type}} for {{product}} targeting {{audience}} with the following requirements: {{requirements}}
๋๊ตฌ
๋๊ตฌ๋ AI ๋ชจ๋ธ์ด ํน์ ์์ ์ ์ํํ๊ธฐ ์ํด ํธ์ถํ ์ ์๋ ์คํ ๊ฐ๋ฅํ ํจ์์ ๋๋ค. MCP ์ํ๊ณ ๋ด "๋์ฌ" ์ญํ ์ ํ๋ฉฐ ๋ชจ๋ธ์ด ์ธ๋ถ ์์คํ ๊ณผ ์ํธ์์ฉํ ์ ์๊ฒ ํฉ๋๋ค:
๋๊ตฌ๋ ๋งค๊ฐ๋ณ์ ๊ฒ์ฆ์ ์ํ JSON Schema๋ก ์ ์๋๋ฉฐ tools/list๋ก ๊ฒ์, tools/call๋ก ์คํ๋ฉ๋๋ค.
๋๊ตฌ๋ UI ํํ ๊ฐํ๋ฅผ ์ํด ์์ด์ฝ์ ๋ถ๊ฐ ๋ฉํ๋ฐ์ดํฐ๋ก ํฌํจํ ์ ์์ต๋๋ค.
๋๊ตฌ ์ฃผ์: ๋๊ตฌ๋ ์ฝ๊ธฐ ์ ์ฉ(readOnlyHint), ํ๊ดด์ (destructiveHint) ๋ฑ ํํ ์ฃผ์์ ์ง์ํ์ฌ ๋๊ตฌ ์คํ์ ๊ดํ ํด๋ผ์ด์ธํธ์ ์ ๋ณด ๊ธฐ๋ฐ ํ๋จ์ ๋์ต๋๋ค.
๋๊ตฌ ์ ์ ์์:
server.tool(
"search_products",
{
query: z.string().describe("Search query for products"),
category: z.string().optional().describe("Product category filter"),
max_results: z.number().default(10).describe("Maximum results to return")
},
async (params) => {
// ๊ฒ์์ ์คํํ๊ณ ๊ตฌ์กฐํ๋ ๊ฒฐ๊ณผ๋ฅผ ๋ฐํํฉ๋๋ค
return await productService.search(params);
}
);
ํด๋ผ์ด์ธํธ ์์ ๊ธฐ๋ฅ
Model Context Protocol(MCP)์์ ํด๋ผ์ด์ธํธ๋ ์๋ฒ๊ฐ ํธ์คํธ ์ ํ๋ฆฌ์ผ์ด์ ์ ์ถ๊ฐ ๊ธฐ๋ฅ์ ์์ฒญํ ์ ์๋๋ก ์์ ๊ธฐ๋ฅ์ ๋ ธ์ถํ ์ ์์ต๋๋ค. ์ด ํด๋ผ์ด์ธํธ ์ธก ์์ ๊ธฐ๋ฅ์ AI ๋ชจ๋ธ ๊ธฐ๋ฅ ๋ฐ ์ฌ์ฉ์ ์ํธ์์ฉ์ ์ ๊ทผํ๋ ๋ ํ๋ถํ๊ณ ์ํธ์์ฉ์ ์ธ ์๋ฒ ๊ตฌํ์ ๊ฐ๋ฅํ๊ฒ ํฉ๋๋ค.
์ํ๋ง
์ํ๋ง์ ์๋ฒ๊ฐ ํด๋ผ์ด์ธํธ์ AI ์ ํ๋ฆฌ์ผ์ด์ ์์ ์ธ์ด ๋ชจ๋ธ ์์ฑ์ ์์ฒญํ ์ ์๊ฒ ํฉ๋๋ค. ์ด ์์ ๊ธฐ๋ฅ์ ์๋ฒ๊ฐ ์์ฒด ๋ชจ๋ธ ์ข ์์ฑ์ ํฌํจํ์ง ์๊ณ ๋ LLM ๊ธฐ๋ฅ์ ์ ๊ทผํ ์ ์๊ฒ ํฉ๋๋ค:
tools ๋ฐ toolChoice ๋งค๊ฐ๋ณ์ ํฌํจ ๊ฐ๋ฅ์ํ๋ง์ sampling/complete ๋ฉ์๋๋ฅผ ํตํด ์๋ฒ๊ฐ ํด๋ผ์ด์ธํธ์ ์์ฑ ์์ฒญ์ ์ ์กํ๋ ๊ฒ์ผ๋ก ์์๋ฉ๋๋ค.
๋ฃจํธ
๋ฃจํธ๋ ํด๋ผ์ด์ธํธ๊ฐ ํ์ผ ์์คํ ๊ฒฝ๊ณ๋ฅผ ์๋ฒ์ ๋ ธ์ถํ๋ ํ์คํ๋ ๋ฐฉ๋ฒ์ ์ ๊ณตํฉ๋๋ค. ์ด๋ฅผ ํตํด ์๋ฒ๊ฐ ์ ๊ทผ ๊ฐ๋ฅํ ๋๋ ํฐ๋ฆฌ ๋ฐ ํ์ผ ๋ฒ์๋ฅผ ์ดํดํ ์ ์์ต๋๋ค:
file:// URI๋ฅผ ์ฌ์ฉํ์ฌ ์ ๊ทผ ๊ฐ๋ฅํ ๋๋ ํฐ๋ฆฌ ๋ฐ ํ์ผ ์๋ณ๋ฃจํธ๋ roots/list๋ฅผ ํตํด ๊ฒ์ํ๋ฉฐ, ํด๋ผ์ด์ธํธ๋ ๋ฃจํธ ๋ณ๊ฒฝ ์ notifications/roots/list_changed๋ฅผ ๋ณด๋
๋๋ค.
์ ๋ณด ์์ฒญ (Elicitation)
์ ๋ณด ์์ฒญ์ ์๋ฒ๊ฐ ํด๋ผ์ด์ธํธ ์ธํฐํ์ด์ค๋ฅผ ํตํด ์ฌ์ฉ์๋ก๋ถํฐ ์ถ๊ฐ ์ ๋ณด๋ ํ์ธ์ ์์ฒญํ ์ ์๋๋ก ํฉ๋๋ค:
์ ๋ณด ์์ฒญ์ ํด๋ผ์ด์ธํธ ์ธํฐํ์ด์ค๋ฅผ ํตํด ์ฌ์ฉ์ ์
๋ ฅ์ ์์งํ๋ elicitation/request ๋ฉ์๋๋ฅผ ์ฌ์ฉํฉ๋๋ค.
URL ๋ชจ๋ ์ ๋ณด ์์ฒญ: ์๋ฒ๋ URL ๊ธฐ๋ฐ ์ฌ์ฉ์ ์ํธ์์ฉ๋ ์์ฒญํ ์ ์์ด, ์ธ์ฆ, ์น์ธ ๋๋ ๋ฐ์ดํฐ ์ ๋ ฅ์ ์ํด ์ฌ์ฉ์๋ฅผ ์ธ๋ถ ์นํ์ด์ง๋ก ์๋ดํ ์ ์์ต๋๋ค.
๋ก๊น
๋ก๊น ์ ์๋ฒ๊ฐ ๋๋ฒ๊น , ๋ชจ๋ํฐ๋ง, ์ด์ ํฌ๋ช ์ฑ์ ์ํด ํด๋ผ์ด์ธํธ์ ๊ตฌ์กฐํ๋ ๋ก๊ทธ ๋ฉ์์ง๋ฅผ ์ ์กํ ์ ์๊ฒ ํฉ๋๋ค:
๋ก๊น ๋ฉ์์ง๋ ์๋ฒ ์ด์์ ํฌ๋ช ์ฑ์ ์ ๊ณตํ๊ณ ๋๋ฒ๊น ์ ์ฉ์ดํ๊ฒ ํ๊ธฐ ์ํด ํด๋ผ์ด์ธํธ์ ์ ์ก๋ฉ๋๋ค.
MCP ๋ด ์ ๋ณด ํ๋ฆ
Model Context Protocol(MCP)์ ํธ์คํธ, ํด๋ผ์ด์ธํธ, ์๋ฒ, ๋ชจ๋ธ ๊ฐ์ ๊ตฌ์กฐํ๋ ์ ๋ณด ํ๋ฆ์ ์ ์ํฉ๋๋ค.
์ด ํ๋ฆ์ ์ดํดํ๋ฉด ์ฌ์ฉ์์ ์์ฒญ์ด ์ฒ๋ฆฌ๋๋ ๋ฐฉ์๊ณผ ์ธ๋ถ ๋๊ตฌ ๋ฐ ๋ฐ์ดํฐ๊ฐ ๋ชจ๋ธ ์๋ต์ ํตํฉ๋๋ ๋ฐฉ์์ ๋ช ํํ ์ ์ ์์ต๋๋ค.
ํธ์คํธ ์ ํ๋ฆฌ์ผ์ด์ (IDE๋ ์ฑํ ์ธํฐํ์ด์ค ๋ฑ)์ด ๋ณดํต STDIO, WebSocket ๋๋ ๊ธฐํ ์ง์๋๋ ์ ์ก ๋ฐฉ์์ ํตํด MCP ์๋ฒ์ ์ฐ๊ฒฐ์ ์ค์ ํฉ๋๋ค.
ํด๋ผ์ด์ธํธ(ํธ์คํธ์ ๋ด์ฅ๋จ)์ ์๋ฒ๋ ์ง์๋๋ ๊ธฐ๋ฅ, ๋๊ตฌ, ๋ฆฌ์์ค ๋ฐ ํ๋กํ ์ฝ ๋ฒ์ ์ ๊ดํ ์ ๋ณด๋ฅผ ๊ตํํฉ๋๋ค. ์ด๋ฅผ ํตํด ์์ธก์ด ์ธ์ ์์ ์ฌ์ฉ ๊ฐ๋ฅํ ๊ธฐ๋ฅ์ ํ์คํ ์ดํดํฉ๋๋ค.
์ฌ์ฉ์๊ฐ ํธ์คํธ์ ์ํธ์์ฉํฉ๋๋ค(์: ํ๋กฌํํธ๋ ๋ช ๋ น์ด ์ ๋ ฅ). ํธ์คํธ๋ ์ด ์ ๋ ฅ์ ์์งํ์ฌ ์ฒ๋ฆฌ์ฉ์ผ๋ก ํด๋ผ์ด์ธํธ์ ์ ๋ฌํฉ๋๋ค.
- ํด๋ผ์ด์ธํธ๋ ๋ชจ๋ธ์ ์ดํด๋ฅผ ๋๊ธฐ ์ํด ์๋ฒ์ ์ถ๊ฐ ์ปจํ ์คํธ๋ ๋ฆฌ์์ค(ํ์ผ, ๋ฐ์ดํฐ๋ฒ ์ด์ค ํญ๋ชฉ, ์ง์๋ฒ ์ด์ค ๋ฌธ์ ๋ฑ)๋ฅผ ์์ฒญํ ์ ์์ต๋๋ค.
- ๋ชจ๋ธ์ด ๋๊ตฌ ์ฌ์ฉ์ด ํ์ํ๋ค๊ณ ํ๋จํ๋ฉด(์: ๋ฐ์ดํฐ ์กฐํ, ๊ณ์ฐ ์ํ, API ํธ์ถ) ํด๋ผ์ด์ธํธ๋ ๋๊ตฌ ์ด๋ฆ๊ณผ ๋งค๊ฐ๋ณ์๋ฅผ ๋ช ์ํ์ฌ ๋๊ตฌ ํธ์ถ ์์ฒญ์ ์๋ฒ์ ๋ณด๋ ๋๋ค.
์๋ฒ๋ ๋ฆฌ์์ค๋ ๋๊ตฌ ์์ฒญ์ ๋ฐ๊ณ ํ์ํ ์์ (ํจ์ ์คํ, ๋ฐ์ดํฐ๋ฒ ์ด์ค ์ฟผ๋ฆฌ, ํ์ผ ์กฐํ ๋ฑ)์ ์ํํ ๋ค ๊ฒฐ๊ณผ๋ฅผ ๊ตฌ์กฐํ๋ ํ์์ผ๋ก ํด๋ผ์ด์ธํธ์ ๋ฐํํฉ๋๋ค.
ํด๋ผ์ด์ธํธ๋ ์๋ฒ์ ์๋ต(๋ฆฌ์์ค ๋ฐ์ดํฐ, ๋๊ตฌ ์ถ๋ ฅ ๋ฑ)์ ๋ชจ๋ธ ์ํธ์์ฉ์ ํตํฉํฉ๋๋ค. ๋ชจ๋ธ์ ์ด ์ ๋ณด๋ฅผ ํ์ฉํด ํฌ๊ด์ ์ด๊ณ ๋ฌธ๋งฅ์ ๋ง๋ ์๋ต์ ์์ฑํฉ๋๋ค.
ํธ์คํธ๋ ํด๋ผ์ด์ธํธ๋ก๋ถํฐ ์ต์ข ์ถ๋ ฅ์ ๋ฐ์ ์ฌ์ฉ์์๊ฒ ์ ๊ณตํฉ๋๋ค. ์ฌ๊ธฐ์๋ ๋ชจ๋ธ์ด ์์ฑํ ํ ์คํธ์ ๋๊ตฌ ์คํ ๋๋ ๋ฆฌ์์ค ์กฐํ ๊ฒฐ๊ณผ๊ฐ ํฌํจ๋ ์ ์์ต๋๋ค.
์ด ํ๋ฆ์ ๋ชจ๋ธ๊ณผ ์ธ๋ถ ๋๊ตฌ ๋ฐ ๋ฐ์ดํฐ ์์ค๋ฅผ ์ํํ ์ฐ๊ฒฐํ์ฌ MCP๊ฐ ๊ณ ๊ธ ์ธํฐ๋ํฐ๋ธ, ์ปจํ ์คํธ ์ธ์ง AI ์ ํ๋ฆฌ์ผ์ด์ ์ ์ง์ํ๋๋ก ํฉ๋๋ค.
ํ๋กํ ์ฝ ์ํคํ ์ฒ & ๊ณ์ธต
MCP๋ ์์ ํ ํต์ ํ๋ ์์ํฌ๋ฅผ ์ ๊ณตํ๊ธฐ ์ํด ํจ๊ป ์๋ํ๋ ๋ ๊ฐ์ง ๋๋ ทํ ์ํคํ ์ฒ ๊ณ์ธต์ผ๋ก ๊ตฌ์ฑ๋ฉ๋๋ค:
๋ฐ์ดํฐ ๊ณ์ธต
๋ฐ์ดํฐ ๊ณ์ธต์ JSON-RPC 2.0์ ๊ธฐ๋ฐ์ผ๋ก MCP ํ๋กํ ์ฝ์ ํต์ฌ์ ๊ตฌํํฉ๋๋ค. ์ด ๊ณ์ธต์ ๋ฉ์์ง ๊ตฌ์กฐ, ์๋ฏธ๋ก , ์ํธ์์ฉ ํจํด์ ์ ์ํฉ๋๋ค:
ํต์ฌ ๊ตฌ์ฑ ์์:
์ฃผ์ ํน์ง:
์ ์ก ๊ณ์ธต
์ ์ก ๊ณ์ธต์ MCP ์ฐธ๊ฐ์ ๊ฐ ํต์ ์ฑ๋, ๋ฉ์์ง ํ๋ ์ด๋ฐ, ์ธ์ฆ์ ๊ด๋ฆฌํฉ๋๋ค:
์ง์๋๋ ์ ์ก ๋ฐฉ์:
1. STDIO ์ ์ก:
- ํ์ค ์ ๋ ฅ/์ถ๋ ฅ ์คํธ๋ฆผ์ ์ฌ์ฉํด ์ง์ ํ๋ก์ธ์ค ๊ฐ ํต์
- ๋คํธ์ํฌ ์ค๋ฒํค๋๊ฐ ์๋ ๋์ผ ๋จธ์ ์ ๋ก์ปฌ ํ๋ก์ธ์ค์ ์ต์ ํ
- ๋ก์ปฌ MCP ์๋ฒ ๊ตฌํ์์ ํํ ์ฌ์ฉ๋จ
2. ์คํธ๋ฆฌ๋ฐ HTTP ์ ์ก:
- ํด๋ผ์ด์ธํธ์์ ์๋ฒ๋ก HTTP POST ๋ฐฉ์ ์ฌ์ฉ
- ์ ํ์ ์๋ฒ-๋ฐํ ์ด๋ฒคํธ(SSE)๋ฅผ ํตํด ์๋ฒ์์ ํด๋ผ์ด์ธํธ๋ก ์คํธ๋ฆฌ๋ฐ ๊ฐ๋ฅ
- ๋คํธ์ํฌ๋ฅผ ํตํ ์๊ฒฉ ์๋ฒ ํต์ ์ง์
- ํ์ค HTTP ์ธ์ฆ(Bearer ํ ํฐ, API ํค, ์ปค์คํ ํค๋) ์ง์
- MCP๋ ๋ณด์ ํ ํฐ ์ธ์ฆ์ ์ํด OAuth ์ฌ์ฉ ๊ถ์ฅ
์ ์ก ์ถ์ํ:
์ ์ก ๊ณ์ธต์ ๋ฐ์ดํฐ ๊ณ์ธต๊ณผ ๋ณ๊ฐ๋ก ํต์ ์ธ๋ถ์ฌํญ์ ์ถ์ํํ์ฌ ๋ชจ๋ ์ ์ก ๋ฐฉ์์์ ๋์ผํ JSON-RPC 2.0 ๋ฉ์์ง ํ์์ ์ฌ์ฉํ ์ ์๊ฒ ํฉ๋๋ค. ์ด๋ฅผ ํตํด ์์ฉ ํ๋ก๊ทธ๋จ์ด ๋ก์ปฌ๊ณผ ์๊ฒฉ ์๋ฒ ๊ฐ ์ ํ์ ์ํํ ์ํํ ์ ์์ต๋๋ค.
๋ณด์ ๊ณ ๋ ค์ฌํญ
MCP ๊ตฌํ์ฒด๋ ๋ชจ๋ ํ๋กํ ์ฝ ์์ ์์ ์์ ํ๊ณ ์ ๋ขฐํ ์ ์์ผ๋ฉฐ ๋ณด์์ ๋ณด์ฅํ๊ธฐ ์ํ ์ฌ๋ฌ ์ค์ํ ๋ณด์ ์์น์ ์ค์ํด์ผ ํฉ๋๋ค:
์ด ๋ณด์ ์์น์ ์ค์ํจ์ผ๋ก์จ MCP๋ ๊ฐ๋ ฅํ AI ํตํฉ ๊ธฐ๋ฅ์ ์ ๊ณตํ๋ฉด์๋ ์ฌ์ฉ์ ์ ๋ขฐ, ํ๋ผ์ด๋ฒ์, ์์ ์ ๋ณด์ฅํฉ๋๋ค.
์ฝ๋ ์์ : ์ฃผ์ ๊ตฌ์ฑ ์์
์๋๋ ์ฌ๋ฌ ์ธ๊ธฐ ํ๋ก๊ทธ๋๋ฐ ์ธ์ด๋ก MCP ์๋ฒ ํต์ฌ ๊ตฌ์ฑ ์์์ ๋๊ตฌ ๊ตฌํ ๋ฐฉ๋ฒ์ ๋ณด์ฌ์ฃผ๋ ์ฝ๋ ์์ ์ ๋๋ค.
.NET ์์ : ๋๊ตฌ๊ฐ ํฌํจ๋ ๊ฐ๋จํ MCP ์๋ฒ ์์ฑ
์๋๋ ๋ง์ถค ๋๊ตฌ ์ ์, ๋ฑ๋ก, ์์ฒญ ์ฒ๋ฆฌ, ๊ทธ๋ฆฌ๊ณ Model Context Protocol์ ์ฌ์ฉํด ์๋ฒ์ ์ฐ๊ฒฐํ๋ ๊ฐ๋จํ MCP ์๋ฒ ๊ตฌํ ์์ ์ ๋๋ค.
using System;
using System.Threading.Tasks;
using ModelContextProtocol.Server;
using ModelContextProtocol.Server.Transport;
using ModelContextProtocol.Server.Tools;
public class WeatherServer
{
public static async Task Main(string[] args)
{
// Create an MCP server
var server = new McpServer(
name: "Weather MCP Server",
version: "1.0.0"
);
// Register our custom weather tool
server.AddTool<string, WeatherData>("weatherTool",
description: "Gets current weather for a location",
execute: async (location) => {
// Call weather API (simplified)
var weatherData = await GetWeatherDataAsync(location);
return weatherData;
});
// Connect the server using stdio transport
var transport = new StdioServerTransport();
await server.ConnectAsync(transport);
Console.WriteLine("Weather MCP Server started");
// Keep the server running until process is terminated
await Task.Delay(-1);
}
private static async Task<WeatherData> GetWeatherDataAsync(string location)
{
// This would normally call a weather API
// Simplified for demonstration
await Task.Delay(100); // Simulate API call
return new WeatherData {
Temperature = 72.5,
Conditions = "Sunny",
Location = location
};
}
}
public class WeatherData
{
public double Temperature { get; set; }
public string Conditions { get; set; }
public string Location { get; set; }
}
Java ์์ : MCP ์๋ฒ ๊ตฌ์ฑ ์์
์ด ์์ ๋ ์ .NET ์์ ์ ๋์ผํ MCP ์๋ฒ ๋ฐ ๋๊ตฌ ๋ฑ๋ก์ Java๋ก ๊ตฌํํ ๊ฒ์ ๋๋ค.
import io.modelcontextprotocol.server.McpServer;
import io.modelcontextprotocol.server.McpToolDefinition;
import io.modelcontextprotocol.server.transport.StdioServerTransport;
import io.modelcontextprotocol.server.tool.ToolExecutionContext;
import io.modelcontextprotocol.server.tool.ToolResponse;
public class WeatherMcpServer {
public static void main(String[] args) throws Exception {
// MCP ์๋ฒ ์์ฑ
McpServer server = McpServer.builder()
.name("Weather MCP Server")
.version("1.0.0")
.build();
// ๋ ์จ ๋๊ตฌ ๋ฑ๋ก
server.registerTool(McpToolDefinition.builder("weatherTool")
.description("Gets current weather for a location")
.parameter("location", String.class)
.execute((ToolExecutionContext ctx) -> {
String location = ctx.getParameter("location", String.class);
// ๋ ์จ ๋ฐ์ดํฐ ๊ฐ์ ธ์ค๊ธฐ (๋จ์ํ๋จ)
WeatherData data = getWeatherData(location);
// ํ์ํ๋ ์๋ต ๋ฐํ
return ToolResponse.content(
String.format("Temperature: %.1fยฐF, Conditions: %s, Location: %s",
data.getTemperature(),
data.getConditions(),
data.getLocation())
);
})
.build());
// stdio ์ ์ก์ ์ฌ์ฉํ์ฌ ์๋ฒ์ ์ฐ๊ฒฐ
try (StdioServerTransport transport = new StdioServerTransport()) {
server.connect(transport);
System.out.println("Weather MCP Server started");
// ํ๋ก์ธ์ค๊ฐ ์ข
๋ฃ๋ ๋๊น์ง ์๋ฒ ์คํ ์ ์ง
Thread.currentThread().join();
}
}
private static WeatherData getWeatherData(String location) {
// ๊ตฌํ ์ ๋ ์จ API ํธ์ถ
// ์์ ๋ชฉ์ ์ผ๋ก ๋จ์ํ๋จ
return new WeatherData(72.5, "Sunny", location);
}
}
class WeatherData {
private double temperature;
private String conditions;
private String location;
public WeatherData(double temperature, String conditions, String location) {
this.temperature = temperature;
this.conditions = conditions;
this.location = location;
}
public double getTemperature() {
return temperature;
}
public String getConditions() {
return conditions;
}
public String getLocation() {
return location;
}
}
Python ์์ : MCP ์๋ฒ ๊ตฌ์ถ
์ด ์์ ๋ fastmcp๋ฅผ ์ฌ์ฉํ๋ฏ๋ก ๋จผ์ ์ค์นํด ์ฃผ์ธ์:
pip install fastmcp
์ฝ๋ ์ํ:
#!/usr/bin/env python3
import asyncio
from fastmcp import FastMCP
from fastmcp.transports.stdio import serve_stdio
# FastMCP ์๋ฒ ์์ฑ
mcp = FastMCP(
name="Weather MCP Server",
version="1.0.0"
)
@mcp.tool()
def get_weather(location: str) -> dict:
"""Gets current weather for a location."""
return {
"temperature": 72.5,
"conditions": "Sunny",
"location": location
}
# ํด๋์ค๋ฅผ ์ฌ์ฉํ๋ ๋์ฒด ๋ฐฉ๋ฒ
class WeatherTools:
@mcp.tool()
def forecast(self, location: str, days: int = 1) -> dict:
"""Gets weather forecast for a location for the specified number of days."""
return {
"location": location,
"forecast": [
{"day": i+1, "temperature": 70 + i, "conditions": "Partly Cloudy"}
for i in range(days)
]
}
# ํด๋์ค ๋๊ตฌ ๋ฑ๋ก
weather_tools = WeatherTools()
# ์๋ฒ ์์
if __name__ == "__main__":
asyncio.run(serve_stdio(mcp))
JavaScript ์์ : MCP ์๋ฒ ์์ฑ
์ด ์์ ๋ JavaScript๋ก MCP ์๋ฒ๋ฅผ ์์ฑํ๊ณ ๋ ๊ฐ์ ๋ ์จ ๊ด๋ จ ๋๊ตฌ๋ฅผ ๋ฑ๋กํ๋ ๋ฐฉ๋ฒ์ ๋ณด์ฌ์ค๋๋ค.
// ๊ณต์ ๋ชจ๋ธ ์ปจํ
์คํธ ํ๋กํ ์ฝ SDK ์ฌ์ฉ
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
import { z } from "zod"; // ๋งค๊ฐ๋ณ์ ์ ํจ์ฑ ๊ฒ์ฌ์ฉ
// MCP ์๋ฒ ์์ฑ
const server = new McpServer({
name: "Weather MCP Server",
version: "1.0.0"
});
// ๋ ์จ ๋๊ตฌ ์ ์
server.tool(
"weatherTool",
{
location: z.string().describe("The location to get weather for")
},
async ({ location }) => {
// ์ผ๋ฐ์ ์ผ๋ก ๋ ์จ API๋ฅผ ํธ์ถํจ
// ๋ฐ๋ชจ๋ฅผ ์ํด ๋จ์ํ๋จ
const weatherData = await getWeatherData(location);
return {
content: [
{
type: "text",
text: `Temperature: ${weatherData.temperature}ยฐF, Conditions: ${weatherData.conditions}, Location: ${weatherData.location}`
}
]
};
}
);
// ์๋ณด ๋๊ตฌ ์ ์
server.tool(
"forecastTool",
{
location: z.string(),
days: z.number().default(3).describe("Number of days for forecast")
},
async ({ location, days }) => {
// ์ผ๋ฐ์ ์ผ๋ก ๋ ์จ API๋ฅผ ํธ์ถํจ
// ๋ฐ๋ชจ๋ฅผ ์ํด ๋จ์ํ๋จ
const forecast = await getForecastData(location, days);
return {
content: [
{
type: "text",
text: `${days}-day forecast for ${location}: ${JSON.stringify(forecast)}`
}
]
};
}
);
// ๋์ฐ๋ฏธ ํจ์๋ค
async function getWeatherData(location) {
// API ํธ์ถ ์๋ฎฌ๋ ์ด์
return {
temperature: 72.5,
conditions: "Sunny",
location: location
};
}
async function getForecastData(location, days) {
// API ํธ์ถ ์๋ฎฌ๋ ์ด์
return Array.from({ length: days }, (_, i) => ({
day: i + 1,
temperature: 70 + Math.floor(Math.random() * 10),
conditions: i % 2 === 0 ? "Sunny" : "Partly Cloudy"
}));
}
// stdio ์ ์ก์ ์ฌ์ฉํ์ฌ ์๋ฒ ์ฐ๊ฒฐ
const transport = new StdioServerTransport();
server.connect(transport).catch(console.error);
console.log("Weather MCP Server started");
์ด JavaScript ์์ ๋ Model Context Protocol SDK๋ฅผ ์ฌ์ฉํด MCP ์๋ฒ๋ฅผ ๋ง๋๋ ๋ฐฉ๋ฒ์ ์ค๋ช
ํฉ๋๋ค. weatherTool๊ณผ forecastTool์ด๋ผ๋ ๋ ๋๊ตฌ๋ฅผ ๋ฑ๋กํ๊ณ StdioServerTransport๋ฅผ ํตํด MCP ํด๋ผ์ด์ธํธ์ ์ ๊ณตํ๋ ๊ณผ์ ์ด ๋์ ์์ต๋๋ค.
๋ณด์ ๋ฐ ๊ถํ ๋ถ์ฌ
MCP๋ ํ๋กํ ์ฝ ์ ๋ฐ์ ๊ฑธ์ณ ๋ณด์ ๋ฐ ๊ถํ ๊ด๋ฆฌ์ฉ ๊ธฐ๋ณธ ๊ฐ๋ ๊ณผ ๋ฉ์ปค๋์ฆ์ ๋ค์๊ณผ ๊ฐ์ด ํฌํจํฉ๋๋ค:
1. ๋๊ตฌ ๊ถํ ์ ์ด
ํด๋ผ์ด์ธํธ๋ ์ธ์ ๋์ ๋ชจ๋ธ์ด ์ฌ์ฉํ ์ ์๋ ๋๊ตฌ๋ฅผ ์ง์ ํ ์ ์์ต๋๋ค. ์ด๋ฅผ ํตํด ๋ช ์์ ์ผ๋ก ํ๊ฐ๋ ๋๊ตฌ๋ง ์ ๊ทผ ๊ฐ๋ฅํ๊ฒ ํ์ฌ ์๋ํ์ง ์์๊ฑฐ๋ ์์ ํ์ง ์์ ์์ ์ํ์ ์ค์ ๋๋ค. ๊ถํ์ ์ฌ์ฉ์ ์ค์ , ์กฐ์ง ์ ์ฑ ๋๋ ์ํธ์์ฉ ๋ฌธ๋งฅ์ ๋ฐ๋ผ ๋์ ์ผ๋ก ๊ตฌ์ฑํ ์ ์์ต๋๋ค.
2. ์ธ์ฆ
์๋ฒ๋ ๋๊ตฌ, ๋ฆฌ์์ค, ๋ฏผ๊ฐํ ์์ ์ ๊ทผ ๊ถํ ๋ถ์ฌ ์ ์ ์ธ์ฆ์ ์๊ตฌํ ์ ์์ต๋๋ค. API ํค, OAuth ํ ํฐ, ๊ธฐํ ์ธ์ฆ ๋ฐฉ์์ ์ฌ์ฉํ ์ ์์ต๋๋ค. ์ฌ๋ฐ๋ฅธ ์ธ์ฆ์ ์ ๋ขฐํ ์ ์๋ ํด๋ผ์ด์ธํธ์ ์ฌ์ฉ์๋ง ์๋ฒ ๊ธฐ๋ฅ์ ํธ์ถํ ์ ์๊ฒ ๋ณด์ฅํฉ๋๋ค.
3. ๊ฒ์ฆ
๋ชจ๋ ๋๊ตฌ ํธ์ถ์ ๋ํด ๋งค๊ฐ๋ณ์ ๊ฒ์ฆ์ ์ํํฉ๋๋ค. ๊ฐ ๋๊ตฌ๋ ์์ ํ์ , ํ์, ์ ์ฝ ์กฐ๊ฑด์ ์ ์ํ๋ฉฐ ์๋ฒ๋ ๋ค์ด์ค๋ ์์ฒญ์ ์ด์ ๋ง๊ฒ ๊ฒ์ฆํฉ๋๋ค. ์ด๋ฅผ ํตํด ์๋ชป๋๊ฑฐ๋ ์ ์์ ์ธ ์ ๋ ฅ์ด ๋๊ตฌ ๊ตฌํ์ ๋๋ฌํ์ง ์๊ฒ ํ๊ณ ์์ ๋ฌด๊ฒฐ์ฑ์ ์ ์งํฉ๋๋ค.
4. ์์จ ์ ํ
์ค์ฉ ๋ฐฉ์ง์ ๊ณต์ ํ ์๋ฒ ์์ ์ฌ์ฉ์ ์ํด MCP ์๋ฒ๋ ๋๊ตฌ ํธ์ถ ๋ฐ ๋ฆฌ์์ค ์ ๊ทผ์ ๋ํด ์์จ ์ ํ์ ๊ตฌํํ ์ ์์ต๋๋ค. ์ฌ์ฉ์๋ณ, ์ธ์ ๋ณ, ์ ์ฒด ๋จ์๋ก ์ ํ์ ์ ์ฉํ๋ฉฐ ์๋น์ค ๊ฑฐ๋ถ ๊ณต๊ฒฉ์ด๋ ๊ณผ๋ํ ์์ ์๋น๋ฅผ ๋ฐฉ์งํฉ๋๋ค.
์ด ๋ฉ์ปค๋์ฆ์ ํตํฉํด MCP๋ ์ธ์ด ๋ชจ๋ธ๊ณผ ์ธ๋ถ ๋๊ตฌ ๋ฐ ๋ฐ์ดํฐ ์์ค ํตํฉ์ ์ํ ์์ ํ ๊ธฐ๋ฐ์ ์ ๊ณตํ๋ฉฐ, ์ฌ์ฉ์์ ๊ฐ๋ฐ์๊ฐ ์ ๊ทผ ๋ฐ ์ฌ์ฉ์ ์ธ๋ฐํ๊ฒ ์ ์ดํ ์ ์๋๋ก ํฉ๋๋ค.
ํ๋กํ ์ฝ ๋ฉ์์ง & ํต์ ํ๋ฆ
MCP ํต์ ์ ๋ช ํํ๊ณ ์ ๋ขฐํ ์ ์๋ ์ํธ์์ฉ์ ์ํด ๊ตฌ์กฐํ๋ JSON-RPC 2.0 ๋ฉ์์ง๋ฅผ ์ฌ์ฉํฉ๋๋ค. ํ๋กํ ์ฝ์ ๋ค์ํ ์์ ์ ํ๋ณ๋ก ํน์ ๋ฉ์์ง ํจํด์ ์ ์ํฉ๋๋ค:
ํต์ฌ ๋ฉ์์ง ์ ํ:
์ด๊ธฐํ ๋ฉ์์ง
initialize ์์ฒญ: ์ฐ๊ฒฐ ์๋ฆฝ ๋ฐ ํ๋กํ ์ฝ ๋ฒ์ ๊ณผ ๊ธฐ๋ฅ ํ์ initialize ์๋ต: ์ง์ํ๋ ๊ธฐ๋ฅ ๋ฐ ์๋ฒ ์ ๋ณด ํ์ธ notifications/initialized: ์ด๊ธฐํ ์๋ฃ ๋ฐ ์ธ์
์ค๋น ์๋ฃ ์ ํธํ์ ๋ฉ์์ง
tools/list ์์ฒญ: ์๋ฒ์์ ์ฌ์ฉ ๊ฐ๋ฅํ ๋๊ตฌ ์กฐํ resources/list ์์ฒญ: ์ฌ์ฉ ๊ฐ๋ฅํ ๋ฆฌ์์ค(๋ฐ์ดํฐ ์์ค) ๋ชฉ๋ก ์์ฒญ prompts/list ์์ฒญ: ์ฌ์ฉ ๊ฐ๋ฅํ ํ๋กฌํํธ ํ
ํ๋ฆฟ ์กฐํ์คํ ๋ฉ์์ง
tools/call ์์ฒญ: ํน์ ๋๊ตฌ๋ฅผ ๋งค๊ฐ๋ณ์์ ํจ๊ป ์คํ resources/read ์์ฒญ: ํน์ ๋ฆฌ์์ค์ ๋ด์ฉ ์กฐํ prompts/get ์์ฒญ: ์ ํ์ ๋งค๊ฐ๋ณ์์ ํจ๊ป ํ๋กฌํํธ ํ
ํ๋ฆฟ ๊ฐ์ ธ์ค๊ธฐํด๋ผ์ด์ธํธ ์ธก ๋ฉ์์ง
sampling/complete ์์ฒญ: ์๋ฒ๊ฐ ํด๋ผ์ด์ธํธ์ LLM ์๋ฃ๋ฅผ ์์ฒญ elicitation/request: ์๋ฒ๊ฐ ํด๋ผ์ด์ธํธ๋ฅผ ํตํด ์ฌ์ฉ์ ์
๋ ฅ ์์ฒญ ์๋ฆผ ๋ฉ์์ง
notifications/tools/list_changed: ์๋ฒ๊ฐ ๋๊ตฌ ๋ณ๊ฒฝ ์ฌํญ์ ํด๋ผ์ด์ธํธ์ ์๋ฆผ notifications/resources/list_changed: ์๋ฒ๊ฐ ๋ฆฌ์์ค ๋ณ๊ฒฝ ์ฌํญ์ ํด๋ผ์ด์ธํธ์ ์๋ฆผ notifications/prompts/list_changed: ์๋ฒ๊ฐ ํ๋กฌํํธ ๋ณ๊ฒฝ ์ฌํญ์ ํด๋ผ์ด์ธํธ์ ์๋ฆผ๋ฉ์์ง ๊ตฌ์กฐ:
๋ชจ๋ MCP ๋ฉ์์ง๋ JSON-RPC 2.0 ํ์์ ๋ฐ๋ฅด๋ฉฐ:
id, method, ์ ํ์ params ํฌํจ id ๋ฐ result ๋๋ error ํฌํจ method ๋ฐ ์ ํ์ params ํฌํจ(id ์์, ์๋ต ๊ธฐ๋ ์ํจ)์ด ๊ตฌ์กฐํ๋ ํต์ ์ ์ค์๊ฐ ์ ๋ฐ์ดํธ, ๋๊ตฌ ์ฒด์ธ, ๊ฒฌ๊ณ ํ ์ค๋ฅ ์ฒ๋ฆฌ ๋ฑ ๊ณ ๊ธ ์๋๋ฆฌ์ค๋ฅผ ์ง์ํ๋ฉด์ ์ ๋ขฐ์ฑ ์๊ณ ์ถ์ ๊ฐ๋ฅํ๋ฉฐ ํ์ฅ ๊ฐ๋ฅํ ์ํธ์์ฉ์ ๋ณด์ฅํฉ๋๋ค.
์์ (์คํ์ )
์์ (tasks)์ MCP ์์ฒญ์ ๋ํด ๊ฒฐ๊ณผ ์ง์ฐ ์๋ น๊ณผ ์ํ ์ถ์ ์ด ๊ฐ๋ฅํ ์ง์์ ์คํ ๋ํผ๋ฅผ ์ ๊ณตํ๋ ์คํ์ ๊ธฐ๋ฅ์ ๋๋ค:
์์ ์ ์ฆ์ ์๋ฃ๋์ง ์๋ ์์ ์ ๋ํด ๋น๋๊ธฐ ์คํ ํจํด์ ๊ฐ๋ฅํ๊ฒ ํ๋๋ก ํ์ค MCP ์์ฒญ์ ๋ํํฉ๋๋ค.
์ฃผ์ ์์
์ค์ต
๋น์ ์ ์์ญ์์ ์ ์ฉํ ๊ฐ๋จํ MCP ๋๊ตฌ๋ฅผ ์ค๊ณํด ๋ณด์ญ์์ค. ์ ์ํ ๋ด์ฉ:
1. ๋๊ตฌ ์ด๋ฆ
2. ์๋ฝํ ๋งค๊ฐ๋ณ์
3. ๋ฐํํ ์ถ๋ ฅ
4. ๋ชจ๋ธ์ด ์ด ๋๊ตฌ๋ฅผ ์ฌ์ฉํด ์ฌ์ฉ์ ๋ฌธ์ ๋ฅผ ํด๊ฒฐํ๋ ๋ฐฉ๋ฒ
---
๋ค์ ๋ด์ฉ
๋ค์: 2์ฅ: ๋ณด์
---
๋ฉด์ฑ ์กฐํญ:
์ด ๋ฌธ์๋ AI ๋ฒ์ญ ์๋น์ค Co-op Translator๋ฅผ ์ฌ์ฉํ์ฌ ๋ฒ์ญ๋์์ต๋๋ค.
์ ํ์ฑ์ ์ํด ๋ ธ๋ ฅํ๊ณ ์์ผ๋, ์๋ ๋ฒ์ญ์๋ ์ค๋ฅ๋ ๋ถ์ ํํ ๋ด์ฉ์ด ํฌํจ๋ ์ ์์์ ์ ์ํ์๊ธฐ ๋ฐ๋๋๋ค.
์๋ณธ ๋ฌธ์์ ์์ด ๋ฒ์ ์ ๊ถ์ ์๋ ์๋ฃ๋ก ๊ฐ์ฃผํด์ผ ํฉ๋๋ค.
์ค์ํ ์ ๋ณด์ ๊ฒฝ์ฐ ์ ๋ฌธ ์ธ๋ ฅ์ ์ํ ๋ฒ์ญ์ ๊ถ์ฅํฉ๋๋ค.
๋ณธ ๋ฒ์ญ ์ฌ์ฉ์ผ๋ก ์ธํ ์คํด๋ ์๋ชป๋ ํด์์ ๋ํด์๋ ์ฑ ์์ ์ง์ง ์์ต๋๋ค.
Module 02 — ๋ณด์
MCP ๋ณด์: AI ์์คํ ์ ์ํ ์ข ํฉ ๋ณดํธ
_(์ ์ด๋ฏธ์ง๋ฅผ ํด๋ฆญํ๋ฉด ์ด ์์ ์ ๋์์์ ๋ณผ ์ ์์ต๋๋ค)_
๋ณด์์ AI ์์คํ ์ค๊ณ์ ๊ธฐ๋ณธ์ด๋ฏ๋ก ๋ ๋ฒ์งธ ์น์ ์ผ๋ก ์ฐ์ ์์๋ฅผ ๋ก๋๋ค.
์ด๋ Microsoft์ Secure Future Initiative์ ๋ช ์๋ Secure by Design ์์น๊ณผ ์ผ์นํฉ๋๋ค.
๋ชจ๋ธ ์ปจํ ์คํธ ํ๋กํ ์ฝ(MCP)์ AI ๊ธฐ๋ฐ ์ ํ๋ฆฌ์ผ์ด์ ์ ๊ฐ๋ ฅํ ๊ธฐ๋ฅ์ ์ ๊ณตํ๋ ๋์์ ์ ํต์ ์ธ ์ํํธ์จ์ด ์ํ์ ๋์ด์ ๋ ํนํ ๋ณด์ ๋ฌธ์ ๋ฅผ ์ ๊ธฐํฉ๋๋ค. MCP ์์คํ ์ ๊ฒ์ฆ๋ ๋ณด์ ๋ฌธ์ (์์ ํ ์ฝ๋ฉ, ์ต์ ๊ถํ, ๊ณต๊ธ๋ง ๋ณด์)๋ฟ๋ง ์๋๋ผ ํ๋กฌํํธ ์ฃผ์ , ๋๊ตฌ ์ค์ผ, ์ธ์ ํ์ทจ, ํผ๋๋ ๋๋ฆฌ์ธ ๊ณต๊ฒฉ, ํ ํฐ ์ ๋ฌ ์ทจ์ฝ์ฑ, ๋์ ๊ถํ ์์ ๊ฐ์ AI ํน์ ์ํ์๋ ์ง๋ฉดํฉ๋๋ค.
์ด ์์ ์์๋ MCP ๊ตฌํ์์ ๊ฐ์ฅ ์ค์ํ ๋ณด์ ์ํ๋ค์ ํ๊ตฌํฉ๋๋คโ์ธ์ฆ, ๊ถํ ๋ถ์ฌ, ๊ณผ๋ํ ๊ถํ, ๊ฐ์ ํ๋กฌํํธ ์ฃผ์ , ์ธ์ ๋ณด์, ํผ๋๋ ๋๋ฆฌ์ธ ๋ฌธ์ , ํ ํฐ ๊ด๋ฆฌ, ๊ณต๊ธ๋ง ์ทจ์ฝ์ฑ์ ๋ค๋ฃน๋๋ค. ๋ํ Microsoft์ Prompt Shields, Azure Content Safety, GitHub Advanced Security์ ๊ฐ์ ์๋ฃจ์ ์ ํ์ฉํ์ฌ MCP ๋ฐฐํฌ๋ฅผ ๊ฐํํ๋ ์คํ ๊ฐ๋ฅํ ์ ์ด ๋ฐ ๋ชจ๋ฒ ์ฌ๋ก๋ฅผ ๋ฐฐ์๋๋ค.
ํ์ต ๋ชฉํ
์ด ์์ ์ ๋ง์น๋ฉด ๋ค์์ ์ํํ ์ ์์ต๋๋ค:
MCP ๋ณด์ ์ํคํ ์ฒ ๋ฐ ์ ์ด
์ต์ MCP ๊ตฌํ์ ์ ํต์ ์ธ ์ํํธ์จ์ด ๋ณด์๊ณผ AI ํนํ ์ํ์ ๋ชจ๋ ํด๊ฒฐํ๋ ๋ค์ธต ๋ณด์ ์ ๊ทผ๋ฒ์ ํ์๋ก ํฉ๋๋ค. ๋น ๋ฅด๊ฒ ์งํํ๋ MCP ๋ช ์ธ๋ ๋ณด์ ์ ์ด๋ฅผ ์ง์์ ์ผ๋ก ์ฑ์์์ผ ๊ธฐ์ ๋ณด์ ์ํคํ ์ฒ์ ๊ฒ์ฆ๋ ๋ชจ๋ฒ ์ฌ๋ก์์ ํตํฉ์ ๊ฐ์ ํฉ๋๋ค.
ํ์ฌ ๋ณด์ ํ๊ฒฝ
> ์ฐธ๊ณ : ์ด ์ ๋ณด๋ 2026๋ 2์ 5์ผ ๊ธฐ์ค MCP ๋ณด์ ํ์ค์ ๋ฐ์ํ๋ฉฐ, MCP Specification 2025-11-25์ ์ผ์นํฉ๋๋ค.
MCP ํ๋กํ ์ฝ์ ๋น ๋ฅด๊ฒ ์งํํ๊ณ ์์ผ๋ฉฐ, ํฅํ ๊ตฌํ์์๋ ์๋ก์ด ์ธ์ฆ ํจํด๊ณผ ๊ฐํ๋ ์ ์ด๊ฐ ๋์ ๋ ์ ์์ต๋๋ค.
ํญ์ ์ต์ ์ง์นจ์ MCP Specification, MCP GitHub ์ ์ฅ์, ๋ณด์ ๋ชจ๋ฒ ์ฌ๋ก ๋ฌธ์๋ฅผ ์ฐธ์กฐํ์ธ์.
๐๏ธ MCP ๋ณด์ ์ ์ ํ์ ์ํฌ์ (Sherpa)
์ค๋ฌดํ ๋ณด์ ๊ต์ก์ ์ํด์๋ Microsoft Azure์์ MCP ์๋ฒ ๋ณด์์ ์ํ ํฌ๊ด์ ๊ฒฝ๋ก๋ฅผ ์ ๊ณตํ๋ MCP Security Summit Workshop (Sherpa)๋ฅผ ๊ฐ๋ ฅํ ๊ถ์ฅํฉ๋๋ค.
์ํฌ์ ๊ฐ์
ํํ ๊ฒฝ๋ก
์์ํ๊ธฐ: https://azure-samples.github.io/sherpa/
OWASP MCP Top 10 ๋ณด์ ์ํ
MCP ์ธ์ฆ ์งํ
MCP ๋ช ์ธ๋ ์ธ์ฆ ๋ฐ ๊ถํ ๋ถ์ฌ ์ ๊ทผ๋ฒ์์ ์๋นํ ์งํ๋ฅผ ๊ฒช์์ต๋๋ค:
์ธ์ฆ ๋ฐ ๊ถํ ๋ถ์ฌ ๋ณด์
ํ์ฌ ๋ณด์ ๋ฌธ์
ํ๋ MCP ๊ตฌํ์ ๋ค์๊ณผ ๊ฐ์ ์ธ์ฆ ๋ฐ ๊ถํ ๋ถ์ฌ ๋ฌธ์ ์ ์ง๋ฉดํด ์์ต๋๋ค:
์ํ ๋ฐ ์ํ ๋ฒกํฐ
ํ ํฐ ์ ๋ฌ: ์ฌ๊ฐํ ์ํฐ ํจํด
ํ์ฌ MCP ๊ถํ ๋ถ์ฌ ๋ช ์ธ์์๋ ํ ํฐ ์ ๋ฌ์ด ๋ช ๋ฐฑํ ๊ธ์ง๋์ด ์์ต๋๋ค. ์ด๋ ์ฌ๊ฐํ ๋ณด์ ๋ฌธ์ ๋ฅผ ์ผ๊ธฐํ๊ธฐ ๋๋ฌธ์ ๋๋ค:
##### ๋ณด์ ์ ์ด ์ฐํ
##### ์ฑ ์ ์ถ์ ๋ฐ ๊ฐ์ฌ ๋ฌธ์
##### ๋ฐ์ดํฐ ์ ์ถ ์ํ
##### ๋ค์ค ์๋น์ค ๊ณต๊ฒฉ ๋ฒกํฐ
๋ณด์ ์ ์ด ๋ฐ ์ํ์ฑ
์ค์ ๋ณด์ ์๊ตฌ ์ฌํญ:
> ์๋ฌด ์ฌํญ: MCP ์๋ฒ๋ ๋ช ์์ ์ผ๋ก MCP ์๋ฒ๋ฅผ ์ํด ๋ฐํ๋ ํ ํฐ๋ง ํ์ฉํด์ผ ํฉ๋๋ค
์ธ์ฆ ๋ฐ ๊ถํ ๋ถ์ฌ ์ ์ด
- ๊ตฌํ ๊ฐ์ด๋: Azure API Management๋ฅผ MCP ์๋ฒ ์ธ์ฆ ๊ฒ์ดํธ์จ์ด๋ก ์ฌ์ฉ
- ID ํตํฉ: Microsoft Entra ID๋ฅผ MCP ์๋ฒ ์ธ์ฆ์ ์ฌ์ฉํ๊ธฐ
- ํ ํฐ ๋์ ์ฒญ๊ตฌ๊ฐ MCP ์๋ฒ ID์ ์ผ์นํ๋์ง ํ์ธ
- ์ ์ ํ ํ ํฐ ๊ฐฑ์ ๋ฐ ๋ง๋ฃ ์ ์ฑ ๊ตฌํ
- ์ฌ์ฌ์ฉ ๊ณต๊ฒฉ ๋ฐ ๋ฌด๋จ ์ฌ์ฉ ๋ฐฉ์ง
- ๋ชจ๋ฒ ์ฌ๋ก: ํ ํฐ ์ ์ฅ ๋ฐ ์ํธํ ๊ฐ์ด๋๋ผ์ธ
์ ๊ทผ ์ ์ด ๊ตฌํ
- ์ ๊ธฐ์ ๊ถํ ๊ฒํ ๋ฐ ๊ถํ ์์น ๋ฐฉ์ง
- Microsoft ๋ฌธ์: ์์ ํ ์ต์ ๊ถํ ์ ๊ทผ
- ์ญํ ์ ํน์ ์์ ๋ฐ ์์ ์ ์๊ฒฉํ ์ ํ
- ๊ณต๊ฒฉ ๋ฒ์๋ฅผ ํ๋ํ๋ ๊ณผ๋ํ๊ฑฐ๋ ๋ถํ์ํ ๊ถํ ๋ถ์ฌ ๊ธ์ง
- ๋น์ ์ ๊ถํ ์ฌ์ฉ ํจํด ๊ฐ์
- ๊ณผ๋ํ๊ฑฐ๋ ๋ฏธ์ฌ์ฉ ๊ถํ ์ ์ ๋ณด์
AI ํนํ ๋ณด์ ์ํ
ํ๋กฌํํธ ์ฃผ์ ๋ฐ ๋๊ตฌ ์กฐ์ ๊ณต๊ฒฉ
์ต์ MCP ๊ตฌํ์ ์ ํต ๋ณด์ ์กฐ์น๋ก๋ ์์ ํ ๋ฐฉ์ด ๋ชป ํ๋ ์ ๊ตํ AI ํน์ ๊ณต๊ฒฉ ๋ฒกํฐ์ ์ง๋ฉดํด ์์ต๋๋ค:
๊ฐ์ ํ๋กฌํํธ ์ฃผ์ (ํฌ๋ก์ค ๋๋ฉ์ธ ํ๋กฌํํธ ์ฃผ์ )
๊ฐ์ ํ๋กฌํํธ ์ฃผ์ ์ MCP ๊ธฐ๋ฐ AI ์์คํ ์์ ๊ฐ์ฅ ์ฌ๊ฐํ ์ทจ์ฝ์ ์ค ํ๋์ ๋๋ค. ๊ณต๊ฒฉ์๋ ๋ฌธ์, ์น ํ์ด์ง, ์ด๋ฉ์ผ, ๋ฐ์ดํฐ ์์ค ๋ฑ ์ธ๋ถ ์ฝํ ์ธ ์ ์ ์ฑ ๋ช ๋ น์ ์จ๊ธฐ๊ณ AI ์์คํ ์ด ์ด๋ฅผ ํฉ๋ฒ ๋ช ๋ น์ผ๋ก ์ฒ๋ฆฌํ๋๋ก ์ ๋ํฉ๋๋ค.
๊ณต๊ฒฉ ์๋๋ฆฌ์ค:
์ค์ ์ํฅ: ๋ฐ์ดํฐ ์ ์ถ, ๊ฐ์ธ์ ๋ณด ์นจํด, ์ ํด ์ฝํ ์ธ ์์ฑ, ์ฌ์ฉ์ ์ํธ์์ฉ ์กฐ์ ๋ฑ์ผ๋ก ์ด์ด์ง ์ ์์ต๋๋ค. ์์ธํ ๋ถ์์ Prompt Injection in MCP (Simon Willison) ์ฐธ๊ณ ํ์ญ์์ค.
๋๊ตฌ ์ค์ผ ๊ณต๊ฒฉ
๋๊ตฌ ์ค์ผ์ MCP ๋๊ตฌ๋ฅผ ์ ์ํ๋ ๋ฉํ๋ฐ์ดํฐ๋ฅผ ํ๊ฒ์ผ๋ก ํ๋ฉฐ, LLM์ด ๋๊ตฌ ์ค๋ช ๊ณผ ๋งค๊ฐ๋ณ์๋ฅผ ํด์ํด ์คํ ๊ฒฐ์ ์ ๋ด๋ฆฌ๋ ๋ฐฉ์์ ์ ์ฉํฉ๋๋ค.
๊ณต๊ฒฉ ๋ฉ์ปค๋์ฆ:
ํธ์คํ ์๋ฒ ์ํ: ์๊ฒฉ MCP ์๋ฒ๋ ๋๊ตฌ ์ ์๋ฅผ ์ด๊ธฐ ์น์ธ ํ์๋ ์ ๋ฐ์ดํธํ ์ ์์ด, ์ด์ ์ ์์ ํ๋ ๋๊ตฌ๊ฐ ์ ์ฑ์ผ๋ก ๋ณํ ์ํ ์กด์ฌ.
์์ธํ ๋ถ์์ Tool Poisoning Attacks (Invariant Labs) ์ฐธ๊ณ ํ์ญ์์ค.
์ถ๊ฐ AI ๊ณต๊ฒฉ ๋ฒกํฐ
AI ๋ณด์ ์ํ ์ํฅ
๋์ ์ํฅ์ ๊ฒฐ๊ณผ:
Microsoft AI ๋ณด์ ์๋ฃจ์
AI ํ๋กฌํํธ ์ด๋: ์ฃผ์ ๊ณต๊ฒฉ์ ๋ํ ๊ณ ๊ธ ๋ฐฉ์ด
Microsoft AI ํ๋กฌํํธ ์ด๋๋ ์ง์ ์ ๋ฐ ๊ฐ์ ์ ํ๋กฌํํธ ์ฃผ์ ๊ณต๊ฒฉ์ ๋ํด ๋ค์ค ๋ณด์ ๊ณ์ธต์ ํตํ ํฌ๊ด์ ์ธ ๋ฐฉ์ด๋ฅผ ์ ๊ณตํฉ๋๋ค:
##### ํต์ฌ ๋ณดํธ ๋ฉ์ปค๋์ฆ:
1. ๊ณ ๊ธ ํ์ง ๋ฐ ํํฐ๋ง
- ๋จธ์ ๋ฌ๋ ์๊ณ ๋ฆฌ์ฆ๊ณผ ์์ฐ์ด ์ฒ๋ฆฌ ๊ธฐ์ ๋ก ์ธ๋ถ ์ปจํ ์ธ ๋ด ์ ์์ ๋ช ๋ น ํ์ง
- ๋ฌธ์, ์น ํ์ด์ง, ์ด๋ฉ์ผ, ๋ฐ์ดํฐ ์์ค์์ ๋ด์ฅ ์ํ์ ์ค์๊ฐ ๋ถ์
- ์ ์์ ํ๋กฌํํธ ํจํด๊ณผ ์ ์์ ํจํด์ ๋งฅ๋ฝ์ ์ดํด
2. ์คํฌํธ๋ผ์ดํ ๊ธฐ๋ฒ
- ์ ๋ขฐ๋ ์์คํ ๋ช ๋ น๊ณผ ์ ์ฌ์ ์ผ๋ก ์์๋ ์ธ๋ถ ์ ๋ ฅ ๊ตฌ๋ถ
- ๋ชจ๋ธ ์ ํฉ๋๋ฅผ ๋์ด๋ฉด์ ์ ์ฑ ์ปจํ ์ธ ๋ฅผ ๋ถ๋ฆฌํ๋ ํ ์คํธ ๋ณํ ๋ฐฉ๋ฒ
- AI ์์คํ ์ด ๋ช ๋ น ๊ณ์ธต์ ์ฌ๋ฐ๋ฅด๊ฒ ์ ์งํ๊ณ ์ฃผ์ ๋ ๋ช ๋ น ๋ฌด์ ์ง์
3. ๊ตฌ๋ถ์ ๋ฐ ๋ฐ์ดํฐ๋งํน ์์คํ
- ์ ๋ขฐ๋ ์์คํ ๋ฉ์์ง์ ์ธ๋ถ ์ ๋ ฅ ํ ์คํธ ๊ฐ ๋ช ํํ ๊ฒฝ๊ณ ์ ์
- ์ ๋ขฐ๋ ์์ค์ ์ ๋ขฐ๋์ง ์์ ๋ฐ์ดํฐ ์์ค ๊ฐ ๊ฒฝ๊ณ๋ฅผ ๊ฐ์กฐํ๋ ํน์ ๋ง์ปค
- ๋ช ๋ น ํผ๋๊ณผ ๋ฌด๋จ ๋ช ๋ น ์คํ ๋ฐฉ์ง ์ํ ๋ช ํํ ๋ถ๋ฆฌ
4. ์ง์์ ์ธ ์ํ ์ธํ ๋ฆฌ์ ์ค
- Microsoft๋ ์ง์์ ์ผ๋ก ์๋ก์ด ๊ณต๊ฒฉ ํจํด์ ๋ชจ๋ํฐ๋งํ๊ณ ๋ฐฉ์ด์ฑ ์ ์ ๋ฐ์ดํธ
- ์๋ก์ด ์ฃผ์ ๊ธฐ๋ฒ ๋ฐ ๊ณต๊ฒฉ ๋ฒกํฐ์ ๋ํ ์ ์ ์ ์ํ ํ์
- ์งํํ๋ ์ํ์ ๋์ํ๋ ๋ณด์ ๋ชจ๋ธ ์ ๊ธฐ ์ ๋ฐ์ดํธ
5. Azure ์ฝํ ์ธ ์์ ํตํฉ
- ์ข ํฉ Azure AI ์ฝํ ์ธ ์์ ์ ํ๊ตฐ์ ์ผ๋ถ
- ํ์ฅ ์๋, ์ ํด ์ฝํ ์ธ ๋ฐ ๋ณด์ ์ ์ฑ ์๋ฐ์ ๋ํ ์ถ๊ฐ ํ์ง
- AI ์ ํ๋ฆฌ์ผ์ด์ ๊ตฌ์ฑ์์ ์ ๋ฐ์ ๊ฑธ์น ํตํฉ ๋ณด์ ์ ์ด
๊ตฌํ ๋ฆฌ์์ค: Microsoft Prompt Shields Documentation
๊ณ ๊ธ MCP ๋ณด์ ์ํ
์ธ์ ํ์ด์ฌํน ์ทจ์ฝ์
์ธ์ ํ์ด์ฌํน์ ์ํ ์ ๋ณด๋ฅผ ๊ฐ์ง MCP ๊ตฌํ์์ ์ค์ํ ๊ณต๊ฒฉ ๋ฒกํฐ๋ก, ๊ถํ ์๋ ์ฌ์ฉ์๊ฐ ์ ๋นํ ์ธ์ ์๋ณ์๋ฅผ ํ๋ํด ํด๋ผ์ด์ธํธ๋ฅผ ๊ฐ์ฅํ๊ณ ๋ฌด๋จ ํ๋์ ์ํํ๋ ํ์์ ๋๋ค.
๊ณต๊ฒฉ ์๋๋ฆฌ์ค ๋ฐ ์ํ
์ธ์ ๊ด๋ฆฌ ๋ณด์ ์ ์ด
์ค์ ์๊ตฌ์ฌํญ:
: ๊ฐ์ ํฌ๋งท์ผ๋ก ์ฌ์ฉ์๋ณ๋ก ์ธ์
ID ๋ฐ์ธ๋ฉ ํผ๋๋ ๋๋ฆฌ์ธ ๋ฌธ์
ํผ๋๋ ๋๋ฆฌ์ธ ๋ฌธ์ ๋ MCP ์๋ฒ๊ฐ ํด๋ผ์ด์ธํธ์ ์ 3์ ์๋น์ค ์ฌ์ด ์ธ์ฆ ํ๋ก์ ์ญํ ์ ํ ๋ ๋ฐ์ํ๋ฉฐ, ์ ์ ํด๋ผ์ด์ธํธ ID ์ ์ฉ์ ํตํ ๊ถํ ์ฐํ ๊ธฐํ๋ฅผ ๋ง๋ญ๋๋ค.
๊ณต๊ฒฉ ๋ฉ์ปค๋์ฆ ๋ฐ ์ํ
์ํ ์ ๋ต
ํ์ ์ ์ด:
ํ ํฐ ์ ๋ฌ ์ทจ์ฝ์
ํ ํฐ ์ ๋ฌ์ MCP ์๋ฒ๊ฐ ํด๋ผ์ด์ธํธ ํ ํฐ์ ์ ์ ํ ๊ฒ์ฆ ์์ด ์๋ฝํ๊ณ ํ์ API์ ์ ๋ฌํ๋ ๋ช ๋ฐฑํ ๋ฐํจํด์ผ๋ก, MCP ๊ถํ ์ฌ์์ ์๋ฐํฉ๋๋ค.
๋ณด์ ์ํฅ
ํ์ ๋ณด์ ์ ์ด
๋นํ์ ์๊ตฌ์ฌํญ:
AI ์์คํ ๊ณต๊ธ๋ง ๋ณด์
๊ณต๊ธ๋ง ๋ณด์์ ์ ํต์ ์ธ ์ํํธ์จ์ด ์ข ์์ฑ์ ๋์ด AI ์ํ๊ณ ์ ์ฒด๋ฅผ ํฌ๊ดํฉ๋๋ค. ์ต์ MCP ๊ตฌํ์ AI ๊ด๋ จ ๋ชจ๋ ๊ตฌ์ฑ์์๋ฅผ ์๊ฒฉํ ๊ฒ์ฆ ๋ฐ ๋ชจ๋ํฐ๋งํด์ผ ํ๋ฉฐ, ๊ฐ ์์๋ ์์คํ ๋ฌด๊ฒฐ์ฑ์ ์์์ํฌ ์ ์ฌ์ ์ทจ์ฝ์ ์ ๋ดํฌํฉ๋๋ค.
ํ๋๋ AI ๊ณต๊ธ๋ง ๊ตฌ์ฑ์์
์ ํต์ ์ํํธ์จ์ด ์ข ์์ฑ:
AI ์ ์ฉ ๊ณต๊ธ๋ง ์์:
ํฌ๊ด์ ์ธ ๊ณต๊ธ๋ง ๋ณด์ ์ ๋ต
๊ตฌ์ฑ์์ ๊ฒ์ฆ ๋ฐ ์ ๋ขฐ
์์ ํ ๋ฐฐํฌ ํ์ดํ๋ผ์ธ
์ง์์ ๋ชจ๋ํฐ๋ง ๋ฐ ๋์
์ ๊ทผ ์ ์ด ๋ฐ ์ต์ ๊ถํ ์์น
์ฌ๊ฑด ๋์ ๋ฐ ๋ณต๊ตฌ
Microsoft ๋ณด์ ๋๊ตฌ ๋ฐ ํตํฉ
GitHub Advanced Security๋ ๋ค์๊ณผ ๊ฐ์ ํฌ๊ด์ ๊ณต๊ธ๋ง ๋ณดํธ ๊ธฐ๋ฅ ์ ๊ณต:
Azure DevOps ๋ฐ Azure Repos ํตํฉ:
Microsoft ๋ด๋ถ ๊ดํ:
Microsoft๋ ๋ชจ๋ ์ ํ์์ ๊ด๋ฒ์ํ ๊ณต๊ธ๋ง ๋ณด์ ๊ดํ์ ๊ตฌํํ๊ณ ์์ต๋๋ค.
์์ธํ ๋ด์ฉ์ The Journey to Secure the Software Supply Chain at Microsoft์์ ํ์ธํ์ธ์.
๊ธฐ์ด ๋ณด์ ๋ชจ๋ฒ ์ฌ๋ก
MCP ๊ตฌํ์ ์กฐ์ง์ ๊ธฐ์กด ๋ณด์ ํ์ธ๋ฅผ ์์ ๋ฐ ํ์ฅํฉ๋๋ค. ๊ธฐ์ด ๋ณด์ ๊ดํ์ ๊ฐํํ๋ฉด AI ์์คํ ๋ฐ MCP ๋ฐฐํฌ์ ์ ๋ฐ์ ๋ณด์์ ํฌ๊ฒ ํฅ์ํ ์ ์์ต๋๋ค.
ํต์ฌ ๋ณด์ ๊ธฐ๋ณธ ์์น
์์ ํ ๊ฐ๋ฐ ๊ดํ
์ธํ๋ผ ๊ตฌ์กฐ ๊ฐํ
๋ณด์ ๋ชจ๋ํฐ๋ง ๋ฐ ํ์ง
์ ๋ก ํธ๋ฌ์คํธ ์ํคํ ์ฒ
์ํฐํ๋ผ์ด์ฆ ํตํฉ ํจํด
Microsoft ๋ณด์ ์ํ๊ณ ํตํฉ
์ค์ ๋ฐ ๊ฑฐ๋ฒ๋์ค
์ด๋ฌํ ๊ธฐ์ด ๊ดํ์ MCP ํนํ ๋ณด์ ์ ์ด์ ํจ์จ์ฑ์ ๋์ด๊ณ AI ๊ธฐ๋ฐ ์ ํ๋ฆฌ์ผ์ด์ ์ ๋ํ ํฌ๊ด์ ๋ณดํธ ๊ธฐ๋ฐ์ ๋ง๋ จํฉ๋๋ค.
์ฃผ์ ๋ณด์ ์์ฌ์
ํฌ๊ด์ ์๋ฃ
๊ณต์ MCP ๋ณด์ ๋ฌธ์
OWASP MCP ๋ณด์ ์๋ฃ
๋ณด์ ํ์ค ๋ฐ ๋ชจ๋ฒ ์ฌ๋ก
AI ๋ณด์ ์ฐ๊ตฌ ๋ฐ ๋ถ์
๋ง์ดํฌ๋ก์ํํธ ๋ณด์ ์๋ฃจ์
๊ตฌํ ๊ฐ์ด๋ ๋ฐ ํํ ๋ฆฌ์ผ
DevOps ๋ฐ ๊ณต๊ธ๋ง ๋ณด์
์ถ๊ฐ ๋ณด์ ๋ฌธ์
ํฌ๊ด์ ๋ณด์ ์ง์นจ์ ๋ณธ ์น์ ์ ์ ๋ฌธ ๋ฌธ์๋ฅผ ์ฐธ์กฐํ์ญ์์ค:
์ค์ต ๋ณด์ ๊ต์ก
---
๋ค์ ๋จ๊ณ
๋ค์: 3์ฅ: ์์ํ๊ธฐ
---
๋ฉด์ฑ ์กฐํญ:
์ด ๋ฌธ์๋ AI ๋ฒ์ญ ์๋น์ค Co-op Translator๋ฅผ ์ฌ์ฉํ์ฌ ๋ฒ์ญ๋์์ต๋๋ค.
์ ํ์ฑ์ ์ํด ์ต์ ์ ๋คํ๊ณ ์์ง๋ง, ์๋ ๋ฒ์ญ์๋ ์ค๋ฅ๋ ๋ถ์ ํํ ๋ด์ฉ์ด ํฌํจ๋ ์ ์์์ ์ ์ํ์๊ธฐ ๋ฐ๋๋๋ค.
์๋ฌธ ๋ฌธ์๋ ํด๋น ์ธ์ด์ ๊ถ์ ์๋ ์ถ์ฒ๋ก ๊ฐ์ฃผ๋์ด์ผ ํฉ๋๋ค.
์ค์ํ ์ ๋ณด์ ๊ฒฝ์ฐ ์ ๋ฌธ์ ์ธ ์ธ๊ฐ ๋ฒ์ญ์ ๊ถ์ฅํฉ๋๋ค.
๋ณธ ๋ฒ์ญ ์ฌ์ฉ์ผ๋ก ์ธํด ๋ฐ์ํ๋ ์คํด๋ ํด์์์ ๋ฌธ์ ์ ๋ํด์๋ ๋น์ฌ๊ฐ ์ฑ ์์ง์ง ์์ต๋๋ค.