MCP cover image
See in Github
2025-04-14

MCP速成课程:Udemy的日常课程中的完整模型上下文协议

0

Github Watches

0

Github Forks

0

Github Stars

MCP Servers Learning Project

This repository contains examples and implementations of Model Context Protocol (MCP) servers and clients. MCP is a protocol that allows LLMs like Claude to interact with external tools and data sources in a standardized way.

Project Structure

The repository is organized into several modules, each focusing on different aspects of MCP:

1. Quickstart Resources

The 1_quickstart-resources directory contains sample implementations of MCP clients and servers to help you get started:

  • mcp-client-python: A Python client implementation for connecting to MCP servers
  • mcp-client-typescript: A TypeScript client implementation for connecting to MCP servers
  • weather-server-python: A sample Python MCP server that provides weather information
  • weather-server-typescript: A sample TypeScript MCP server that provides weather information

These examples demonstrate basic MCP concepts and provide starting points for your own implementations.

2. MCP Documentation Server

The 2_mcpdoc directory contains a specialized MCP server for serving documentation:

  • Implements an MCP server that can retrieve and serve documentation from various sources
  • Includes configuration examples and a robust project structure
  • Demonstrates advanced MCP concepts like error handling and resource management

3. Terminal Server

The 3_building_securing_and_containerizing_mcp_server directory contains a custom MCP server implementation that:

  • Exposes a terminal command execution tool allowing access to system commands
  • Provides a resource for accessing MCP documentation
  • Demonstrates proper error handling and input validation
  • Shows how to implement both tools and resources in a single server

Getting Started

Prerequisites

  • Python 3.10 or higher
  • MCP SDK 1.2.0 or higher
  • For TypeScript examples: Node.js and npm

Installation

# For Python dependencies
uv add "mcp[cli]" httpx

# Or with pip
pip install "mcp[cli]" httpx

Running MCP Servers

You can run any of the MCP servers using:

# With Python directly
python <path_to_server.py>

# Or with the MCP CLI
mcp dev <path_to_server.py>

For example, to run the terminal server:

python 3_building_securing_and_containerizing_mcp_server/server.py

# Or
mcp dev 3_building_securing_and_containerizing_mcp_server/server.py

Connecting to Claude Desktop

To connect an MCP server to Claude Desktop:

mcp install <path_to_server.py>

Key Concepts

  • Tools: Functions that can be called by Claude to execute code or produce side effects
  • Resources: Data exposed to Claude that can be read and referenced
  • Prompts: Templates for structuring interactions with Claude

Contributing

Feel free to extend and modify these examples for your own use cases. If you develop a useful MCP server, consider sharing it with the community!

Resources

相关推荐

  • Aurity Ltd
  • Create and Publish Business Websites in seconds. AI will gather all the details about your website and generate link to your website.

  • John Rafferty
  • Text your favorite pet, after answering 10 questions about their everyday lives!

  • Convincible Ltd
  • You're in a stone cell – can you get out? A classic choose-your-adventure interactive fiction game, based on a meticulously-crafted playbook. With a medieval fantasy setting, infinite choices and outcomes, and dice!

  • Ian O'Connell
  • Provide players' names or enter Quickstart to start the game!

  • Matthieu Savioux
  • Evaluates language quality of texts, responds with a numerical score between 50-150.

  • analogchat.com
  • Efficient Spotify assistant for personalized music data.

  • seabiscuit.ai
  • Discover A More Robust Business: Craft tailored value proposition statements, develop a comprehensive business model canvas, conduct detailed PESTLE analysis, and gain strategic insights on enhancing business model elements like scalability, cost structure, and market competition strategies. (v1.18)

  • Carl Oscar Aaro
  • Structured recipes for food and desserts – ingredient lists and step-by-step recipe instructions from any input. Become surprised, try something new or breathe life into grandma's old recipe notebook.

  • WangRongsheng
  • 🧑‍🚀 llm 资料总结(数据处理、模型训练、模型部署、 o1 模型、mcp 、小语言模型、视觉语言模型)|摘要世界上最好的LLM资源。

  • n8n-io
  • 具有本机AI功能的公平代码工作流程自动化平台。将视觉构建与自定义代码,自宿主或云相结合,400+集成。

  • av
  • 毫不费力地使用一个命令运行LLM后端,API,前端和服务。

  • langgenius
  • 1Panel-dev
  • 🔥1Panel提供了直观的Web接口和MCP服务器,用于在Linux服务器上管理网站,文件,容器,数据库和LLMS。

  • Azure
  • 该存储库用于开发Azure MCP服务器,将Azure的功能带给您的代理商。

  • alibaba
  • metorial
  • 数百个MCP服务器的容器化版本📡📡

  • caio-moliveira
  • 创建该项目是为了证明我们如何与不同的模型上下文协议(MCP)连接。

  • rulego
  • ⛓️Rulego是一种轻巧,高性能,嵌入式,下一代组件编排规则引擎框架。

  • Byaidu
  • PDF科学纸翻译带有保留格式的pdf -基于ai完整保留排版的pdf文档全文双语翻译

  • superiorlu
  • 🤖在AI上收集实用的AI存储库,工具,网站,论文和教程。 实用的ai百宝箱百宝箱

    Reviews

    1 (1)
    Avatar
    user_e0CuZdh0
    2025-04-23

    MCP-server-udemy by sagarnildass is a phenomenal resource for anyone looking to dive deep into server management and deployment. Its comprehensive coverage and easy-to-follow structure make complex concepts accessible. The support and updates enhance the learning experience. Highly recommend for both beginners and seasoned professionals!