Files
2026-07-13 13:31:35 +08:00

48 KiB

കമ്മ്യൂണിറ്റി మరియు സംഭാവനകൾ

MCP-യിലേക്ക് സംഭാവന എങ്ങനെ ചെയ്യാം: ടൂളുകൾ, ഡോക്യുമെന്റുകൾ, കോഡ് എന്നിവ

(ഈ പാഠത്തിന്റെ വീഡിയോകൾ കാണാൻ മുകളിൽ ചിത്രത്തിൽ ക്ലിക്ക് ചെയ്യുക)

അവലോകനം

ഈ പാഠം 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 ക്ലയന്റുകൾ - MCP സംയോജനങ്ങൾക്ക് աջակցിക്കുന്ന ക്ലയന്റുകളുടെ പട്ടിക
  • Community MCP Servers - കമ്മ്യൂണിറ്റി വികസിപ്പിച്ച MCP സർവറുകളുടെ വളരുന്ന പട്ടിക
  • Awesome MCP Servers - MCP സർവറുകളുടെ കണ്ട്രോളുചെയ്‌ത പട്ടിക
  • PulseMCP - MCP സ്രോതസ്സുകൾ കണ്ടെത്താനുള്ള കമ്മ്യൂണിറ്റി ഹബ് & ന്യൂസ്‌ലറ്റർ
  • Discord Server - MCP ഡെവലപ്പർമാരുമായി ബന്ധപ്പെടാൻ
  • ഭാഷാനുസൃത SDK ഇംപ്ലിമെന്റേഷനുകൾ
  • ബ്ലോഗ് പോസ്റ്റുകളും ട്യൂട്ടോറിയലുകളും

MCP-യിലേക്ക് സംഭാവന ചെയ്യുക

സംഭാവനകളുടെ തരം

MCP ഇക്കോസിസ്റ്റം വിവിധ തരത്തിലുള്ള സംഭാവനകൾ സ്വാഗതം ചെയ്യുന്നു:

  1. കോഡ് സംഭാവനകൾ:

    • കോർ പ്രോട്ടോക്കോൾ മെച്ചപ്പെടുത്തലുകൾ
    • ബഗ് പരിഹാരങ്ങൾ
    • ടൂൾ, സർവർ ഇംപ്ലിമെന്റേഷനുകൾ
    • വിവിധ ഭാഷകളിലുള്ള ക്ലയന്റ്/സർവർ ലൈബ്രറികൾ
  2. ഡോക്യുമെന്റേഷൻ:

    • നിലവിലുള്ള ഡോക്യുമെന്റേഷൻ മെച്ചപ്പെടുത്തൽ
    • ട്യൂട്ടോറിയലുകളും ഗൈഡുകളും സൃഷ്ടിക്കൽ
    • ഡോക്യുമെന്റേഷൻ വിവർത്തനം
    • ഉദാഹരണങ്ങളും സാമ്പിൾ അപ്ലിക്കേഷനുകളും സൃഷ്ടിക്കൽ
  3. കമ്മ്യൂണിറ്റി പിന്തുണ:

    • ഫോറങ്ങളിലോ ചർച്ചകളിലോ ചോദ്യങ്ങൾക്ക് ഉത്തരം നൽകൽ
    • പരീക്ഷണം നടത്തി പ്രശ്നങ്ങൾ റിപ്പോർട്ട് ചെയ്യൽ
    • കമ്മ്യൂണിറ്റി പരിപാടികൾ സംഘടിപ്പിക്കൽ
    • പുതിയ സംഭാവകർക്ക് അദ്ധ്യക്ഷത നൽകൽ

സംഭാവന പ്രക്രിയ: കോർ പ്രോട്ടോക്കോൾ

കോർ MCP പ്രോട്ടോക്കോൾ അല്ലെങ്കിൽ ഔദ്യോഗിക ഇംപ്ലിമെന്റേഷനുകളിൽ സംഭാവന ചെയ്യാൻ, ഔദ്യോഗിക സംഭാവനകളും മാർഗനിർദേശങ്ങളും അനുസരിക്കേണ്ടതാണ്:

  1. സിമ്പ്ലിസിറ്റി & മിനിമലിസം: MCP നിർദ്ദേശം പുതിയ ആശയങ്ങൾ ചേർക്കുന്നതിന് വളരെ ഉയർന്ന മാനദണ്ഡം പാലിക്കുന്നു. ഒരു നിർദ്ദേശത്തിൽ പുതിയ കാര്യങ്ങൾ ചേർക്കുന്നത് ഇല്ലാതാക്കുന്നതേക്കാൾ എളുപ്പമാണ്.

  2. ** konkreet Approach **: നിർദ്ദേശത്തിൽ മാറ്റങ്ങൾ പ്രത്യേക ഇംപ്ലിമെന്റേഷൻ പ്രശ്‌നങ്ങളെ അടിസ്ഥാനമാക്കണം, സങ്കൽപ്പാത്മക ആശയങ്ങളെല്ലാം അല്ല.

  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

ഉദാഹരണം: ഒരു ബഗ് പരിഹാരത്തിന് സംഭാവന

// ടൈപ്സ്ക്രിപ്റ്റ്-എസ്‌ഡികെയിൽ ബഗ് ഉള്ള ഒറിജിനൽ കോഡ്
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 অনুযായം):

  2. കമ്മ്യൂണിറ്റി ഫ്രെയിംവർക്കുകൾ:

    • MCP-Framework - TypeScript ലെ MCP സർവറുകൾ സൗന്ദര്യവും വേഗത്തോടെയും നിർമ്മിക്കുക
    • MCP Declarative Java SDK - അനോട്ടേഷൻ ഡ്രൈവ് MCP സർവർ ജാവയുമായ്
    • Quarkus MCP Server SDK - MCP സർവറുകൾക്കുള്ള ജാവ ഫ്രെയിംവർക്ക്
    • Next.js MCP Server Template - 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

ജാവ ഉദാഹരണം: ടൂളുകളുടെ 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

പൈതൺ ഉദാഹരണം: PyPI പാക്കേജ് പ്രസിദ്ധീകരിക്കൽ

# PyPI പാക്കേജിനുള്ള ഡയറക്ടറി ഘടന:
# mcp_nlp_tools/
# ├── ലൈസൻസ്
# ├── 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 കോൾസ് RATE LIMIT നടപ്പാക്കുക
  5. ടെസ്റ്റിംഗ്:

    • സമഗ്രമായ ടെസ്റ്റിങ് ഉൾപ്പെടുത്തുക
    • വ്യത്യസ്ത ഇൻപുട്ടുകൾക്കും അതിരുകൾക്കും പരീക്ഷണം നടത്തുക
    • ടെസ്റ്റ് നടപടിക്രമങ്ങൾ രേഖപ്പെടുത്തുക

കമ്മ്യൂണിറ്റി സഹകരണം மற்றும் മികച്ച അഭ്യാസങ്ങൾ

ഫലപ്രദമായ സഹകരണം MCP ഇക്കോസിസ്റ്റത്തിനായി അത്യന്താപേക്ഷിതമാണ്.

ആശയവിനിമയ ചാനലുകൾ

  • GitHub Issues & Discussions
  • 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)

# രജിസ്ട്രിക്കുള്ള ഫാസ്റ്റ്എപി ഐ അപ്ലിക്കേഷൻ
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. അനുയായി റപ്പോസിറ്ററിയിലേക്ക് പുൾ റിക്വസ്റ്റ് സമർപ്പിക്കുക

അധിക സ്രോതസ്സുകൾ


അടുത്തത് എന്താണ്

അടുത്തത്: ആദ്യം സ്വീകരിച്ചതിൽ നിന്നുള്ള പാഠങ്ങൾ


വിവരണം:
ഈ രേഖ Co-op Translator എന്ന എഐ വിവർത്തന സേവനം ഉപയോഗിച്ച് വിവർത്തനം ചെയ്തതാണ്. നാം കൃത്യതയ്ക്ക് ശ്രമിച്ചിട്ടുണ്ടെങ്കിലും, സാങ്കേതികമായി നിർമ്മിത വിവർത്തനങ്ങളിൽ പിശകുകൾ അല്ലെങ്കിൽ തെറ്റുകൾ ഉണ്ടാകാൻ സാധ്യമായതായി ശ്രദ്ധിക്കുക. മुळംഭാഷയിലെ യഥാർത്ഥ രേഖയാണ് സത്യസന്ധമായ ഉറവിടം എന്ന് കണക്കാക്കേണ്ടത്. നിർണായകമായ വിവരങ്ങൾക്ക്, പ്രൊഫഷണൽ മാനവ വിവർത്തനം ശുപാർശ ചെയ്യുന്നു. ഈ വിവർത്തനത്തിന്റെ ഉപയോഗത്താൽ ഉളവാകുന്ന ഏതെങ്കിലും തെറ്റിദ്ധാരണകളേക്കുറിച്ചോ തെറ്റായി വ്യാഖ്യാനിക്കുന്നതുകൊണ്ടുള്ള ഉത്തരവാദിത്തം ഞങ്ങൾ ഏറ്റെടുക്കുന്നവരല്ല.