extension MCP Curriculum
translate KO / EN
code Module 06

Community Contributions

Community and Contributions

_(Click the image above to view video of this lesson)_

Overview

This lesson focuses on how to engage with the MCP community, contribute to the MCP ecosystem, and follow best practices for collaborative development.

Understanding how to participate in open-source MCP projects is essential for those looking to shape the future of this technology.

Learning Objectives

By the end of this lesson, you will be able to:

  • Understand the structure of the MCP community and ecosystem
  • Participate effectively in MCP community forums and discussions
  • Contribute to MCP open-source repositories
  • Create and share custom MCP tools and servers
  • Follow best practices for MCP development and collaboration
  • Discover community resources and frameworks for MCP development
  • The MCP Community Ecosystem

    The MCP ecosystem consists of various components and participants that work together to advance the protocol.

    Key Community Components

    1. Core Protocol Maintainers: The official Model Context Protocol GitHub organization maintains the core MCP specifications and reference implementations

    2. Tool Developers: Individuals and teams that create MCP tools and servers

    3. Integration Providers: Companies that integrate MCP into their products and services

    4. End Users: Developers and organizations that use MCP in their applications

    5. Contributors: Community members who contribute code, documentation, or other resources

    Community Resources

    Official Channels
  • MCP GitHub Organization
  • MCP Documentation
  • MCP Specification
  • GitHub Discussions
  • MCP Examples & Servers Repository
  • Community-Driven Resources
  • MCP Clients - List of clients that support MCP integrations
  • Community MCP Servers - Growing list of community-developed MCP servers
  • Awesome MCP Servers - Curated list of MCP servers
  • PulseMCP - Community hub & newsletter for discovering MCP resources
  • Discord Server - Connect with MCP developers
  • Language-specific SDK implementations
  • Blog posts and tutorials
  • Contributing to MCP

    Types of Contributions

    The MCP ecosystem welcomes various types of contributions:

    1. Code Contributions:

    - Core protocol enhancements

    - Bug fixes

    - Tool and server implementations

    - Client/server libraries in different languages

    2. Documentation:

    - Improving existing documentation

    - Creating tutorials and guides

    - Translating documentation

    - Creating examples and sample applications

    3. Community Support:

    - Answering questions on forums and discussions

    - Testing and reporting issues

    - Organizing community events

    - Mentoring new contributors

    Contribution Process: Core Protocol

    To contribute to the core MCP protocol or official implementations, follow these principles from the official contributing guidelines:

    1. Simplicity and Minimalism: The MCP specification maintains a high bar for adding new concepts. It's easier to add things to a specification than to remove them.

    2. Concrete Approach: Specification changes should be based on specific implementation challenges, not speculative ideas.

    3. Stages of a Proposal:

    - Define: Explore the problem space, validate that other MCP users face a similar issue

    - Prototype: Build an example solution and demonstrate its practical application

    - Write: Based on the prototype, write a specification proposal

    Development Environment Setup

    
    # Fork the repository
    
    git clone https://github.com/YOUR-USERNAME/modelcontextprotocol.git
    
    cd modelcontextprotocol
    
    
    
    # Install dependencies
    
    npm install
    
    
    
    # For schema changes, validate and generate schema.json:
    
    npm run check:schema:ts
    
    npm run generate:schema
    
    
    
    # For documentation changes
    
    npm run check:docs
    
    npm run format
    
    
    
    # Preview documentation locally (optional):
    
    npm run serve:docs
    
    

    Example: Contributing a Bug Fix

    
    // Original code with bug in the typescript-sdk
    
    export function validateResource(resource: unknown): resource is MCPResource {
    
      if (!resource || typeof resource !== 'object') {
    
        return false;
    
      }
    
      
    
      // Bug: Missing property validation
    
      // Current implementation:
    
      const hasName = 'name' in resource;
    
      const hasSchema = 'schema' in resource;
    
      
    
      return hasName && hasSchema;
    
    }
    
    
    
    // Fixed implementation in a contribution
    
    export function validateResource(resource: unknown): resource is MCPResource {
    
      if (!resource || typeof resource !== 'object') {
    
        return false;
    
      }
    
      
    
      // Improved validation
    
      const hasName = 'name' in resource && typeof (resource as MCPResource).name === 'string';
    
      const hasSchema = 'schema' in resource && typeof (resource as MCPResource).schema === 'object';
    
      const hasDescription = !('description' in resource) || typeof (resource as MCPResource).description === 'string';
    
      
    
      return hasName && hasSchema && hasDescription;
    
    }
    
    

    Example: Contributing a New Tool to the Standard Library

    
    # Example contribution: A CSV data processing tool for the MCP standard library
    
    
    
    from mcp_tools import Tool, ToolRequest, ToolResponse, ToolExecutionException
    
    import pandas as pd
    
    import io
    
    import json
    
    from typing import Dict, Any, List, Optional
    
    
    
    class CsvProcessingTool(Tool):
    
        """
    
        Tool for processing and analyzing CSV data.
    
        
    
        This tool allows models to extract information from CSV files,
    
        run basic analysis, and convert data between formats.
    
        """
    
        
    
        def get_name(self):
    
            return "csvProcessor"
    
            
    
        def get_description(self):
    
            return "Processes and analyzes CSV data"
    
        
    
        def get_schema(self):
    
            return {
    
                "type": "object",
    
                "properties": {
    
                    "csvData": {
    
                        "type": "string", 
    
                        "description": "CSV data as a string"
    
                    },
    
                    "csvUrl": {
    
                        "type": "string",
    
                        "description": "URL to a CSV file (alternative to csvData)"
    
                    },
    
                    "operation": {
    
                        "type": "string",
    
                        "enum": ["summary", "filter", "transform", "convert"],
    
                        "description": "Operation to perform on the CSV data"
    
                    },
    
                    "filterColumn": {
    
                        "type": "string",
    
                        "description": "Column to filter by (for filter operation)"
    
                    },
    
                    "filterValue": {
    
                        "type": "string",
    
                        "description": "Value to filter for (for filter operation)"
    
                    },
    
                    "outputFormat": {
    
                        "type": "string",
    
                        "enum": ["json", "csv", "markdown"],
    
                        "default": "json",
    
                        "description": "Output format for the processed data"
    
                    }
    
                },
    
                "oneOf": [
    
                    {"required": ["csvData", "operation"]},
    
                    {"required": ["csvUrl", "operation"]}
    
                ]
    
            }
    
        
    
        async def execute_async(self, request: ToolRequest) -> ToolResponse:
    
            try:
    
                # Extract parameters
    
                operation = request.parameters.get("operation")
    
                output_format = request.parameters.get("outputFormat", "json")
    
                
    
                # Get CSV data from either direct data or URL
    
                df = await self._get_dataframe(request)
    
                
    
                # Process based on requested operation
    
                result = {}
    
                
    
                if operation == "summary":
    
                    result = self._generate_summary(df)
    
                elif operation == "filter":
    
                    column = request.parameters.get("filterColumn")
    
                    value = request.parameters.get("filterValue")
    
                    if not column:
    
                        raise ToolExecutionException("filterColumn is required for filter operation")
    
                    result = self._filter_data(df, column, value)
    
                elif operation == "transform":
    
                    result = self._transform_data(df, request.parameters)
    
                elif operation == "convert":
    
                    result = self._convert_format(df, output_format)
    
                else:
    
                    raise ToolExecutionException(f"Unknown operation: {operation}")
    
                
    
                return ToolResponse(result=result)
    
            
    
            except Exception as e:
    
                raise ToolExecutionException(f"CSV processing failed: {str(e)}")
    
        
    
        async def _get_dataframe(self, request: ToolRequest) -> pd.DataFrame:
    
            """Gets a pandas DataFrame from either CSV data or URL"""
    
            if "csvData" in request.parameters:
    
                csv_data = request.parameters.get("csvData")
    
                return pd.read_csv(io.StringIO(csv_data))
    
            elif "csvUrl" in request.parameters:
    
                csv_url = request.parameters.get("csvUrl")
    
                return pd.read_csv(csv_url)
    
            else:
    
                raise ToolExecutionException("Either csvData or csvUrl must be provided")
    
        
    
        def _generate_summary(self, df: pd.DataFrame) -> Dict[str, Any]:
    
            """Generates a summary of the CSV data"""
    
            return {
    
                "columns": df.columns.tolist(),
    
                "rowCount": len(df),
    
                "columnCount": len(df.columns),
    
                "numericColumns": df.select_dtypes(include=['number']).columns.tolist(),
    
                "categoricalColumns": df.select_dtypes(include=['object']).columns.tolist(),
    
                "sampleRows": json.loads(df.head(5).to_json(orient="records")),
    
                "statistics": json.loads(df.describe().to_json())
    
            }
    
        
    
        def _filter_data(self, df: pd.DataFrame, column: str, value: str) -> Dict[str, Any]:
    
            """Filters the DataFrame by a column value"""
    
            if column not in df.columns:
    
                raise ToolExecutionException(f"Column '{column}' not found")
    
                
    
            filtered_df = df[df[column].astype(str).str.contains(value)]
    
            
    
            return {
    
                "originalRowCount": len(df),
    
                "filteredRowCount": len(filtered_df),
    
                "data": json.loads(filtered_df.to_json(orient="records"))
    
            }
    
        
    
        def _transform_data(self, df: pd.DataFrame, params: Dict[str, Any]) -> Dict[str, Any]:
    
            """Transforms the data based on parameters"""
    
            # Implementation would include various transformations
    
            return {
    
                "status": "success",
    
                "message": "Transformation applied"
    
            }
    
        
    
        def _convert_format(self, df: pd.DataFrame, format: str) -> Dict[str, Any]:
    
            """Converts the DataFrame to different formats"""
    
            if format == "json":
    
                return {
    
                    "data": json.loads(df.to_json(orient="records")),
    
                    "format": "json"
    
                }
    
            elif format == "csv":
    
                return {
    
                    "data": df.to_csv(index=False),
    
                    "format": "csv"
    
                }
    
            elif format == "markdown":
    
                return {
    
                    "data": df.to_markdown(),
    
                    "format": "markdown"
    
                }
    
            else:
    
                raise ToolExecutionException(f"Unsupported output format: {format}")
    
    

    Contribution Guidelines

    To make a successful contribution to MCP projects:

    1. Start Small: Begin with documentation, bug fixes, or small enhancements

    2. Follow the Style Guide: Adhere to the coding style and conventions of the project

    3. Write Tests: Include unit tests for your code contributions

    4. Document Your Work: Add clear documentation for new features or changes

    5. Submit Targeted PRs: Keep pull requests focused on a single issue or feature

    6. Engage with Feedback: Be responsive to feedback on your contributions

    Example Contribution Workflow

    
    # Clone the repository
    
    git clone https://github.com/modelcontextprotocol/typescript-sdk.git
    
    cd typescript-sdk
    
    
    
    # Create a new branch for your contribution
    
    git checkout -b feature/my-contribution
    
    
    
    # Make your changes
    
    # ...
    
    
    
    # Run tests to ensure your changes don't break existing functionality
    
    npm test
    
    
    
    # Commit your changes with a descriptive message
    
    git commit -am "Fix validation in resource handler"
    
    
    
    # Push your branch to your fork
    
    git push origin feature/my-contribution
    
    
    
    # Create a pull request from your branch to the main repository
    
    # Then engage with feedback and iterate on your PR as needed
    
    

    Creating and Sharing MCP Servers

    One of the most valuable ways to contribute to the MCP ecosystem is by creating and sharing custom MCP servers. The community has already developed hundreds of servers for various services and use cases.

    MCP Server Development Frameworks

    Several frameworks are available to simplify MCP server development:

    1. Official SDKs (aligned with MCP Specification 2025-11-25):

    - TypeScript SDK

    - Python SDK

    - C# SDK

    - Go SDK

    - Java SDK

    - Kotlin SDK

    - Swift SDK

    - Rust SDK

    2. Community Frameworks:

    - MCP-Framework - Build MCP servers with elegance and speed in TypeScript

    - MCP Declarative Java SDK - Annotation-driven MCP servers with Java

    - Quarkus MCP Server SDK - Java framework for MCP servers

    - Next.js MCP Server Template - Starter Next.js project for MCP servers

    Developing Shareable Tools

    .NET Example: Creating a Shareable Tool Package
    
    // Create a new .NET library project
    
    // dotnet new classlib -n McpFinanceTools
    
    
    
    using Microsoft.Mcp.Tools;
    
    using System.Threading.Tasks;
    
    using System.Net.Http;
    
    using System.Text.Json;
    
    
    
    namespace McpFinanceTools
    
    {
    
        // Stock quote tool
    
        public class StockQuoteTool : IMcpTool
    
        {
    
            private readonly HttpClient _httpClient;
    
            
    
            public StockQuoteTool(HttpClient httpClient = null)
    
            {
    
                _httpClient = httpClient ?? new HttpClient();
    
            }
    
            
    
            public string Name => "stockQuote";
    
            public string Description => "Gets current stock quotes for specified symbols";
    
            
    
            public object GetSchema()
    
            {
    
                return new {
    
                    type = "object",
    
                    properties = new {
    
                        symbol = new { 
    
                            type = "string",
    
                            description = "Stock symbol (e.g., MSFT, AAPL)" 
    
                        },
    
                        includeHistory = new { 
    
                            type = "boolean",
    
                            description = "Whether to include historical data",
    
                            default = false
    
                        }
    
                    },
    
                    required = new[] { "symbol" }
    
                };
    
            }
    
            
    
            public async Task<ToolResponse> ExecuteAsync(ToolRequest request)
    
            {
    
                // Extract parameters
    
                string symbol = request.Parameters.GetProperty("symbol").GetString();
    
                bool includeHistory = false;
    
                
    
                if (request.Parameters.TryGetProperty("includeHistory", out var historyProp))
    
                {
    
                    includeHistory = historyProp.GetBoolean();
    
                }
    
                
    
                // Call external API (example)
    
                var quoteResult = await GetStockQuoteAsync(symbol);
    
                
    
                // Add historical data if requested
    
                if (includeHistory)
    
                {
    
                    var historyData = await GetStockHistoryAsync(symbol);
    
                    quoteResult.Add("history", historyData);
    
                }
    
                
    
                // Return formatted result
    
                return new ToolResponse {
    
                    Result = JsonSerializer.SerializeToElement(quoteResult)
    
                };
    
            }
    
            
    
            private async Task<Dictionary<string, object>> GetStockQuoteAsync(string symbol)
    
            {
    
                // Implementation would call a real stock API
    
                // This is a simplified example
    
                return new Dictionary<string, object>
    
                {
    
                    ["symbol"] = symbol,
    
                    ["price"] = 123.45,
    
                    ["change"] = 2.5,
    
                    ["percentChange"] = 1.2,
    
                    ["lastUpdated"] = DateTime.UtcNow
    
                };
    
            }
    
            
    
            private async Task<object> GetStockHistoryAsync(string symbol)
    
            {
    
                // Implementation would get historical data
    
                // Simplified example
    
                return new[]
    
                {
    
                    new { date = DateTime.Now.AddDays(-7).Date, price = 120.25 },
    
                    new { date = DateTime.Now.AddDays(-6).Date, price = 122.50 },
    
                    new { date = DateTime.Now.AddDays(-5).Date, price = 121.75 }
    
                    // More historical data...
    
                };
    
            }
    
        }
    
    }
    
    
    
    // Create package and publish to NuGet
    
    // dotnet pack -c Release
    
    // dotnet nuget push bin/Release/McpFinanceTools.1.0.0.nupkg -s https://api.nuget.org/v3/index.json -k YOUR_API_KEY
    
    
    Java Example: Creating a Maven Package for Tools
    
    // pom.xml configuration for a shareable MCP tool package
    
    <!-- 
    
    <project>
    
        <groupId>com.example</groupId>
    
        <artifactId>mcp-weather-tools</artifactId>
    
        <version>1.0.0</version>
    
        
    
        <dependencies>
    
            <dependency>
    
                <groupId>com.mcp</groupId>
    
                <artifactId>mcp-server</artifactId>
    
                <version>1.0.0</version>
    
            </dependency>
    
        </dependencies>
    
        
    
        <distributionManagement>
    
            <repository>
    
                <id>github</id>
    
                <name>GitHub Packages</name>
    
                <url>https://maven.pkg.github.com/username/mcp-weather-tools</url>
    
            </repository>
    
        </distributionManagement>
    
    </project>
    
    -->
    
    
    
    package com.example.mcp.weather;
    
    
    
    import com.mcp.tools.Tool;
    
    import com.mcp.tools.ToolRequest;
    
    import com.mcp.tools.ToolResponse;
    
    import com.mcp.tools.ToolExecutionException;
    
    
    
    import java.net.http.HttpClient;
    
    import java.net.http.HttpRequest;
    
    import java.net.http.HttpResponse;
    
    import java.net.URI;
    
    import java.util.HashMap;
    
    import java.util.Map;
    
    
    
    public class WeatherForecastTool implements Tool {
    
        private final HttpClient httpClient;
    
        private final String apiKey;
    
        
    
        public WeatherForecastTool(String apiKey) {
    
            this.httpClient = HttpClient.newHttpClient();
    
            this.apiKey = apiKey;
    
        }
    
        
    
        @Override
    
        public String getName() {
    
            return "weatherForecast";
    
        }
    
        
    
        @Override
    
        public String getDescription() {
    
            return "Gets weather forecast for a specified location";
    
        }
    
        
    
        @Override
    
        public Object getSchema() {
    
            Map<String, Object> schema = new HashMap<>();
    
            // Schema definition...
    
            return schema;
    
        }
    
        
    
        @Override
    
        public ToolResponse execute(ToolRequest request) {
    
            try {
    
                String location = request.getParameters().get("location").asText();
    
                int days = request.getParameters().has("days") ? 
    
                    request.getParameters().get("days").asInt() : 3;
    
                
    
                // Call weather API
    
                Map<String, Object> forecast = getForecast(location, days);
    
                
    
                // Build response
    
                return new ToolResponse.Builder()
    
                    .setResult(forecast)
    
                    .build();
    
            } catch (Exception ex) {
    
                throw new ToolExecutionException("Weather forecast failed: " + ex.getMessage(), ex);
    
            }
    
        }
    
        
    
        private Map<String, Object> getForecast(String location, int days) {
    
            // Implementation would call weather API
    
            // Simplified example
    
            Map<String, Object> result = new HashMap<>();
    
            // Add forecast data...
    
            return result;
    
        }
    
    }
    
    
    
    // Build and publish using Maven
    
    // mvn clean package
    
    // mvn deploy
    
    
    Python Example: Publishing a PyPI Package
    
    # Directory structure for a PyPI package:
    
    # mcp_nlp_tools/
    
    # ├── LICENSE
    
    # ├── README.md
    
    # ├── setup.py
    
    # ├── mcp_nlp_tools/
    
    # │   ├── __init__.py
    
    # │   ├── sentiment_tool.py
    
    # │   └── translation_tool.py
    
    
    
    # Example setup.py
    
    """
    
    from setuptools import setup, find_packages
    
    
    
    setup(
    
        name="mcp_nlp_tools",
    
        version="0.1.0",
    
        packages=find_packages(),
    
        install_requires=[
    
            "mcp_server>=1.0.0",
    
            "transformers>=4.0.0",
    
            "torch>=1.8.0"
    
        ],
    
        author="Your Name",
    
        author_email="your.email@example.com",
    
        description="MCP tools for natural language processing tasks",
    
        long_description=open("README.md").read(),
    
        long_description_content_type="text/markdown",
    
        url="https://github.com/username/mcp_nlp_tools",
    
        classifiers=[
    
            "Programming Language :: Python :: 3",
    
            "License :: OSI Approved :: MIT License",
    
            "Operating System :: OS Independent",
    
        ],
    
        python_requires=">=3.8",
    
    )
    
    """
    
    
    
    # Example NLP tool implementation (sentiment_tool.py)
    
    from mcp_tools import Tool, ToolRequest, ToolResponse, ToolExecutionException
    
    from transformers import pipeline
    
    import torch
    
    
    
    class SentimentAnalysisTool(Tool):
    
        """MCP tool for sentiment analysis of text"""
    
        
    
        def __init__(self, model_name="distilbert-base-uncased-finetuned-sst-2-english"):
    
            # Load the sentiment analysis model
    
            self.sentiment_analyzer = pipeline("sentiment-analysis", model=model_name)
    
        
    
        def get_name(self):
    
            return "sentimentAnalysis"
    
            
    
        def get_description(self):
    
            return "Analyzes the sentiment of text, classifying it as positive or negative"
    
        
    
        def get_schema(self):
    
            return {
    
                "type": "object",
    
                "properties": {
    
                    "text": {
    
                        "type": "string", 
    
                        "description": "The text to analyze for sentiment"
    
                    },
    
                    "includeScore": {
    
                        "type": "boolean",
    
                        "description": "Whether to include confidence scores",
    
                        "default": True
    
                    }
    
                },
    
                "required": ["text"]
    
            }
    
        
    
        async def execute_async(self, request: ToolRequest) -> ToolResponse:
    
            try:
    
                # Extract parameters
    
                text = request.parameters.get("text")
    
                include_score = request.parameters.get("includeScore", True)
    
                
    
                # Analyze sentiment
    
                sentiment_result = self.sentiment_analyzer(text)[0]
    
                
    
                # Format result
    
                result = {
    
                    "sentiment": sentiment_result["label"],
    
                    "text": text
    
                }
    
                
    
                if include_score:
    
                    result["score"] = sentiment_result["score"]
    
                
    
                # Return result
    
                return ToolResponse(result=result)
    
                
    
            except Exception as e:
    
                raise ToolExecutionException(f"Sentiment analysis failed: {str(e)}")
    
    
    
    # To publish:
    
    # python setup.py sdist bdist_wheel
    
    # python -m twine upload dist/*
    
    

    Sharing Best Practices

    When sharing MCP tools with the community:

    1. Complete Documentation:

    - Document purpose, usage, and examples

    - Explain parameters and return values

    - Document any external dependencies

    2. Error Handling:

    - Implement robust error handling

    - Provide useful error messages

    - Handle edge cases gracefully

    3. Performance Considerations:

    - Optimize for both speed and resource usage

    - Implement caching when appropriate

    - Consider scalability

    4. Security:

    - Use secure API keys and authentication

    - Validate and sanitize inputs

    - Implement rate limiting for external API calls

    5. Testing:

    - Include comprehensive test coverage

    - Test with different input types and edge cases

    - Document test procedures

    Community Collaboration and Best Practices

    Effective collaboration is key to a thriving MCP ecosystem.

    Communication Channels

  • GitHub Issues and Discussions
  • Microsoft Tech Community
  • Discord and Slack channels
  • Stack Overflow (tag: model-context-protocol or mcp)
  • Code Reviews

    When reviewing MCP contributions:

    1. Clarity: Is the code clear and well-documented?

    2. Correctness: Does it work as expected?

    3. Consistency: Does it follow project conventions?

    4. Completeness: Are tests and documentation included?

    5. Security: Are there any security concerns?

    Version Compatibility

    When developing for MCP:

    1. Protocol Versioning: Adhere to the MCP protocol version your tool supports

    2. Client Compatibility: Consider backward compatibility

    3. Server Compatibility: Follow server implementation guidelines

    4. Breaking Changes: Clearly document any breaking changes

    Example Community Project: MCP Tool Registry

    An important community contribution could be developing a public registry for MCP tools.

    
    # Example schema for a community tool registry API
    
    
    
    from fastapi import FastAPI, HTTPException, Depends
    
    from pydantic import BaseModel, Field, HttpUrl
    
    from typing import List, Optional
    
    import datetime
    
    import uuid
    
    
    
    # Models for the tool registry
    
    class ToolSchema(BaseModel):
    
        """JSON Schema for a tool"""
    
        type: str
    
        properties: dict
    
        required: List[str] = []
    
    
    
    class ToolRegistration(BaseModel):
    
        """Information for registering a tool"""
    
        name: str = Field(..., description="Unique name for the tool")
    
        description: str = Field(..., description="Description of what the tool does")
    
        version: str = Field(..., description="Semantic version of the tool")
    
        schema: ToolSchema = Field(..., description="JSON Schema for tool parameters")
    
        author: str = Field(..., description="Author of the tool")
    
        repository: Optional[HttpUrl] = Field(None, description="Repository URL")
    
        documentation: Optional[HttpUrl] = Field(None, description="Documentation URL")
    
        package: Optional[HttpUrl] = Field(None, description="Package URL")
    
        tags: List[str] = Field(default_factory=list, description="Tags for categorization")
    
        examples: List[dict] = Field(default_factory=list, description="Example usage")
    
    
    
    class Tool(ToolRegistration):
    
        """Tool with registry metadata"""
    
        id: uuid.UUID = Field(default_factory=uuid.uuid4)
    
        created_at: datetime.datetime = Field(default_factory=datetime.datetime.now)
    
        updated_at: datetime.datetime = Field(default_factory=datetime.datetime.now)
    
        downloads: int = Field(default=0)
    
        rating: float = Field(default=0.0)
    
        ratings_count: int = Field(default=0)
    
    
    
    # FastAPI application for the registry
    
    app = FastAPI(title="MCP Tool Registry")
    
    
    
    # In-memory database for this example
    
    tools_db = {}
    
    
    
    @app.post("/tools", response_model=Tool)
    
    async def register_tool(tool: ToolRegistration):
    
        """Register a new tool in the registry"""
    
        if tool.name in tools_db:
    
            raise HTTPException(status_code=400, detail=f"Tool '{tool.name}' already exists")
    
        
    
        new_tool = Tool(**tool.dict())
    
        tools_db[tool.name] = new_tool
    
        return new_tool
    
    
    
    @app.get("/tools", response_model=List[Tool])
    
    async def list_tools(tag: Optional[str] = None):
    
        """List all registered tools, optionally filtered by tag"""
    
        if tag:
    
            return [tool for tool in tools_db.values() if tag in tool.tags]
    
        return list(tools_db.values())
    
    
    
    @app.get("/tools/{tool_name}", response_model=Tool)
    
    async def get_tool(tool_name: str):
    
        """Get information about a specific tool"""
    
        if tool_name not in tools_db:
    
            raise HTTPException(status_code=404, detail=f"Tool '{tool_name}' not found")
    
        return tools_db[tool_name]
    
    
    
    @app.delete("/tools/{tool_name}")
    
    async def delete_tool(tool_name: str):
    
        """Delete a tool from the registry"""
    
        if tool_name not in tools_db:
    
            raise HTTPException(status_code=404, detail=f"Tool '{tool_name}' not found")
    
        del tools_db[tool_name]
    
        return {"message": f"Tool '{tool_name}' deleted"}
    
    

    Key Takeaways

  • The MCP community is diverse and welcomes various types of contributions
  • Contributing to MCP can range from core protocol enhancements to custom tools
  • Following contribution guidelines improves the chances of your PR being accepted
  • Creating and sharing MCP tools is a valuable way to enhance the ecosystem
  • Community collaboration is essential for the growth and improvement of MCP
  • Exercise

    1. Identify an area in the MCP ecosystem where you could make a contribution based on your skills and interests

    2. Fork the MCP repository and set up a local development environment

    3. Create a small enhancement, bug fix, or tool that would benefit the community

    4. Document your contribution with proper tests and documentation

    5. Submit a pull request to the appropriate repository

    Additional Resources

  • MCP Community Projects
  • ---

    What's Next

    Next: Lessons from Early Adoption

    code Module 07

    Lessons from Early Adoption

    🌟 Lessons from Early Adopters

    _(Click the image above to view video of this lesson)_

    🎯 What This Module Covers

    This module explores how real organizations and developers are leveraging the Model Context Protocol (MCP) to solve actual challenges and drive innovation.

    Through detailed case studies, hands-on projects, and practical examples, you'll discover how MCP enables secure, scalable AI integration that connects language models, tools, and enterprise data.

    📚 See MCP in Action

    Want to see these principles applied to production-ready tools?

    Check out our 10 Microsoft MCP Servers That Are Transforming Developer Productivity, which showcases real Microsoft MCP servers you can use today.

    Overview

    This lesson explores how early adopters have leveraged the Model Context Protocol (MCP) to solve real-world challenges and drive innovation across industries.

    Through detailed case studies and hands-on projects, you'll see how MCP enables standardized, secure, and scalable AI integration—connecting large language models, tools, and enterprise data in a unified framework.

    You'll gain practical experience designing and building MCP-based solutions, learn from proven implementation patterns, and discover best practices for deploying MCP in production environments.

    The lesson also highlights emerging trends, future directions, and open-source resources to help you stay at the forefront of MCP technology and its evolving ecosystem.

    Learning Objectives

  • Analyze real-world MCP implementations across different industries
  • Design and build complete MCP-based applications
  • Explore emerging trends and future directions in MCP technology
  • Apply best practices in actual development scenarios
  • Real-world MCP Implementations

    Case Study 1: Enterprise Customer Support Automation

    A multinational corporation implemented an MCP-based solution to standardize AI interactions across their customer support systems. This allowed them to:

  • Create a unified interface for multiple LLM providers
  • Maintain consistent prompt management across departments
  • Implement robust security and compliance controls
  • Easily switch between different AI models based on specific needs
  • Technical Implementation:

    
    # Python MCP server implementation for customer support
    
    import logging
    
    import asyncio
    
    from modelcontextprotocol import create_server, ServerConfig
    
    from modelcontextprotocol.server import MCPServer
    
    from modelcontextprotocol.transports import create_http_transport
    
    from modelcontextprotocol.resources import ResourceDefinition
    
    from modelcontextprotocol.prompts import PromptDefinition
    
    from modelcontextprotocol.tool import ToolDefinition
    
    
    
    # Configure logging
    
    logging.basicConfig(level=logging.INFO)
    
    
    
    async def main():
    
        # Create server configuration
    
        config = ServerConfig(
    
            name="Enterprise Customer Support Server",
    
            version="1.0.0",
    
            description="MCP server for handling customer support inquiries"
    
        )
    
        
    
        # Initialize MCP server
    
        server = create_server(config)
    
        
    
        # Register knowledge base resources
    
        server.resources.register(
    
            ResourceDefinition(
    
                name="customer_kb",
    
                description="Customer knowledge base documentation"
    
            ),
    
            lambda params: get_customer_documentation(params)
    
        )
    
        
    
        # Register prompt templates
    
        server.prompts.register(
    
            PromptDefinition(
    
                name="support_template",
    
                description="Templates for customer support responses"
    
            ),
    
            lambda params: get_support_templates(params)
    
        )
    
        
    
        # Register support tools
    
        server.tools.register(
    
            ToolDefinition(
    
                name="ticketing",
    
                description="Create and update support tickets"
    
            ),
    
            handle_ticketing_operations
    
        )
    
        
    
        # Start server with HTTP transport
    
        transport = create_http_transport(port=8080)
    
        await server.run(transport)
    
    
    
    if __name__ == "__main__":
    
        asyncio.run(main())
    
    

    Results: 30% reduction in model costs, 45% improvement in response consistency, and enhanced compliance across global operations.

    Case Study 2: Healthcare Diagnostic Assistant

    A healthcare provider developed an MCP infrastructure to integrate multiple specialized medical AI models while ensuring sensitive patient data remained protected:

  • Seamless switching between generalist and specialist medical models
  • Strict privacy controls and audit trails
  • Integration with existing Electronic Health Record (EHR) systems
  • Consistent prompt engineering for medical terminology
  • Technical Implementation:

    
    // C# MCP host application implementation in healthcare application
    
    using Microsoft.Extensions.DependencyInjection;
    
    using ModelContextProtocol.SDK.Client;
    
    using ModelContextProtocol.SDK.Security;
    
    using ModelContextProtocol.SDK.Resources;
    
    
    
    public class DiagnosticAssistant
    
    {
    
        private readonly MCPHostClient _mcpClient;
    
        private readonly PatientContext _patientContext;
    
        
    
        public DiagnosticAssistant(PatientContext patientContext)
    
        {
    
            _patientContext = patientContext;
    
            
    
            // Configure MCP client with healthcare-specific settings
    
            var clientOptions = new ClientOptions
    
            {
    
                Name = "Healthcare Diagnostic Assistant",
    
                Version = "1.0.0",
    
                Security = new SecurityOptions
    
                {
    
                    Encryption = EncryptionLevel.Medical,
    
                    AuditEnabled = true
    
                }
    
            };
    
            
    
            _mcpClient = new MCPHostClientBuilder()
    
                .WithOptions(clientOptions)
    
                .WithTransport(new HttpTransport("https://healthcare-mcp.example.org"))
    
                .WithAuthentication(new HIPAACompliantAuthProvider())
    
                .Build();
    
        }
    
        
    
        public async Task<DiagnosticSuggestion> GetDiagnosticAssistance(
    
            string symptoms, string patientHistory)
    
        {
    
            // Create request with appropriate resources and tool access
    
            var resourceRequest = new ResourceRequest
    
            {
    
                Name = "patient_records",
    
                Parameters = new Dictionary<string, object>
    
                {
    
                    ["patientId"] = _patientContext.PatientId,
    
                    ["requestingProvider"] = _patientContext.ProviderId
    
                }
    
            };
    
            
    
            // Request diagnostic assistance using appropriate prompt
    
            var response = await _mcpClient.SendPromptRequestAsync(
    
                promptName: "diagnostic_assistance",
    
                parameters: new Dictionary<string, object>
    
                {
    
                    ["symptoms"] = symptoms,
    
                    patientHistory = patientHistory,
    
                    relevantGuidelines = _patientContext.GetRelevantGuidelines()
    
                });
    
                
    
            return DiagnosticSuggestion.FromMCPResponse(response);
    
        }
    
    }
    
    

    Results: Improved diagnostic suggestions for physicians while maintaining full HIPAA compliance and significant reduction in context-switching between systems.

    Case Study 3: Financial Services Risk Analysis

    A financial institution implemented MCP to standardize their risk analysis processes across different departments:

  • Created a unified interface for credit risk, fraud detection, and investment risk models
  • Implemented strict access controls and model versioning
  • Ensured auditability of all AI recommendations
  • Maintained consistent data formatting across diverse systems
  • Technical Implementation:

    
    // Java MCP server for financial risk assessment
    
    import org.mcp.server.*;
    
    import org.mcp.security.*;
    
    
    
    public class FinancialRiskMCPServer {
    
        public static void main(String[] args) {
    
            // Create MCP server with financial compliance features
    
            MCPServer server = new MCPServerBuilder()
    
                .withModelProviders(
    
                    new ModelProvider("risk-assessment-primary", new AzureOpenAIProvider()),
    
                    new ModelProvider("risk-assessment-audit", new LocalLlamaProvider())
    
                )
    
                .withPromptTemplateDirectory("./compliance/templates")
    
                .withAccessControls(new SOCCompliantAccessControl())
    
                .withDataEncryption(EncryptionStandard.FINANCIAL_GRADE)
    
                .withVersionControl(true)
    
                .withAuditLogging(new DatabaseAuditLogger())
    
                .build();
    
                
    
            server.addRequestValidator(new FinancialDataValidator());
    
            server.addResponseFilter(new PII_RedactionFilter());
    
            
    
            server.start(9000);
    
            
    
            System.out.println("Financial Risk MCP Server running on port 9000");
    
        }
    
    }
    
    

    Results: Enhanced regulatory compliance, 40% faster model deployment cycles, and improved risk assessment consistency across departments.

    Case Study 4: Microsoft Playwright MCP Server for Browser Automation

    Microsoft developed the Playwright MCP server to enable secure, standardized browser automation through the Model Context Protocol.

    This production-ready server allows AI agents and LLMs to interact with web browsers in a controlled, auditable, and extensible way—enabling use cases such as automated web testing, data extraction, and end-to-end workflows.

    > 🎯 Production Ready Tool

    >

    > This case study showcases a real MCP server you can use today!

    Learn more about the Playwright MCP Server and 9 other production-ready Microsoft MCP servers in our Microsoft MCP Servers Guide.

    Key Features:

  • Exposes browser automation capabilities (navigation, form filling, screenshot capture, etc.) as MCP tools
  • Implements strict access controls and sandboxing to prevent unauthorized actions
  • Provides detailed audit logs for all browser interactions
  • Supports integration with Azure OpenAI and other LLM providers for agent-driven automation
  • Powers GitHub Copilot's Coding Agent with web browsing capabilities
  • Technical Implementation:

    
    // TypeScript: Registering Playwright browser automation tools in an MCP server
    
    import { createServer, ToolDefinition } from 'modelcontextprotocol';
    
    import { launch } from 'playwright';
    
    
    
    const server = createServer({
    
      name: 'Playwright MCP Server',
    
      version: '1.0.0',
    
      description: 'MCP server for browser automation using Playwright'
    
    });
    
    
    
    // Register a tool for navigating to a URL and capturing a screenshot
    
    server.tools.register(
    
      new ToolDefinition({
    
        name: 'navigate_and_screenshot',
    
        description: 'Navigate to a URL and capture a screenshot',
    
        parameters: {
    
          url: { type: 'string', description: 'The URL to visit' }
    
        }
    
      }),
    
      async ({ url }) => {
    
        const browser = await launch();
    
        const page = await browser.newPage();
    
        await page.goto(url);
    
        const screenshot = await page.screenshot();
    
        await browser.close();
    
        return { screenshot };
    
      }
    
    );
    
    
    
    // Start the MCP server
    
    server.listen(8080);
    
    

    Results:

  • Enabled secure, programmatic browser automation for AI agents and LLMs
  • Reduced manual testing effort and improved test coverage for web applications
  • Provided a reusable, extensible framework for browser-based tool integration in enterprise environments
  • Powers GitHub Copilot's web browsing capabilities
  • References:

  • Playwright MCP Server GitHub Repository
  • Microsoft AI and Automation Solutions
  • Case Study 5: Azure MCP – Enterprise-Grade Model Context Protocol as a Service

    Azure MCP Server (https://aka.ms/azmcp) is Microsoft’s managed, enterprise-grade implementation of the Model Context Protocol, designed to provide scalable, secure, and compliant MCP server capabilities as a cloud service.

    Azure MCP enables organizations to rapidly deploy, manage, and integrate MCP servers with Azure AI, data, and security services, reducing operational overhead and accelerating AI adoption.

    > 🎯 Production Ready Tool

    >

    > This is a real MCP server you can use today! Learn more about the Azure AI Foundry MCP Server in our Microsoft MCP Servers Guide.

  • Fully managed MCP server hosting with built-in scaling, monitoring, and security
  • Native integration with Azure OpenAI, Azure AI Search, and other Azure services
  • Enterprise authentication and authorization via Microsoft Entra ID
  • Support for custom tools, prompt templates, and resource connectors
  • Compliance with enterprise security and regulatory requirements
  • Technical Implementation:

    
    # Example: Azure MCP server deployment configuration (YAML)
    
    apiVersion: mcp.microsoft.com/v1
    
    kind: McpServer
    
    metadata:
    
      name: enterprise-mcp-server
    
    spec:
    
      modelProviders:
    
        - name: azure-openai
    
          type: AzureOpenAI
    
          endpoint: https://<your-openai-resource>.openai.azure.com/
    
          apiKeySecret: <your-azure-keyvault-secret>
    
      tools:
    
        - name: document_search
    
          type: AzureAISearch
    
          endpoint: https://<your-search-resource>.search.windows.net/
    
          apiKeySecret: <your-azure-keyvault-secret>
    
      authentication:
    
        type: EntraID
    
        tenantId: <your-tenant-id>
    
      monitoring:
    
        enabled: true
    
        logAnalyticsWorkspace: <your-log-analytics-id>
    
    

    Results:

  • Reduced time-to-value for enterprise AI projects by providing a ready-to-use, compliant MCP server platform
  • Simplified integration of LLMs, tools, and enterprise data sources
  • Enhanced security, observability, and operational efficiency for MCP workloads
  • Improved code quality with Azure SDK best practices and current authentication patterns
  • References:

  • Azure MCP Documentation
  • Azure MCP Server GitHub Repository
  • Azure AI Services
  • Microsoft MCP Center
  • Case Study 6: NLWeb

    MCP (Model Context Protocol) is an emerging protocol for Chatbots and AI assistants to interact with tools.

    Every NLWeb instance is also an MCP server, which supports one core method, ask, which is used to ask a website a question in natural language.

    The returned response leverages schema.org, a widely-used vocabulary for describing web data.

    Loosely speaking, MCP is NLWeb as Http is to HTML.

    NLWeb combines protocols, Schema.org formats, and sample code to help sites rapidly create these endpoints, benefiting both humans through conversational interfaces and machines through natural agent-to-agent interaction.

    There are two distinct components to NLWeb.

  • A protocol, very simple to begin with, to interface with a site in natural language and a format, leveraging json and schema.org for the returned answer. See the documentation on the REST API for more details.
  • A straightforward implementation of (1) that leverages existing markup, for sites that can be abstracted as lists of items (products, recipes, attractions, reviews, etc.). Together with a set of user interface widgets, sites can easily provide conversational interfaces to their content. See the documentation on Life of a chat query for more details on how this works.
  • References:

  • Azure MCP Documentation
  • NLWeb
  • Case Study 7: Azure AI Foundry MCP Server – Enterprise AI Agent Integration

    Azure AI Foundry MCP servers demonstrate how MCP can be used to orchestrate and manage AI agents and workflows in enterprise environments.

    By integrating MCP with Azure AI Foundry, organizations can standardize agent interactions, leverage Foundry's workflow management, and ensure secure, scalable deployments.

    > 🎯 Production Ready Tool

    >

    > This is a real MCP server you can use today! Learn more about the Azure AI Foundry MCP Server in our Microsoft MCP Servers Guide.

    Key Features:

  • Comprehensive access to Azure's AI ecosystem, including model catalogs and deployment management
  • Knowledge indexing with Azure AI Search for RAG applications
  • Evaluation tools for AI model performance and quality assurance
  • Integration with Azure AI Foundry Catalog and Labs for cutting-edge research models
  • Agent management and evaluation capabilities for production scenarios
  • Results:

  • Rapid prototyping and robust monitoring of AI agent workflows
  • Seamless integration with Azure AI services for advanced scenarios
  • Unified interface for building, deploying, and monitoring agent pipelines
  • Improved security, compliance, and operational efficiency for enterprises
  • Accelerated AI adoption while maintaining control over complex agent-driven processes
  • References:

  • Azure AI Foundry MCP Server GitHub Repository
  • Integrating Azure AI Agents with MCP (Microsoft Foundry Blog)
  • Case Study 8: Foundry MCP Playground – Experimentation and Prototyping

    The Foundry MCP Playground offers a ready-to-use environment for experimenting with MCP servers and Azure AI Foundry integrations.

    Developers can quickly prototype, test, and evaluate AI models and agent workflows using resources from the Azure AI Foundry Catalog and Labs.

    The playground streamlines setup, provides sample projects, and supports collaborative development, making it easy to explore best practices and new scenarios with minimal overhead.

    It is especially useful for teams looking to validate ideas, share experiments, and accelerate learning without the need for complex infrastructure.

    By lowering the barrier to entry, the playground helps foster innovation and community contributions in the MCP and Azure AI Foundry ecosystem.

    References:

  • Foundry MCP Playground GitHub Repository
  • Case Study 9: Microsoft Learn Docs MCP Server – AI-Powered Documentation Access

    The Microsoft Learn Docs MCP Server is a cloud-hosted service that provides AI assistants with real-time access to official Microsoft documentation through the Model Context Protocol.

    This production-ready server connects to the comprehensive Microsoft Learn ecosystem and enables semantic search across all official Microsoft sources.

    > 🎯 Production Ready Tool

    >

    > This is a real MCP server you can use today!

    Learn more about the Microsoft Learn Docs MCP Server in our Microsoft MCP Servers Guide.

    Key Features:

  • Real-time access to official Microsoft documentation, Azure docs, and Microsoft 365 documentation
  • Advanced semantic search capabilities that understand context and intent
  • Always up-to-date information as Microsoft Learn content is published
  • Comprehensive coverage across Microsoft Learn, Azure documentation, and Microsoft 365 sources
  • Returns up to 10 high-quality content chunks with article titles and URLs
  • Why It's Critical:

  • Solves the "outdated AI knowledge" problem for Microsoft technologies
  • Ensures AI assistants have access to the latest .NET, C#, Azure, and Microsoft 365 features
  • Provides authoritative, first-party information for accurate code generation
  • Essential for developers working with rapidly evolving Microsoft technologies
  • Results:

  • Dramatically improved accuracy of AI-generated code for Microsoft technologies
  • Reduced time spent searching for current documentation and best practices
  • Enhanced developer productivity with context-aware documentation retrieval
  • Seamless integration with development workflows without leaving the IDE
  • References:

  • Microsoft Learn Docs MCP Server GitHub Repository
  • Microsoft Learn Documentation
  • Hands-on Projects

    Project 1: Build a Multi-Provider MCP Server

    Objective: Create an MCP server that can route requests to multiple AI model providers based on specific criteria.

    Requirements:

  • Support at least three different model providers (e.g., OpenAI, Anthropic, local models)
  • Implement a routing mechanism based on request metadata
  • Create a configuration system for managing provider credentials
  • Add caching to optimize performance and costs
  • Build a simple dashboard for monitoring usage
  • Implementation Steps:

    1. Set up the basic MCP server infrastructure

    2. Implement provider adapters for each AI model service

    3. Create the routing logic based on request attributes

    4. Add caching mechanisms for frequent requests

    5. Develop the monitoring dashboard

    6. Test with various request patterns

    Technologies: Choose from Python (.NET/Java/Python based on your preference), Redis for caching, and a simple web framework for the dashboard.

    Project 2: Enterprise Prompt Management System

    Objective: Develop an MCP-based system for managing, versioning, and deploying prompt templates across an organization.

    Requirements:

  • Create a centralized repository for prompt templates
  • Implement versioning and approval workflows
  • Build template testing capabilities with sample inputs
  • Develop role-based access controls
  • Create an API for template retrieval and deployment
  • Implementation Steps:

    1. Design the database schema for template storage

    2. Create the core API for template CRUD operations

    3. Implement the versioning system

    4. Build the approval workflow

    5. Develop the testing framework

    6. Create a simple web interface for management

    7. Integrate with an MCP server

    Technologies: Your choice of backend framework, SQL or NoSQL database, and a frontend framework for the management interface.

    Project 3: MCP-Based Content Generation Platform

    Objective: Build a content generation platform that leverages MCP to provide consistent results across different content types.

    Requirements:

  • Support multiple content formats (blog posts, social media, marketing copy)
  • Implement template-based generation with customization options
  • Create a content review and feedback system
  • Track content performance metrics
  • Support content versioning and iteration
  • Implementation Steps:

    1. Set up the MCP client infrastructure

    2. Create templates for different content types

    3. Build the content generation pipeline

    4. Implement the review system

    5. Develop the metrics tracking system

    6. Create a user interface for template management and content generation

    Technologies: Your preferred programming language, web framework, and database system.

    Future Directions for MCP Technology

    Emerging Trends

    1. Multi-Modal MCP

    - Expansion of MCP to standardize interactions with image, audio, and video models

    - Development of cross-modal reasoning capabilities

    - Standardized prompt formats for different modalities

    2. Federated MCP Infrastructure

    - Distributed MCP networks that can share resources across organizations

    - Standardized protocols for secure model sharing

    - Privacy-preserving computation techniques

    3. MCP Marketplaces

    - Ecosystems for sharing and monetizing MCP templates and plugins

    - Quality assurance and certification processes

    - Integration with model marketplaces

    4. MCP for Edge Computing

    - Adaptation of MCP standards for resource-constrained edge devices

    - Optimized protocols for low-bandwidth environments

    - Specialized MCP implementations for IoT ecosystems

    5. Regulatory Frameworks

    - Development of MCP extensions for regulatory compliance

    - Standardized audit trails and explainability interfaces

    - Integration with emerging AI governance frameworks

    MCP Solutions from Microsoft

    Microsoft and Azure have developed several open-source repositories to help developers implement MCP in various scenarios:

    Microsoft Organization

    1. playwright-mcp - A Playwright MCP server for browser automation and testing

    2. files-mcp-server - A OneDrive MCP server implementation for local testing and community contribution

    3. NLWeb - NLWeb is a collection of open protocols and associated open source tools. Its main focus is establishing a foundational layer for the AI Web

    Azure-Samples Organization

    1. mcp - Links to samples, tools, and resources for building and integrating MCP servers on Azure using multiple languages

    2. mcp-auth-servers - Reference MCP servers demonstrating authentication with the current Model Context Protocol specification

    3. remote-mcp-functions - Landing page for Remote MCP Server implementations in Azure Functions with links to language-specific repos

    4. remote-mcp-functions-python - Quickstart template for building and deploying custom remote MCP servers using Azure Functions with Python

    5. remote-mcp-functions-dotnet - Quickstart template for building and deploying custom remote MCP servers using Azure Functions with .NET/C#

    6. remote-mcp-functions-typescript - Quickstart template for building and deploying custom remote MCP servers using Azure Functions with TypeScript

    7. remote-mcp-apim-functions-python - Azure API Management as AI Gateway to Remote MCP servers using Python

    8. AI-Gateway - APIM ❤️ AI experiments including MCP capabilities, integrating with Azure OpenAI and AI Foundry

    These repositories provide various implementations, templates, and resources for working with the Model Context Protocol across different programming languages and Azure services.

    They cover a range of use cases from basic server implementations to authentication, cloud deployment, and enterprise integration scenarios.

    MCP Resources Directory

    The MCP Resources directory in the official Microsoft MCP repository provides a curated collection of sample resources, prompt templates, and tool definitions for use with Model Context Protocol servers.

    This directory is designed to help developers quickly get started with MCP by offering reusable building blocks and best-practice examples for:

  • Prompt Templates: Ready-to-use prompt templates for common AI tasks and scenarios, which can be adapted for your own MCP server implementations.
  • Tool Definitions: Example tool schemas and metadata to standardize tool integration and invocation across different MCP servers.
  • Resource Samples: Example resource definitions for connecting to data sources, APIs, and external services within the MCP framework.
  • Reference Implementations: Practical samples that demonstrate how to structure and organize resources, prompts, and tools in real-world MCP projects.
  • These resources accelerate development, promote standardization, and help ensure best practices when building and deploying MCP-based solutions.

    MCP Resources Directory
  • MCP Resources (Sample Prompts, Tools, and Resource Definitions)
  • Research Opportunities

  • Efficient prompt optimization techniques within MCP frameworks
  • Security models for multi-tenant MCP deployments
  • Performance benchmarking across different MCP implementations
  • Formal verification methods for MCP servers
  • Conclusion

    The Model Context Protocol (MCP) is rapidly shaping the future of standardized, secure, and interoperable AI integration across industries.

    Through the case studies and hands-on projects in this lesson, you've seen how early adopters—including Microsoft and Azure—are leveraging MCP to solve real-world challenges, accelerate AI adoption, and ensure compliance, security, and scalability.

    MCP's modular approach enables organizations to connect large language models, tools, and enterprise data in a unified, auditable framework.

    As MCP continues to evolve, staying engaged with the community, exploring open-source resources, and applying best practices will be key to building robust, future-ready AI solutions.

    Additional Resources

  • MCP Foundry GitHub Repository
  • Foundry MCP Playground
  • Integrating Azure AI Agents with MCP (Microsoft Foundry Blog)
  • MCP GitHub Repository (Microsoft)
  • MCP Resources Directory (Sample Prompts, Tools, and Resource Definitions)
  • MCP Community & Documentation
  • MCP Specification (2025-11-25)
  • Azure MCP Documentation
  • OWASP MCP Top 10 - Security best practices
  • Playwright MCP Server GitHub Repository
  • Files MCP Server (OneDrive)
  • Azure-Samples MCP
  • MCP Auth Servers (Azure-Samples)
  • Remote MCP Functions (Azure-Samples)
  • Remote MCP Functions Python (Azure-Samples)
  • Remote MCP Functions .NET (Azure-Samples)
  • Remote MCP Functions TypeScript (Azure-Samples)
  • Remote MCP APIM Functions Python (Azure-Samples)
  • AI-Gateway (Azure-Samples)
  • Microsoft AI and Automation Solutions
  • Exercises

    1. Analyze one of the case studies and propose an alternative implementation approach.

    2. Choose one of the project ideas and create a detailed technical specification.

    3. Research an industry not covered in the case studies and outline how MCP could address its specific challenges.

    4. Explore one of the future directions and create a concept for a new MCP extension to support it.

    What's Next

    Explore more: Microsoft MCP Servers

    Continue to: Module 8: Best Practices

    code Module 06

    Module 06 — 커뮤니티 기여

    커뮤니티 및 기여

    _(위 이미지를 클릭하여 이 수업의 영상을 시청하세요)_

    개요

    이 수업은 MCP 커뮤니티와 소통하는 방법, MCP 생태계에 기여하는 방법, 그리고 협업 개발을 위한 모범 사례를 다룹니다. 오픈 소스 MCP 프로젝트에 참여하는 방법을 이해하는 것은 이 기술의 미래를 형성하려는 분들에게 필수적입니다.

    학습 목표

    이 수업을 마치면 다음을 할 수 있습니다:

  • MCP 커뮤니티 및 생태계 구조 이해
  • MCP 커뮤니티 포럼과 토론에 효과적으로 참여
  • MCP 오픈 소스 저장소에 기여
  • 맞춤형 MCP 도구 및 서버 생성 및 공유
  • MCP 개발 및 협업을 위한 모범 사례 준수
  • MCP 개발을 위한 커뮤니티 리소스 및 프레임워크 발견
  • MCP 커뮤니티 생태계

    MCP 생태계는 프로토콜을 발전시키기 위해 함께 일하는 다양한 구성 요소와 참여자로 이루어져 있습니다.

    주요 커뮤니티 구성 요소

    1. 핵심 프로토콜 유지 관리자: 공식 Model Context Protocol GitHub 조직은 핵심 MCP 명세와 참조 구현을 유지합니다

    2. 도구 개발자: MCP 도구와 서버를 만드는 개인 및 팀

    3. 통합 제공자: 자사의 제품과 서비스에 MCP를 통합하는 회사들

    4. 최종 사용자: 애플리케이션에서 MCP를 사용하는 개발자와 조직

    5. 기여자: 코드, 문서 또는 기타 리소스를 기여하는 커뮤니티 멤버

    커뮤니티 리소스

    공식 채널
  • MCP GitHub 조직
  • MCP 문서
  • MCP 명세
  • GitHub 토론
  • MCP 예제 및 서버 저장소
  • 커뮤니티 주도 리소스
  • MCP 클라이언트 - MCP 통합을 지원하는 클라이언트 목록
  • 커뮤니티 MCP 서버 - 커뮤니티에서 개발한 MCP 서버 목록 증가 중
  • Awesome MCP 서버 - 엄선된 MCP 서버 목록
  • PulseMCP - MCP 리소스를 발견할 수 있는 커뮤니티 허브 및 뉴스레터
  • Discord 서버 - MCP 개발자와 연결
  • 언어별 SDK 구현체
  • 블로그 게시물 및 튜토리얼
  • MCP에 기여하기

    기여 유형

    MCP 생태계는 다양한 유형의 기여를 환영합니다:

    1. 코드 기여:

    - 핵심 프로토콜 개선

    - 버그 수정

    - 도구 및 서버 구현

    - 다양한 언어의 클라이언트/서버 라이브러리

    2. 문서화:

    - 기존 문서 개선

    - 튜토리얼 및 가이드 작성

    - 문서 번역

    - 예제 및 샘플 애플리케이션 작성

    3. 커뮤니티 지원:

    - 포럼 및 토론에서 질문에 답변

    - 테스트 및 이슈 보고

    - 커뮤니티 이벤트 조직

    - 신규 기여자 멘토링

    기여 프로세스: 핵심 프로토콜

    핵심 MCP 프로토콜 또는 공식 구현에 기여하려면, 공식 기여 가이드라인의 원칙을 따르세요:

    1. 단순함과 최소주의: MCP 명세는 새 개념 추가에 높은 기준을 유지합니다. 명세에 항목을 추가하는 것보다 삭제하는 것이 더 어렵습니다.

    2. 구체적 접근법: 명세 변경은 투기적 아이디어가 아니라 구체적 구현 문제에 기반해야 합니다.

    3. 제안 단계:

    - 정의: 문제 영역 탐색, 다른 MCP 사용자도 유사한 문제를 겪는지 검증

    - 프로토타입: 예제 솔루션 구축 및 실용성 시연

    - 작성: 프로토타입을 바탕으로 명세 제안서 작성

    개발 환경 설정

    
    # 저장소를 포크하세요
    
    git clone https://github.com/YOUR-USERNAME/modelcontextprotocol.git
    
    cd modelcontextprotocol
    
    
    
    # 의존성을 설치하세요
    
    npm install
    
    
    
    # 스키마 변경의 경우, 검증하고 schema.json을 생성하세요:
    
    npm run check:schema:ts
    
    npm run generate:schema
    
    
    
    # 문서 변경의 경우
    
    npm run check:docs
    
    npm run format
    
    
    
    # 문서를 로컬에서 미리보기 (선택 사항):
    
    npm run serve:docs
    
    

    예제: 버그 수정 기여하기

    
    // 타입스크립트 SDK의 버그가 있는 원본 코드
    
    export function validateResource(resource: unknown): resource is MCPResource {
    
      if (!resource || typeof resource !== 'object') {
    
        return false;
    
      }
    
      
    
      // 버그: 누락된 속성 검증
    
      // 현재 구현:
    
      const hasName = 'name' in resource;
    
      const hasSchema = 'schema' in resource;
    
      
    
      return hasName && hasSchema;
    
    }
    
    
    
    // 기여로 수정된 구현
    
    export function validateResource(resource: unknown): resource is MCPResource {
    
      if (!resource || typeof resource !== 'object') {
    
        return false;
    
      }
    
      
    
      // 개선된 검증
    
      const hasName = 'name' in resource && typeof (resource as MCPResource).name === 'string';
    
      const hasSchema = 'schema' in resource && typeof (resource as MCPResource).schema === 'object';
    
      const hasDescription = !('description' in resource) || typeof (resource as MCPResource).description === 'string';
    
      
    
      return hasName && hasSchema && hasDescription;
    
    }
    
    

    예제: 표준 라이브러리에 새 도구 기여하기

    
    # 예제 기여: MCP 표준 라이브러리를 위한 CSV 데이터 처리 도구
    
    
    
    from mcp_tools import Tool, ToolRequest, ToolResponse, ToolExecutionException
    
    import pandas as pd
    
    import io
    
    import json
    
    from typing import Dict, Any, List, Optional
    
    
    
    class CsvProcessingTool(Tool):
    
        """
    
        Tool for processing and analyzing CSV data.
    
        
    
        This tool allows models to extract information from CSV files,
    
        run basic analysis, and convert data between formats.
    
        """
    
        
    
        def get_name(self):
    
            return "csvProcessor"
    
            
    
        def get_description(self):
    
            return "Processes and analyzes CSV data"
    
        
    
        def get_schema(self):
    
            return {
    
                "type": "object",
    
                "properties": {
    
                    "csvData": {
    
                        "type": "string", 
    
                        "description": "CSV data as a string"
    
                    },
    
                    "csvUrl": {
    
                        "type": "string",
    
                        "description": "URL to a CSV file (alternative to csvData)"
    
                    },
    
                    "operation": {
    
                        "type": "string",
    
                        "enum": ["summary", "filter", "transform", "convert"],
    
                        "description": "Operation to perform on the CSV data"
    
                    },
    
                    "filterColumn": {
    
                        "type": "string",
    
                        "description": "Column to filter by (for filter operation)"
    
                    },
    
                    "filterValue": {
    
                        "type": "string",
    
                        "description": "Value to filter for (for filter operation)"
    
                    },
    
                    "outputFormat": {
    
                        "type": "string",
    
                        "enum": ["json", "csv", "markdown"],
    
                        "default": "json",
    
                        "description": "Output format for the processed data"
    
                    }
    
                },
    
                "oneOf": [
    
                    {"required": ["csvData", "operation"]},
    
                    {"required": ["csvUrl", "operation"]}
    
                ]
    
            }
    
        
    
        async def execute_async(self, request: ToolRequest) -> ToolResponse:
    
            try:
    
                # 매개변수 추출
    
                operation = request.parameters.get("operation")
    
                output_format = request.parameters.get("outputFormat", "json")
    
                
    
                # 직접 데이터 또는 URL에서 CSV 데이터 가져오기
    
                df = await self._get_dataframe(request)
    
                
    
                # 요청된 작업에 따라 처리
    
                result = {}
    
                
    
                if operation == "summary":
    
                    result = self._generate_summary(df)
    
                elif operation == "filter":
    
                    column = request.parameters.get("filterColumn")
    
                    value = request.parameters.get("filterValue")
    
                    if not column:
    
                        raise ToolExecutionException("filterColumn is required for filter operation")
    
                    result = self._filter_data(df, column, value)
    
                elif operation == "transform":
    
                    result = self._transform_data(df, request.parameters)
    
                elif operation == "convert":
    
                    result = self._convert_format(df, output_format)
    
                else:
    
                    raise ToolExecutionException(f"Unknown operation: {operation}")
    
                
    
                return ToolResponse(result=result)
    
            
    
            except Exception as e:
    
                raise ToolExecutionException(f"CSV processing failed: {str(e)}")
    
        
    
        async def _get_dataframe(self, request: ToolRequest) -> pd.DataFrame:
    
            """Gets a pandas DataFrame from either CSV data or URL"""
    
            if "csvData" in request.parameters:
    
                csv_data = request.parameters.get("csvData")
    
                return pd.read_csv(io.StringIO(csv_data))
    
            elif "csvUrl" in request.parameters:
    
                csv_url = request.parameters.get("csvUrl")
    
                return pd.read_csv(csv_url)
    
            else:
    
                raise ToolExecutionException("Either csvData or csvUrl must be provided")
    
        
    
        def _generate_summary(self, df: pd.DataFrame) -> Dict[str, Any]:
    
            """Generates a summary of the CSV data"""
    
            return {
    
                "columns": df.columns.tolist(),
    
                "rowCount": len(df),
    
                "columnCount": len(df.columns),
    
                "numericColumns": df.select_dtypes(include=['number']).columns.tolist(),
    
                "categoricalColumns": df.select_dtypes(include=['object']).columns.tolist(),
    
                "sampleRows": json.loads(df.head(5).to_json(orient="records")),
    
                "statistics": json.loads(df.describe().to_json())
    
            }
    
        
    
        def _filter_data(self, df: pd.DataFrame, column: str, value: str) -> Dict[str, Any]:
    
            """Filters the DataFrame by a column value"""
    
            if column not in df.columns:
    
                raise ToolExecutionException(f"Column '{column}' not found")
    
                
    
            filtered_df = df[df[column].astype(str).str.contains(value)]
    
            
    
            return {
    
                "originalRowCount": len(df),
    
                "filteredRowCount": len(filtered_df),
    
                "data": json.loads(filtered_df.to_json(orient="records"))
    
            }
    
        
    
        def _transform_data(self, df: pd.DataFrame, params: Dict[str, Any]) -> Dict[str, Any]:
    
            """Transforms the data based on parameters"""
    
            # 구현에는 다양한 변환이 포함될 것입니다
    
            return {
    
                "status": "success",
    
                "message": "Transformation applied"
    
            }
    
        
    
        def _convert_format(self, df: pd.DataFrame, format: str) -> Dict[str, Any]:
    
            """Converts the DataFrame to different formats"""
    
            if format == "json":
    
                return {
    
                    "data": json.loads(df.to_json(orient="records")),
    
                    "format": "json"
    
                }
    
            elif format == "csv":
    
                return {
    
                    "data": df.to_csv(index=False),
    
                    "format": "csv"
    
                }
    
            elif format == "markdown":
    
                return {
    
                    "data": df.to_markdown(),
    
                    "format": "markdown"
    
                }
    
            else:
    
                raise ToolExecutionException(f"Unsupported output format: {format}")
    
    

    기여 가이드라인

    MCP 프로젝트에 성공적으로 기여하려면:

    1. 작게 시작: 문서, 버그 수정 또는 작은 향상부터 시작하세요

    2. 스타일 가이드 준수: 프로젝트의 코드 스타일과 규칙을 따르세요

    3. 테스트 작성: 코드 기여에 단위 테스트 포함

    4. 작업 문서화: 새로운 기능이나 변경 사항에 대해 명확한 문서 추가

    5. 타겟 PR 제출: 하나의 문제 또는 기능에 집중한 풀 리퀘스트 유지

    6. 피드백 참여: 기여에 대한 피드백에 적극적으로 응답

    예제 기여 워크플로우

    
    # 저장소를 복제하세요
    
    git clone https://github.com/modelcontextprotocol/typescript-sdk.git
    
    cd typescript-sdk
    
    
    
    # 기여를 위해 새 브랜치를 만드세요
    
    git checkout -b feature/my-contribution
    
    
    
    # 변경사항을 만드세요
    
    # ...
    
    
    
    # 변경사항이 기존 기능을 깨뜨리지 않는지 테스트를 실행하세요
    
    npm test
    
    
    
    # 설명이 포함된 메시지와 함께 변경사항을 커밋하세요
    
    git commit -am "Fix validation in resource handler"
    
    
    
    # 브랜치를 자신의 포크에 푸시하세요
    
    git push origin feature/my-contribution
    
    
    
    # 브랜치에서 메인 저장소로 풀 리퀘스트를 만드세요
    
    # 그 후 피드백에 참여하고 필요에 따라 PR을 반복하세요
    
    

    MCP 서버 생성 및 공유

    MCP 생태계에 기여하는 가장 가치 있는 방법 중 하나는 맞춤형 MCP 서버를 생성하고 공유하는 것입니다. 커뮤니티는 이미 다양한 서비스와 사용 사례를 위한 수백 개의 서버를 개발했습니다.

    MCP 서버 개발 프레임워크

    MCP 서버 개발을 단순화하는 다양한 프레임워크가 있습니다:

    1. 공식 SDK (MCP 명세 2025-11-25에 맞춤):

    - TypeScript SDK

    - Python SDK

    - C# SDK

    - Go SDK

    - Java SDK

    - Kotlin SDK

    - Swift SDK

    - Rust SDK

    2. 커뮤니티 프레임워크:

    - MCP-Framework - TypeScript로 우아하고 빠르게 MCP 서버 구축

    - MCP 선언적 Java SDK - Java로 주석 기반 MCP 서버 개발

    - Quarkus MCP 서버 SDK - MCP 서버용 Java 프레임워크

    - Next.js MCP 서버 템플릿 - MCP 서버를 위한 Next.js 스타터 프로젝트

    공유 가능한 도구 개발

    .NET 예제: 공유 가능한 도구 패키지 생성
    
    // Create a new .NET library project
    
    // dotnet new classlib -n McpFinanceTools
    
    
    
    using Microsoft.Mcp.Tools;
    
    using System.Threading.Tasks;
    
    using System.Net.Http;
    
    using System.Text.Json;
    
    
    
    namespace McpFinanceTools
    
    {
    
        // Stock quote tool
    
        public class StockQuoteTool : IMcpTool
    
        {
    
            private readonly HttpClient _httpClient;
    
            
    
            public StockQuoteTool(HttpClient httpClient = null)
    
            {
    
                _httpClient = httpClient ?? new HttpClient();
    
            }
    
            
    
            public string Name => "stockQuote";
    
            public string Description => "Gets current stock quotes for specified symbols";
    
            
    
            public object GetSchema()
    
            {
    
                return new {
    
                    type = "object",
    
                    properties = new {
    
                        symbol = new { 
    
                            type = "string",
    
                            description = "Stock symbol (e.g., MSFT, AAPL)" 
    
                        },
    
                        includeHistory = new { 
    
                            type = "boolean",
    
                            description = "Whether to include historical data",
    
                            default = false
    
                        }
    
                    },
    
                    required = new[] { "symbol" }
    
                };
    
            }
    
            
    
            public async Task<ToolResponse> ExecuteAsync(ToolRequest request)
    
            {
    
                // Extract parameters
    
                string symbol = request.Parameters.GetProperty("symbol").GetString();
    
                bool includeHistory = false;
    
                
    
                if (request.Parameters.TryGetProperty("includeHistory", out var historyProp))
    
                {
    
                    includeHistory = historyProp.GetBoolean();
    
                }
    
                
    
                // Call external API (example)
    
                var quoteResult = await GetStockQuoteAsync(symbol);
    
                
    
                // Add historical data if requested
    
                if (includeHistory)
    
                {
    
                    var historyData = await GetStockHistoryAsync(symbol);
    
                    quoteResult.Add("history", historyData);
    
                }
    
                
    
                // Return formatted result
    
                return new ToolResponse {
    
                    Result = JsonSerializer.SerializeToElement(quoteResult)
    
                };
    
            }
    
            
    
            private async Task<Dictionary<string, object>> GetStockQuoteAsync(string symbol)
    
            {
    
                // Implementation would call a real stock API
    
                // This is a simplified example
    
                return new Dictionary<string, object>
    
                {
    
                    ["symbol"] = symbol,
    
                    ["price"] = 123.45,
    
                    ["change"] = 2.5,
    
                    ["percentChange"] = 1.2,
    
                    ["lastUpdated"] = DateTime.UtcNow
    
                };
    
            }
    
            
    
            private async Task<object> GetStockHistoryAsync(string symbol)
    
            {
    
                // Implementation would get historical data
    
                // Simplified example
    
                return new[]
    
                {
    
                    new { date = DateTime.Now.AddDays(-7).Date, price = 120.25 },
    
                    new { date = DateTime.Now.AddDays(-6).Date, price = 122.50 },
    
                    new { date = DateTime.Now.AddDays(-5).Date, price = 121.75 }
    
                    // More historical data...
    
                };
    
            }
    
        }
    
    }
    
    
    
    // Create package and publish to NuGet
    
    // dotnet pack -c Release
    
    // dotnet nuget push bin/Release/McpFinanceTools.1.0.0.nupkg -s https://api.nuget.org/v3/index.json -k YOUR_API_KEY
    
    
    Java 예제: 도구용 Maven 패키지 생성
    
    // 공유 가능한 MCP 도구 패키지를 위한 pom.xml 구성
    
    <!-- 
    
    <project>
    
        <groupId>com.example</groupId>
    
        <artifactId>mcp-weather-tools</artifactId>
    
        <version>1.0.0</version>
    
        
    
        <dependencies>
    
            <dependency>
    
                <groupId>com.mcp</groupId>
    
                <artifactId>mcp-server</artifactId>
    
                <version>1.0.0</version>
    
            </dependency>
    
        </dependencies>
    
        
    
        <distributionManagement>
    
            <repository>
    
                <id>github</id>
    
                <name>GitHub Packages</name>
    
                <url>https://maven.pkg.github.com/username/mcp-weather-tools</url>
    
            </repository>
    
        </distributionManagement>
    
    </project>
    
    -->
    
    
    
    package com.example.mcp.weather;
    
    
    
    import com.mcp.tools.Tool;
    
    import com.mcp.tools.ToolRequest;
    
    import com.mcp.tools.ToolResponse;
    
    import com.mcp.tools.ToolExecutionException;
    
    
    
    import java.net.http.HttpClient;
    
    import java.net.http.HttpRequest;
    
    import java.net.http.HttpResponse;
    
    import java.net.URI;
    
    import java.util.HashMap;
    
    import java.util.Map;
    
    
    
    public class WeatherForecastTool implements Tool {
    
        private final HttpClient httpClient;
    
        private final String apiKey;
    
        
    
        public WeatherForecastTool(String apiKey) {
    
            this.httpClient = HttpClient.newHttpClient();
    
            this.apiKey = apiKey;
    
        }
    
        
    
        @Override
    
        public String getName() {
    
            return "weatherForecast";
    
        }
    
        
    
        @Override
    
        public String getDescription() {
    
            return "Gets weather forecast for a specified location";
    
        }
    
        
    
        @Override
    
        public Object getSchema() {
    
            Map<String, Object> schema = new HashMap<>();
    
            // 스키마 정의...
    
            return schema;
    
        }
    
        
    
        @Override
    
        public ToolResponse execute(ToolRequest request) {
    
            try {
    
                String location = request.getParameters().get("location").asText();
    
                int days = request.getParameters().has("days") ? 
    
                    request.getParameters().get("days").asInt() : 3;
    
                
    
                // 날씨 API 호출
    
                Map<String, Object> forecast = getForecast(location, days);
    
                
    
                // 응답 생성
    
                return new ToolResponse.Builder()
    
                    .setResult(forecast)
    
                    .build();
    
            } catch (Exception ex) {
    
                throw new ToolExecutionException("Weather forecast failed: " + ex.getMessage(), ex);
    
            }
    
        }
    
        
    
        private Map<String, Object> getForecast(String location, int days) {
    
            // 구현에서는 날씨 API를 호출합니다
    
            // 단순화된 예제
    
            Map<String, Object> result = new HashMap<>();
    
            // 예보 데이터 추가...
    
            return result;
    
        }
    
    }
    
    
    
    // Maven을 사용하여 빌드 및 배포
    
    // mvn clean package
    
    // mvn deploy
    
    
    Python 예제: PyPI 패키지 배포
    
    # PyPI 패키지의 디렉토리 구조:
    
    # mcp_nlp_tools/
    
    # ├── LICENSE
    
    # ├── README.md
    
    # ├── setup.py
    
    # ├── mcp_nlp_tools/
    
    # │   ├── __init__.py
    
    # │   ├── sentiment_tool.py
    
    # │   └── translation_tool.py
    
    
    
    # setup.py 예제
    
    """
    
    from setuptools import setup, find_packages
    
    
    
    setup(
    
        name="mcp_nlp_tools",
    
        version="0.1.0",
    
        packages=find_packages(),
    
        install_requires=[
    
            "mcp_server>=1.0.0",
    
            "transformers>=4.0.0",
    
            "torch>=1.8.0"
    
        ],
    
        author="Your Name",
    
        author_email="your.email@example.com",
    
        description="MCP tools for natural language processing tasks",
    
        long_description=open("README.md").read(),
    
        long_description_content_type="text/markdown",
    
        url="https://github.com/username/mcp_nlp_tools",
    
        classifiers=[
    
            "Programming Language :: Python :: 3",
    
            "License :: OSI Approved :: MIT License",
    
            "Operating System :: OS Independent",
    
        ],
    
        python_requires=">=3.8",
    
    )
    
    """
    
    
    
    # NLP 도구 구현 예제 (sentiment_tool.py)
    
    from mcp_tools import Tool, ToolRequest, ToolResponse, ToolExecutionException
    
    from transformers import pipeline
    
    import torch
    
    
    
    class SentimentAnalysisTool(Tool):
    
        """MCP tool for sentiment analysis of text"""
    
        
    
        def __init__(self, model_name="distilbert-base-uncased-finetuned-sst-2-english"):
    
            # 감정 분석 모델 로드
    
            self.sentiment_analyzer = pipeline("sentiment-analysis", model=model_name)
    
        
    
        def get_name(self):
    
            return "sentimentAnalysis"
    
            
    
        def get_description(self):
    
            return "Analyzes the sentiment of text, classifying it as positive or negative"
    
        
    
        def get_schema(self):
    
            return {
    
                "type": "object",
    
                "properties": {
    
                    "text": {
    
                        "type": "string", 
    
                        "description": "The text to analyze for sentiment"
    
                    },
    
                    "includeScore": {
    
                        "type": "boolean",
    
                        "description": "Whether to include confidence scores",
    
                        "default": True
    
                    }
    
                },
    
                "required": ["text"]
    
            }
    
        
    
        async def execute_async(self, request: ToolRequest) -> ToolResponse:
    
            try:
    
                # 파라미터 추출
    
                text = request.parameters.get("text")
    
                include_score = request.parameters.get("includeScore", True)
    
                
    
                # 감정 분석 수행
    
                sentiment_result = self.sentiment_analyzer(text)[0]
    
                
    
                # 결과 형식화
    
                result = {
    
                    "sentiment": sentiment_result["label"],
    
                    "text": text
    
                }
    
                
    
                if include_score:
    
                    result["score"] = sentiment_result["score"]
    
                
    
                # 결과 반환
    
                return ToolResponse(result=result)
    
                
    
            except Exception as e:
    
                raise ToolExecutionException(f"Sentiment analysis failed: {str(e)}")
    
    
    
    # 배포를 위해:
    
    # python setup.py sdist bdist_wheel
    
    # python -m twine upload dist/*
    
    

    공유 시 모범 사례

    MCP 도구를 커뮤니티와 공유할 때:

    1. 완전한 문서화:

    - 목적, 사용법 및 예제 문서화

    - 매개변수 및 반환값 설명

    - 외부 종속성 문서화

    2. 오류 처리:

    - 견고한 오류 처리 구현

    - 유용한 오류 메시지 제공

    - 가장자리 케이스 우아하게 처리

    3. 성능 고려:

    - 속도와 자원 사용 최적화

    - 적절할 때 캐싱 구현

    - 확장성 고려

    4. 보안:

    - 안전한 API 키 및 인증 사용

    - 입력값 검증 및 정제

    - 외부 API 호출에 대한 속도 제한 구현

    5. 테스트:

    - 포괄적인 테스트 커버리지 포함

    - 다양한 입력 유형 및 가장자리 케이스 테스트

    - 테스트 절차 문서화

    커뮤니티 협업 및 모범 사례

    효과적인 협업은 번창하는 MCP 생태계의 핵심입니다.

    소통 채널

  • GitHub 이슈 및 토론
  • Microsoft Tech Community
  • Discord 및 Slack 채널
  • Stack Overflow (태그: model-context-protocol 또는 mcp)
  • 코드 리뷰

    MCP 기여를 검토할 때:

    1. 명확성: 코드가 명확하고 잘 문서화되었나?

    2. 정확성: 기대대로 작동하는가?

    3. 일관성: 프로젝트 규칙을 따르는가?

    4. 완성도: 테스트와 문서가 포함되었나?

    5. 보안: 보안 문제가 있는가?

    버전 호환성

    MCP용 개발 시:

    1. 프로토콜 버전 관리: 도구가 지원하는 MCP 프로토콜 버전 준수

    2. 클라이언트 호환성: 이전 버전과의 호환성 고려

    3. 서버 호환성: 서버 구현 가이드라인 준수

    4. 파괴적 변경: 파괴적 변경 사항을 명확히 문서화

    예제 커뮤니티 프로젝트: MCP 도구 레지스트리

    중요한 커뮤니티 기여로 MCP 도구를 위한 공개 레지스트리를 개발할 수 있습니다.

    
    # 커뮤니티 도구 등록 API 예제 스키마
    
    
    
    from fastapi import FastAPI, HTTPException, Depends
    
    from pydantic import BaseModel, Field, HttpUrl
    
    from typing import List, Optional
    
    import datetime
    
    import uuid
    
    
    
    # 도구 등록을 위한 모델
    
    class ToolSchema(BaseModel):
    
        """JSON Schema for a tool"""
    
        type: str
    
        properties: dict
    
        required: List[str] = []
    
    
    
    class ToolRegistration(BaseModel):
    
        """Information for registering a tool"""
    
        name: str = Field(..., description="Unique name for the tool")
    
        description: str = Field(..., description="Description of what the tool does")
    
        version: str = Field(..., description="Semantic version of the tool")
    
        schema: ToolSchema = Field(..., description="JSON Schema for tool parameters")
    
        author: str = Field(..., description="Author of the tool")
    
        repository: Optional[HttpUrl] = Field(None, description="Repository URL")
    
        documentation: Optional[HttpUrl] = Field(None, description="Documentation URL")
    
        package: Optional[HttpUrl] = Field(None, description="Package URL")
    
        tags: List[str] = Field(default_factory=list, description="Tags for categorization")
    
        examples: List[dict] = Field(default_factory=list, description="Example usage")
    
    
    
    class Tool(ToolRegistration):
    
        """Tool with registry metadata"""
    
        id: uuid.UUID = Field(default_factory=uuid.uuid4)
    
        created_at: datetime.datetime = Field(default_factory=datetime.datetime.now)
    
        updated_at: datetime.datetime = Field(default_factory=datetime.datetime.now)
    
        downloads: int = Field(default=0)
    
        rating: float = Field(default=0.0)
    
        ratings_count: int = Field(default=0)
    
    
    
    # 등록을 위한 FastAPI 애플리케이션
    
    app = FastAPI(title="MCP Tool Registry")
    
    
    
    # 이 예제를 위한 메모리 내 데이터베이스
    
    tools_db = {}
    
    
    
    @app.post("/tools", response_model=Tool)
    
    async def register_tool(tool: ToolRegistration):
    
        """Register a new tool in the registry"""
    
        if tool.name in tools_db:
    
            raise HTTPException(status_code=400, detail=f"Tool '{tool.name}' already exists")
    
        
    
        new_tool = Tool(**tool.dict())
    
        tools_db[tool.name] = new_tool
    
        return new_tool
    
    
    
    @app.get("/tools", response_model=List[Tool])
    
    async def list_tools(tag: Optional[str] = None):
    
        """List all registered tools, optionally filtered by tag"""
    
        if tag:
    
            return [tool for tool in tools_db.values() if tag in tool.tags]
    
        return list(tools_db.values())
    
    
    
    @app.get("/tools/{tool_name}", response_model=Tool)
    
    async def get_tool(tool_name: str):
    
        """Get information about a specific tool"""
    
        if tool_name not in tools_db:
    
            raise HTTPException(status_code=404, detail=f"Tool '{tool_name}' not found")
    
        return tools_db[tool_name]
    
    
    
    @app.delete("/tools/{tool_name}")
    
    async def delete_tool(tool_name: str):
    
        """Delete a tool from the registry"""
    
        if tool_name not in tools_db:
    
            raise HTTPException(status_code=404, detail=f"Tool '{tool_name}' not found")
    
        del tools_db[tool_name]
    
        return {"message": f"Tool '{tool_name}' deleted"}
    
    

    주요 요점

  • MCP 커뮤니티는 다양하며 여러 유형의 기여를 환영합니다
  • MCP에 기여는 핵심 프로토콜 개선부터 맞춤 도구 개발까지 다양합니다
  • 기여 가이드라인 준수는 PR 수용 가능성을 높입니다
  • MCP 도구를 만들고 공유하는 것은 생태계 향상의 가치 있는 방법입니다
  • 커뮤니티 협업은 MCP 성장과 개선의 필수 요소입니다
  • 연습 문제

    1. 본인의 역량과 관심사에 기반해 MCP 생태계에서 기여할 영역을 찾아보세요

    2. MCP 저장소를 포크하고 로컬 개발 환경을 설정하세요

    3. 커뮤니티에 도움이 될 작은 향상, 버그 수정 또는 도구를 만드세요

    4. 적절한 테스트와 문서화로 기여 내용을 문서화하세요

    5. 적절한 저장소에 풀 리퀘스트를 제출하세요

    추가 리소스

  • MCP 커뮤니티 프로젝트
  • ---

    다음 내용

    다음: 초기 도입의 교훈

    ---

    면책 조항:

    이 문서는 AI 번역 서비스 Co-op Translator를 사용하여 번역되었습니다.

    정확성을 위해 노력하고 있으나, 자동 번역에는 오류나 부정확성이 포함될 수 있음을 유의하시기 바랍니다.

    원본 문서의 원어 버전이 권위 있는 출처로 간주되어야 합니다.

    중요한 정보의 경우 전문 인력에 의한 번역을 권장합니다.

    이 번역의 사용으로 인해 발생하는 오해나 잘못된 해석에 대해 당사는 책임을 지지 않습니다.

    code Module 07

    Module 07 — 초기 도입 교훈

    🌟 초기 도입자들의 교훈

    _(위 이미지를 클릭하여 이 수업의 동영상을 시청하세요)_

    🎯 이 모듈에서 다루는 내용

    이 모듈은 실제 조직과 개발자가 모델 컨텍스트 프로토콜(MCP)을 활용하여 실제 문제를 해결하고 혁신을 주도하는 방법을 탐구합니다. 상세한 사례 연구, 실습 프로젝트, 실용적인 예제를 통해 MCP가 언어 모델, 도구, 엔터프라이즈 데이터를 연결하는 안전하고 확장 가능한 AI 통합을 어떻게 가능하게 하는지 알아봅니다.

    📚 MCP를 실제로 보기

    이 원칙들이 생산 준비가 된 도구에 어떻게 적용되는지 보고 싶나요? 지금 사용할 수 있는 실제 마이크로소프트 MCP 서버를 소개하는 10가지 마이크로소프트 MCP 서버가 개발자 생산성을 혁신하는 방법를 확인해 보세요.

    개요

    이 수업에서는 초기 도입자들이 모델 컨텍스트 프로토콜(MCP)을 활용해 산업 전반에 걸쳐 실제 문제를 해결하고 혁신을 주도한 사례를 탐구합니다.

    상세한 사례 연구와 실습 프로젝트를 통해 MCP가 대규모 언어 모델, 도구, 엔터프라이즈 데이터를 통합적인 프레임워크로 연결하는 표준화되고 안전하며 확장 가능한 AI 통합을 어떻게 구현하는지 살펴봅니다.

    MCP 기반 솔루션을 설계하고 구축하는 실무 경험을 쌓고, 검증된 구현 패턴을 배우며, 프로덕션 환경에 MCP를 배포하기 위한 모범 사례를 발견하게 될 것입니다.

    또한 떠오르는 트렌드, 향후 방향성, 오픈소스 리소스도 소개하여 MCP 기술과 진화하는 생태계의 최전선에 머물 수 있도록 도와줍니다.

    학습 목표

  • 다양한 산업에서의 실제 MCP 구현 사례 분석
  • 완전한 MCP 기반 애플리케이션 설계 및 구축
  • MCP 기술의 새로운 트렌드 및 미래 방향 탐색
  • 실제 개발 시나리오에서 모범 사례 적용
  • 실제 MCP 구현 사례

    사례 연구 1: 엔터프라이즈 고객 지원 자동화

    글로벌 다국적 기업이 고객 지원 시스템 전반에 걸쳐 AI 상호작용을 표준화하기 위해 MCP 기반 솔루션을 구현했습니다. 이를 통해 다음을 실현했습니다:

  • 다수의 LLM 공급자를 위한 통합 인터페이스 구축
  • 부서 간 일관된 프롬프트 관리 유지
  • 견고한 보안 및 컴플라이언스 제어 구현
  • 특정 요구에 따라 다양한 AI 모델 간 손쉬운 전환
  • 기술적 구현:

    
    # 고객 지원을 위한 Python MCP 서버 구현
    
    import logging
    
    import asyncio
    
    from modelcontextprotocol import create_server, ServerConfig
    
    from modelcontextprotocol.server import MCPServer
    
    from modelcontextprotocol.transports import create_http_transport
    
    from modelcontextprotocol.resources import ResourceDefinition
    
    from modelcontextprotocol.prompts import PromptDefinition
    
    from modelcontextprotocol.tool import ToolDefinition
    
    
    
    # 로깅 구성
    
    logging.basicConfig(level=logging.INFO)
    
    
    
    async def main():
    
        # 서버 구성 생성
    
        config = ServerConfig(
    
            name="Enterprise Customer Support Server",
    
            version="1.0.0",
    
            description="MCP server for handling customer support inquiries"
    
        )
    
        
    
        # MCP 서버 초기화
    
        server = create_server(config)
    
        
    
        # 지식 베이스 리소스 등록
    
        server.resources.register(
    
            ResourceDefinition(
    
                name="customer_kb",
    
                description="Customer knowledge base documentation"
    
            ),
    
            lambda params: get_customer_documentation(params)
    
        )
    
        
    
        # 프롬프트 템플릿 등록
    
        server.prompts.register(
    
            PromptDefinition(
    
                name="support_template",
    
                description="Templates for customer support responses"
    
            ),
    
            lambda params: get_support_templates(params)
    
        )
    
        
    
        # 지원 도구 등록
    
        server.tools.register(
    
            ToolDefinition(
    
                name="ticketing",
    
                description="Create and update support tickets"
    
            ),
    
            handle_ticketing_operations
    
        )
    
        
    
        # HTTP 전송으로 서버 시작
    
        transport = create_http_transport(port=8080)
    
        await server.run(transport)
    
    
    
    if __name__ == "__main__":
    
        asyncio.run(main())
    
    

    결과: 모델 비용 30% 절감, 응답 일관성 45% 향상, 글로벌 운영 전반에 걸친 컴플라이언스 강화

    사례 연구 2: 의료 진단 보조

    의료 제공자가 민감한 환자 데이터 보호를 보장하면서 여러 전문 의료 AI 모델을 통합하는 MCP 인프라를 개발했습니다:

  • 일반 의료 모델과 전문 의료 모델 간의 원활한 전환
  • 엄격한 개인정보 보호 제어 및 감사 추적
  • 기존 전자의무기록(EHR) 시스템과의 통합
  • 의료 용어에 대한 일관된 프롬프트 엔지니어링
  • 기술적 구현:

    
    // C# MCP host application implementation in healthcare application
    
    using Microsoft.Extensions.DependencyInjection;
    
    using ModelContextProtocol.SDK.Client;
    
    using ModelContextProtocol.SDK.Security;
    
    using ModelContextProtocol.SDK.Resources;
    
    
    
    public class DiagnosticAssistant
    
    {
    
        private readonly MCPHostClient _mcpClient;
    
        private readonly PatientContext _patientContext;
    
        
    
        public DiagnosticAssistant(PatientContext patientContext)
    
        {
    
            _patientContext = patientContext;
    
            
    
            // Configure MCP client with healthcare-specific settings
    
            var clientOptions = new ClientOptions
    
            {
    
                Name = "Healthcare Diagnostic Assistant",
    
                Version = "1.0.0",
    
                Security = new SecurityOptions
    
                {
    
                    Encryption = EncryptionLevel.Medical,
    
                    AuditEnabled = true
    
                }
    
            };
    
            
    
            _mcpClient = new MCPHostClientBuilder()
    
                .WithOptions(clientOptions)
    
                .WithTransport(new HttpTransport("https://healthcare-mcp.example.org"))
    
                .WithAuthentication(new HIPAACompliantAuthProvider())
    
                .Build();
    
        }
    
        
    
        public async Task<DiagnosticSuggestion> GetDiagnosticAssistance(
    
            string symptoms, string patientHistory)
    
        {
    
            // Create request with appropriate resources and tool access
    
            var resourceRequest = new ResourceRequest
    
            {
    
                Name = "patient_records",
    
                Parameters = new Dictionary<string, object>
    
                {
    
                    ["patientId"] = _patientContext.PatientId,
    
                    ["requestingProvider"] = _patientContext.ProviderId
    
                }
    
            };
    
            
    
            // Request diagnostic assistance using appropriate prompt
    
            var response = await _mcpClient.SendPromptRequestAsync(
    
                promptName: "diagnostic_assistance",
    
                parameters: new Dictionary<string, object>
    
                {
    
                    ["symptoms"] = symptoms,
    
                    patientHistory = patientHistory,
    
                    relevantGuidelines = _patientContext.GetRelevantGuidelines()
    
                });
    
                
    
            return DiagnosticSuggestion.FromMCPResponse(response);
    
        }
    
    }
    
    

    결과: HIPAA 완전 준수 상태에서 의사의 진단 제안을 향상시키고 시스템 간 컨텍스트 전환 횟수 대폭 감소

    사례 연구 3: 금융 서비스 리스크 분석

    금융 기관이 다양한 부서 전반에서 리스크 분석 프로세스를 표준화하기 위해 MCP를 구현했습니다:

  • 신용 리스크, 사기 탐지 및 투자 리스크 모델을 위한 통합 인터페이스 구축
  • 엄격한 접근 제어 및 모델 버전 관리 구현
  • 모든 AI 권고 사항에 대한 감사지원 보장
  • 다양한 시스템 간 데이터 형식 일관성 유지
  • 기술적 구현:

    
    // 금융 위험 평가를 위한 Java MCP 서버
    
    import org.mcp.server.*;
    
    import org.mcp.security.*;
    
    
    
    public class FinancialRiskMCPServer {
    
        public static void main(String[] args) {
    
            // 금융 규정 준수 기능을 갖춘 MCP 서버 생성
    
            MCPServer server = new MCPServerBuilder()
    
                .withModelProviders(
    
                    new ModelProvider("risk-assessment-primary", new AzureOpenAIProvider()),
    
                    new ModelProvider("risk-assessment-audit", new LocalLlamaProvider())
    
                )
    
                .withPromptTemplateDirectory("./compliance/templates")
    
                .withAccessControls(new SOCCompliantAccessControl())
    
                .withDataEncryption(EncryptionStandard.FINANCIAL_GRADE)
    
                .withVersionControl(true)
    
                .withAuditLogging(new DatabaseAuditLogger())
    
                .build();
    
                
    
            server.addRequestValidator(new FinancialDataValidator());
    
            server.addResponseFilter(new PII_RedactionFilter());
    
            
    
            server.start(9000);
    
            
    
            System.out.println("Financial Risk MCP Server running on port 9000");
    
        }
    
    }
    
    

    결과: 규제 준수 향상, 모델 배포 주기 40% 단축, 부서 간 리스크 평가 일관성 개선

    사례 연구 4: Microsoft Playwright MCP 서버를 이용한 브라우저 자동화

    마이크로소프트는 모델 컨텍스트 프로토콜을 통해 안전하고 표준화된 브라우저 자동화를 가능하게 하는 Playwright MCP 서버를 개발했습니다.

    이 프로덕션 준비된 서버는 AI 에이전트와 LLM이 통제되고 감사 가능한 방식으로 웹 브라우저와 상호작용하도록 하여 자동화된 웹 테스트, 데이터 추출, 엔드 투 엔드 워크플로우와 같은 사용 사례를 지원합니다.

    > 🎯 프로덕션 준비 도구

    >

    > 이 사례 연구는 지금 바로 사용할 수 있는 실제 MCP 서버를 보여줍니다! Playwright MCP 서버 및 기타 9개의 생산 준비된 Microsoft MCP 서버에 대해 더 알고 싶다면 Microsoft MCP 서버 가이드를 참고하세요.

    주요 기능:

  • 탐색, 폼 입력, 스크린샷 캡처 등 브라우저 자동화 기능을 MCP 도구로 노출
  • 무단 작업 방지를 위한 엄격한 접근 제어 및 샌드박싱 구현
  • 모든 브라우저 상호작용에 대한 상세한 감사 로그 제공
  • Azure OpenAI 및 기타 LLM 공급자와의 연동 지원, 에이전트 주도 자동화 가능
  • GitHub Copilot 코딩 에이전트에 웹 브라우징 기능 제공
  • 기술적 구현:

    
    // TypeScript: MCP 서버에 Playwright 브라우저 자동화 도구 등록
    
    import { createServer, ToolDefinition } from 'modelcontextprotocol';
    
    import { launch } from 'playwright';
    
    
    
    const server = createServer({
    
      name: 'Playwright MCP Server',
    
      version: '1.0.0',
    
      description: 'MCP server for browser automation using Playwright'
    
    });
    
    
    
    // URL로 이동하고 스크린샷을 캡처하는 도구 등록
    
    server.tools.register(
    
      new ToolDefinition({
    
        name: 'navigate_and_screenshot',
    
        description: 'Navigate to a URL and capture a screenshot',
    
        parameters: {
    
          url: { type: 'string', description: 'The URL to visit' }
    
        }
    
      }),
    
      async ({ url }) => {
    
        const browser = await launch();
    
        const page = await browser.newPage();
    
        await page.goto(url);
    
        const screenshot = await page.screenshot();
    
        await browser.close();
    
        return { screenshot };
    
      }
    
    );
    
    
    
    // MCP 서버 시작
    
    server.listen(8080);
    
    

    결과:

  • AI 에이전트 및 LLM을 위한 안전한 프로그래밍 방식의 브라우저 자동화 지원
  • 수동 테스트 작업 감소 및 웹 애플리케이션 테스트 커버리지 향상
  • 기업 환경에서 브라우저 기반 도구 통합을 위한 재사용 가능하고 확장 가능한 프레임워크 제공
  • GitHub Copilot의 웹 브라우징 기능 동력 제공
  • 참고 자료:

  • Playwright MCP 서버 GitHub 저장소
  • Microsoft AI 및 자동화 솔루션
  • 사례 연구 5: Azure MCP – 엔터프라이즈급 모델 컨텍스트 프로토콜 서비스

    Azure MCP 서버(https://aka.ms/azmcp)는 마이크로소프트의 관리형 엔터프라이즈급 모델 컨텍스트 프로토콜 구현으로, 확장 가능하며 안전하고 규정을 준수하는 MCP 서버 기능을 클라우드 서비스로 제공합니다.

    Azure MCP는 조직이 MCP 서버를 빠르게 배포, 관리, 통합할 수 있도록 하며 Azure AI, 데이터, 보안 서비스와 연계해 운영 부담을 줄이고 AI 도입을 가속화합니다.

    > 🎯 프로덕션 준비 도구

    >

    > 이것은 지금 바로 사용할 수 있는 실제 MCP 서버입니다! Azure AI Foundry MCP 서버에 대해 더 알고 싶다면 Microsoft MCP 서버 가이드를 참고하세요.

  • 완전 관리형 MCP 서버 호스팅, 내장된 확장, 모니터링 및 보안 제공
  • Azure OpenAI, Azure AI 검색 및 기타 Azure 서비스와의 네이티브 통합
  • Microsoft Entra ID를 통한 엔터프라이즈 인증 및 권한 부여
  • 사용자 지정 도구, 프롬프트 템플릿, 리소스 커넥터 지원
  • 엔터프라이즈 보안 및 규제 요구사항 준수
  • 기술적 구현:

    
    # Example: Azure MCP server deployment configuration (YAML)
    
    apiVersion: mcp.microsoft.com/v1
    
    kind: McpServer
    
    metadata:
    
      name: enterprise-mcp-server
    
    spec:
    
      modelProviders:
    
        - name: azure-openai
    
          type: AzureOpenAI
    
          endpoint: https://<your-openai-resource>.openai.azure.com/
    
          apiKeySecret: <your-azure-keyvault-secret>
    
      tools:
    
        - name: document_search
    
          type: AzureAISearch
    
          endpoint: https://<your-search-resource>.search.windows.net/
    
          apiKeySecret: <your-azure-keyvault-secret>
    
      authentication:
    
        type: EntraID
    
        tenantId: <your-tenant-id>
    
      monitoring:
    
        enabled: true
    
        logAnalyticsWorkspace: <your-log-analytics-id>
    
    

    결과:

  • 준비된, 규정을 준수하는 MCP 서버 플랫폼 제공으로 엔터프라이즈 AI 프로젝트의 가치 실현 시간 단축
  • LLM, 도구, 엔터프라이즈 데이터 소스의 통합 간소화
  • MCP 워크로드에 대한 보안성, 관찰성 및 운영 효율성 향상
  • Azure SDK 모범 사례 및 최신 인증 패턴 적용으로 코드 품질 개선
  • 참고 자료:

  • Azure MCP 문서
  • Azure MCP 서버 GitHub 저장소
  • Azure AI 서비스
  • Microsoft MCP 센터
  • 사례 연구 6: NLWeb

    MCP(모델 컨텍스트 프로토콜)는 챗봇과 AI 어시스턴트가 도구와 상호작용하기 위한 새롭게 떠오르는 프로토콜입니다.

    모든 NLWeb 인스턴스도 MCP 서버로, 핵심 메서드 하나인 ask를 지원하며, 이 메서드는 자연어로 웹사이트에 질문을 하도록 사용됩니다.

    반환된 응답은 웹 데이터 기술을 설명하는 널리 사용되는 어휘 schema.org를 활용합니다.

    쉽게 말해 MCP는 NLWeb이 Http에 대응하는 HTML과 같습니다.

    NLWeb은 프로토콜, Schema.org 포맷 및 샘플 코드를 결합하여 사이트가 이러한 엔드포인트를 빠르게 생성할 수 있게 하여, 대화형 인터페이스를 통한 인간 사용자와 자연스러운 에이전트 간 상호작용을 모두 지원합니다.

    NLWeb에는 두 가지 구별되는 구성 요소가 있습니다.

  • 자연어 인터페이스를 위해 매우 간단한 프로토콜과 반환 답변에 json 및 schema.org를 활용하는 포맷. REST API 문서에서 자세한 내용을 확인할 수 있습니다.
  • 기존 마크업을 활용하는 (1)의 간단한 구현체로, 제품, 레시피, 명소, 리뷰 등 항목 목록으로 추상화할 수 있는 사이트에 적합합니다. 사용자 인터페이스 위젯과 함께 사이트 콘텐츠에 쉽게 대화형 인터페이스를 제공할 수 있습니다. Life of a chat query 문서에서 자세한 내용을 볼 수 있습니다.
  • 참고 자료:

  • Azure MCP 문서
  • NLWeb
  • 사례 연구 7: Azure AI Foundry MCP 서버 – 엔터프라이즈 AI 에이전트 통합

    Azure AI Foundry MCP 서버는 MCP가 엔터프라이즈 환경에서 AI 에이전트와 워크플로우를 조율하고 관리하는 데 어떻게 활용될 수 있는지 보여줍니다. MCP와 Azure AI Foundry를 통합함으로써, 조직은 에이전트 상호작용을 표준화하고, Foundry의 워크플로우 관리를 활용하며, 안전하고 확장 가능한 배포를 보장할 수 있습니다.

    > 🎯 프로덕션 준비 도구

    >

    > 이것은 지금 바로 사용할 수 있는 실제 MCP 서버입니다! Azure AI Foundry MCP 서버에 대해 더 알고 싶다면 Microsoft MCP 서버 가이드를 참고하세요.

    주요 기능:

  • 모델 카탈로그 및 배포 관리를 포함한 Azure AI 생태계에 대한 포괄적 접근
  • RAG 애플리케이션을 위한 Azure AI 검색을 통한 지식 인덱싱
  • AI 모델 성능 및 품질 보증 평가 도구
  • 첨단 연구 모델을 위한 Azure AI Foundry 카탈로그 및 랩 통합
  • 실제 시나리오용 에이전트 관리 및 평가 기능
  • 결과:

  • AI 에이전트 워크플로우의 빠른 프로토타입 제작과 강력한 모니터링
  • 고급 시나리오를 위한 Azure AI 서비스와 원활한 통합
  • 에이전트 파이프라인 구축, 배포, 모니터링을 위한 통합 인터페이스
  • 엔터프라이즈의 보안, 컴플라이언스, 운영 효율성 향상
  • 복잡한 에이전트 주도 프로세스에 대한 제어를 유지하면서 AI 도입 가속화
  • 참고 자료:

  • Azure AI Foundry MCP 서버 GitHub 저장소
  • Azure AI 에이전트와 MCP 통합 (Microsoft Foundry 블로그)
  • 사례 연구 8: Foundry MCP 플레이그라운드 – 실험 및 프로토타이핑

    Foundry MCP 플레이그라운드는 MCP 서버 및 Azure AI Foundry 통합 실험용으로 바로 사용할 수 있는 환경을 제공합니다.

    개발자는 Azure AI Foundry 카탈로그 및 연구소 리소스를 활용하여 AI 모델과 에이전트 워크플로우를 빠르게 프로토타입하고 테스트하며 평가할 수 있습니다.

    플레이그라운드는 설정을 간소화하고 샘플 프로젝트를 제공하며 협업 개발을 지원해 최소한의 오버헤드로 모범 사례와 새로운 시나리오를 탐구하기 쉽도록 합니다.

    이는 복잡한 인프라 없이 아이디어 검증, 실험 공유, 학습 가속화를 원하는 팀에 특히 유용하며 MCP와 Azure AI Foundry 생태계에서 혁신과 커뮤니티 기여를 촉진합니다.

    참고 자료:

  • Foundry MCP 플레이그라운드 GitHub 저장소
  • 사례 연구 9: Microsoft Learn Docs MCP 서버 – AI 기반 문서 접근

    Microsoft Learn Docs MCP 서버는 모델 컨텍스트 프로토콜을 통해 AI 어시스턴트에 공식 Microsoft 문서에 실시간으로 접근할 수 있는 클라우드 호스팅 서비스입니다. 이 프로덕션 준비된 서버는 광범위한 Microsoft Learn 생태계와 연결되어 모든 공식 Microsoft 소스에 대한 의미 기반 검색을 가능하게 합니다.

    > 🎯 프로덕션 준비 도구

    >

    > 이것은 지금 바로 사용할 수 있는 실제 MCP 서버입니다! Microsoft Learn Docs MCP 서버에 대해 더 알고 싶다면 Microsoft MCP 서버 가이드를 참고하세요.

    주요 기능:

  • 공식 Microsoft 문서, Azure 문서, Microsoft 365 문서에 대한 실시간 접근
  • 문맥과 의도를 이해하는 고급 의미 검색 기능
  • Microsoft Learn 콘텐츠 게시 시 항상 최신 정보 제공
  • Microsoft Learn, Azure 문서, Microsoft 365 자료 전반에 걸친 포괄적 커버리지
  • 기사 제목과 URL과 함께 최대 10개의 고품질 콘텐츠 청크 반환
  • 중요성:

  • Microsoft 기술에 대한 ‘오래된 AI 지식’ 문제 해결
  • AI 어시스턴트가 최신 .NET, C#, Azure, Microsoft 365 기능에 접근 가능
  • 정확한 코드 생성을 위한 권위 있는 1차 정보 제공
  • 빠르게 진화하는 Microsoft 기술을 사용하는 개발자에게 필수적
  • 결과:

  • Microsoft 기술용 AI 생성 코드 정확도 대폭 향상
  • 최신 문서 및 모범 사례 검색 시간 단축
  • 문맥 인지 문서 검색을 통한 개발자 생산성 증대
  • IDE를 떠나지 않고도 개발 워크플로우에 무리 없이 통합
  • 참고 자료:

  • Microsoft Learn Docs MCP 서버 GitHub 저장소
  • Microsoft Learn 문서
  • 실습 프로젝트

    프로젝트 1: 다중 공급자 MCP 서버 구축

    목표: 특정 기준에 따라 여러 AI 모델 공급자에게 요청을 라우팅할 수 있는 MCP 서버를 만듭니다.

    요구사항:

  • 최소 세 가지 모델 공급자 지원 (예: OpenAI, Anthropic, 로컬 모델)
  • 요청 메타데이터를 기반으로 하는 라우팅 메커니즘 구현
  • 공급자 자격 증명 관리용 구성 시스템 구축
  • 성능 및 비용 최적화를 위한 캐싱 추가
  • 사용량 모니터링을 위한 간단한 대시보드 제작
  • 구현 단계:

    1. 기본 MCP 서버 인프라 구축

    2. 각 AI 모델 서비스별 공급자 어댑터 구현

    3. 요청 속성을 기반으로 하는 라우팅 로직 생성

    4. 빈번한 요청에 대한 캐싱 메커니즘 추가

    5. 모니터링 대시보드 개발

    6. 다양한 요청 패턴에 대한 테스트

    기술: Python (.NET/Java/Python 중 선호하는 언어), 캐싱을 위한 Redis, 대시보드용 간단한 웹 프레임워크 중 선택

    프로젝트 2: 엔터프라이즈 프롬프트 관리 시스템

    목표: 조직 전체에서 프롬프트 템플릿을 관리, 버전 관리 및 배포하기 위한 MCP 기반 시스템 개발.

    요구 사항:

  • 프롬프트 템플릿을 위한 중앙 집중식 저장소 생성
  • 버전 관리 및 승인 워크플로우 구현
  • 샘플 입력을 통한 템플릿 테스트 기능 구축
  • 역할 기반 접근 제어 개발
  • 템플릿 검색 및 배포를 위한 API 생성
  • 구현 단계:

    1. 템플릿 저장을 위한 데이터베이스 스키마 설계

    2. 템플릿 CRUD 작업을 위한 핵심 API 생성

    3. 버전 관리 시스템 구현

    4. 승인 워크플로우 구축

    5. 테스트 프레임워크 개발

    6. 관리용 간단한 웹 인터페이스 생성

    7. MCP 서버와 통합

    기술: 백엔드 프레임워크, SQL 또는 NoSQL 데이터베이스, 관리 인터페이스용 프론트엔드 프레임워크를 자유롭게 선택.

    프로젝트 3: MCP 기반 콘텐츠 생성 플랫폼

    목표: MCP를 활용하여 다양한 콘텐츠 유형에서 일관된 결과를 제공하는 콘텐츠 생성 플랫폼 구축.

    요구 사항:

  • 다양한 콘텐츠 형식 지원 (블로그 게시물, 소셜 미디어, 마케팅 카피)
  • 맞춤화 옵션이 포함된 템플릿 기반 생성 구현
  • 콘텐츠 검토 및 피드백 시스템 구축
  • 콘텐츠 성과 지표 추적
  • 콘텐츠 버전 관리 및 반복 지원
  • 구현 단계:

    1. MCP 클라이언트 인프라 구축

    2. 다양한 콘텐츠 유형별 템플릿 생성

    3. 콘텐츠 생성 파이프라인 구축

    4. 검토 시스템 구현

    5. 지표 추적 시스템 개발

    6. 템플릿 관리 및 콘텐츠 생성을 위한 사용자 인터페이스 생성

    기술: 선호하는 프로그래밍 언어, 웹 프레임워크, 데이터베이스 시스템 사용.

    MCP 기술의 미래 방향

    새로운 트렌드

    1. 멀티모달 MCP

    - 이미지, 오디오, 비디오 모델과의 상호작용 표준화 위한 MCP 확장

    - 교차 모달 추론 기능 개발

    - 다양한 모달리티에 대한 표준화된 프롬프트 형식

    2. 분산형 MCP 인프라

    - 조직 간 자원 공유가 가능한 분산 MCP 네트워크

    - 안전한 모델 공유를 위한 표준 프로토콜

    - 개인정보 보호 계산 기술

    3. MCP 마켓플레이스

    - MCP 템플릿 및 플러그인 공유 및 수익화를 위한 생태계

    - 품질 보증 및 인증 프로세스

    - 모델 마켓플레이스와의 통합

    4. 엣지 컴퓨팅용 MCP

    - 자원 제한 엣지 디바이스에 적합한 MCP 표준화

    - 저대역폭 환경에 최적화된 프로토콜

    - IoT 생태계 특화 MCP 구현

    5. 규제 프레임워크

    - 규제 준수를 위한 MCP 확장 개발

    - 표준화된 감사 추적 및 설명 가능성 인터페이스

    - 신흥 AI 거버넌스 프레임워크와 통합

    Microsoft의 MCP 솔루션

    Microsoft와 Azure는 다양한 시나리오에서 MCP 구현을 지원하기 위해 여러 오픈소스 저장소를 개발했습니다:

    Microsoft 조직

    1. playwright-mcp - 브라우저 자동화 및 테스트용 Playwright MCP 서버

    2. files-mcp-server - 로컬 테스트 및 커뮤니티 기여를 위한 OneDrive MCP 서버 구현

    3. NLWeb - NLWeb은 AI 웹을 위한 기반 레이어 구축에 중점을 둔 오픈 프로토콜과 도구 모음

    Azure-Samples 조직

    1. mcp - 여러 언어를 사용한 Azure MCP 서버 구축 및 통합을 위한 샘플, 도구, 리소스 링크

    2. mcp-auth-servers - 현재 Model Context Protocol 사양에 따른 인증 데모 MCP 서버

    3. remote-mcp-functions - Azure Functions 기반 원격 MCP 서버 구현 랜딩 페이지 및 언어별 저장소 링크

    4. remote-mcp-functions-python - Azure Functions와 Python을 사용한 원격 MCP 서버 구축 및 배포를 위한 퀵스타트 템플릿

    5. remote-mcp-functions-dotnet - Azure Functions와 .NET/C#을 사용한 원격 MCP 서버 퀵스타트 템플릿

    6. remote-mcp-functions-typescript - Azure Functions와 TypeScript를 활용한 원격 MCP 서버 퀵스타트 템플릿

    7. remote-mcp-apim-functions-python - Python을 사용한 Azure API Management를 통한 원격 MCP 서버 게이트웨이

    8. AI-Gateway - Azure OpenAI 및 AI Foundry와 통합된 MCP 기능을 포함한 APIM ❤️ AI 실험들

    이 저장소들은 다양한 프로그래밍 언어와 Azure 서비스를 활용한 Model Context Protocol 작업을 위한 여러 구현, 템플릿, 리소스를 제공합니다. 기본 서버 구현부터 인증, 클라우드 배포, 엔터프라이즈 통합 시나리오까지 다양한 사용 사례를 다룹니다.

    MCP 리소스 디렉터리

    공식 Microsoft MCP 저장소 내 MCP Resources 디렉터리는 Model Context Protocol 서버와 함께 사용할 수 있는 샘플 리소스, 프롬프트 템플릿, 도구 정의의 엄선된 컬렉션을 제공합니다.

    이 디렉터리는 재사용 가능한 빌딩 블록과 모범 사례 예제를 통해 개발자가 MCP를 빠르게 시작할 수 있도록 설계되었습니다:

  • 프롬프트 템플릿: 일반 AI 작업 및 시나리오에 활용 가능한 즉시 사용 가능한 프롬프트 템플릿으로, 자체 MCP 서버 구현에 맞게 조정 가능
  • 도구 정의: 다양한 MCP 서버 간 도구 통합 및 호출 표준화를 위한 도구 스키마 및 메타데이터 예제
  • 리소스 샘플: MCP 프레임워크 내 데이터 소스, API, 외부 서비스 연결용 리소스 정의 예제
  • 참고 구현: 실제 MCP 프로젝트에서 리소스, 프롬프트, 도구의 구조와 조직 방법을 보여주는 실용 샘플
  • 이 리소스들은 개발 가속화, 표준화 촉진, 우수 사례 적용을 도와 MCP 기반 솔루션 구축과 배포 시 품질을 보장합니다.

    MCP 리소스 디렉터리
  • MCP 리소스 (샘플 프롬프트, 도구 및 리소스 정의)
  • 연구 기회

  • MCP 프레임워크 내 효율적인 프롬프트 최적화 기법
  • 다중 테넌트 MCP 배포를 위한 보안 모델
  • 다양한 MCP 구현 간 성능 벤치마킹
  • MCP 서버의 형식적 검증 방법
  • 결론

    Model Context Protocol (MCP)은 산업 전반에 걸쳐 표준화되고 안전하며 상호 운용 가능한 AI 통합의 미래를 빠르게 형성하고 있습니다.

    이 수업에서 다룬 사례 연구와 실습 프로젝트를 통해 Microsoft와 Azure를 포함한 초기 도입자들이 MCP를 활용해 실제 문제를 해결하고 AI 도입을 가속화하며 준수, 보안, 확장성을 보장하는 방법을 확인했습니다.

    MCP의 모듈화 접근법은 조직이 대규모 언어 모델, 도구, 기업 데이터를 통합되고 감사 가능한 단일 프레임워크에서 연결할 수 있게 합니다.

    MCP가 계속 발전함에 따라 커뮤니티와의 지속적 소통, 오픈소스 자원 탐색, 최선의 실천 방법 적용은 견고하고 미래지향적인 AI 솔루션 구축의 핵심이 될 것입니다.

    추가 리소스

  • MCP Foundry GitHub 저장소
  • Foundry MCP Playground
  • Azure AI 에이전트와 MCP 통합 (Microsoft Foundry 블로그)
  • MCP GitHub 저장소 (Microsoft)
  • MCP 리소스 디렉터리 (샘플 프롬프트, 도구 및 리소스 정의)
  • MCP 커뮤니티 및 문서
  • MCP 사양 (2025-11-25)
  • Azure MCP 문서
  • OWASP MCP Top 10 - 보안 우수 사례
  • Playwright MCP 서버 GitHub 저장소
  • Files MCP 서버 (OneDrive)
  • Azure-Samples MCP
  • MCP 인증 서버들 (Azure-Samples)
  • 원격 MCP 함수 (Azure-Samples)
  • 원격 MCP 함수 Python (Azure-Samples)
  • 원격 MCP 함수 .NET (Azure-Samples)
  • 원격 MCP 함수 TypeScript (Azure-Samples)
  • 원격 MCP APIM 함수 Python (Azure-Samples)
  • AI-Gateway (Azure-Samples)
  • Microsoft AI 및 자동화 솔루션
  • 실습 과제

    1. 사례 연구 중 하나를 분석하고 대체 구현 방안을 제안하시오.

    2. 프로젝트 아이디어 중 하나를 선택하여 상세한 기술 사양서를 작성하시오.

    3. 사례 연구에 다루지 않은 산업 분야를 조사하고 MCP가 해당 분야의 구체적 과제를 어떻게 해결할 수 있을지 개요를 작성하시오.

    4. 미래 방향 중 하나를 탐색하고 이를 지원하는 새로운 MCP 확장 개념을 만들시오.

    다음 단계

    더 알아보기: Microsoft MCP 서버들

    계속하기: 모듈 8: 모범 사례

    ---

    면책 조항:

    이 문서는 AI 번역 서비스 Co-op Translator를 사용하여 번역되었습니다.

    정확성을 위해 최선을 다하고 있으나 자동 번역에는 오류나 부정확성이 있을 수 있음을 유의해 주시기 바랍니다.

    원본 문서는 해당 언어의 원문이 권위 있는 출처로 간주되어야 합니다.

    중요한 정보의 경우 전문적인 인간 번역을 권장합니다.

    본 번역 사용으로 인해 발생하는 오해나 잘못된 해석에 대해서는 책임을 지지 않습니다.