model-context-protocol-templates

Model Context Protocol (MCP) is an open-source protocol designed for large language models (LLM) to standardize connections with external data sources and systems.

Visit Server
Added on 3/28/2025

model-context-protocol-templates

Introduction

Model Context Protocol(MCP)是 Anthropic 於 2024 年 11 月發布的開源協定,專為大型語言模型(Large Language Model,LLM)設計,旨在解決 AI 與外部資料源和系統連接的標準化問題。MCP 提供了一個結構化框架,使模型能夠在對話中整合和利用外部上下文(context),從而擴展其功能並提高回應的準確性。

MCP 提供以下 3 種能力對 LLM 進行擴展:

  • Resources 對知識擴展
  • Tools 調用外部工具
  • Prompts 預編寫提示詞

參考以下:

SDK

Quickstart

Debugging & Inspection

Debugging

  1. MCP Inspector

  2. Claude Desktop Developer Tools

  3. Server Logging

Inspector

npx @modelcontextprotocol/inspector <command> <arg1> <arg2>

Inspecting servers from NPM or PyPi

  • NPM package

    npx -y @modelcontextprotocol/inspector npx <package-name> <args>
    # For example
    npx -y @modelcontextprotocol/inspector npx server-postgres postgres://127.0.0.1/testdb
    
  • PyPi package

    npx @modelcontextprotocol/inspector uvx <package-name> <args>
    # For example
    npx @modelcontextprotocol/inspector uvx mcp-server-git --repository ~/code/mcp/servers.git
    

Inspecting locally developed servers

  • TypeScript

    npx @modelcontextprotocol/inspector node path/to/server/index.js args...
    
  • Python

    npx @modelcontextprotocol/inspector \
        uv \
        --directory path/to/server \
        run \
        package-name \
        args...
    

MCP Servers

Templates

Python MCP Server Template