Cover image
Try Now
2025-04-07

MCP服务器示例练习

3 years

Works with Finder

1

Github Watches

0

Github Forks

0

Github Stars

Claude MCP Protocol Practice

This repository is a practice session for MIT Hack Decentralized AI summit. It includes basic steps to create a Claude MCP protocol up and running in under 5 minutes on Windows.

Weather App Setup

Prerequisites

  • Make sure you pip install uv

Steps

cd weather
uv run weather.py

This starts the server hosted locally on your machine. The python file includes tools available to LLM for getting alerts and forecast from government API.

Claude Configuration

Make sure you changed the claude_config.json available on Claude desktop:

  1. Navigate to File -> Settings -> Developer -> Edit Config
  2. Edit config section and provide absolute path to your python file

Voila! Your 1st MCP server is up and running in 5 mins.

Sample Config File

{
  "mcpServers": {
    "weather": {
      "command": "npx",
      "args": ["-y", "<abs_path_to_file>/mcp-server-weather"]
    }
  }
}

SQL-lite DB Example for Bakery Data

Steps to Run the SQL DB as an MCP Server

  1. Clone the repository:

    git clone https://github.com/modelcontextprotocol/servers.git
    
  2. Navigate to the SQLite directory:

    cd servers
    cd src
    cd sqlite
    
  3. Install Docker if needed:

  4. Build the Docker image:

    docker build -t mcp/sqlite .
    
  5. Update your Claude config file:

    {
      "mcpServers": {
        "sqlite": {
          "command": "docker",
          "args": [
            "run",
            "--rm",
            "-i",
            "-v",
            "mcp-test:/mcp",
            "mcp/sqlite",
            "--db-path",
            "/mcp/test.db"
          ]
        }
      }
    }
    
  6. Restart Claude to apply changes

Bakery Database Setup

  1. Create bakery DB tables:

    • ingredients (id, name, unit, quantity, cost, supplier, min_order_quantity)
  2. Populate with:

    • 10 ingredients with MOQs
  3. Add queries for:

    • Low stock alerts

Hope this is helpful to you in the future!

References

MIT Hack Documentation

相关推荐

  • Joshua Armstrong
  • Confidential guide on numerology and astrology, based of GG33 Public information

  • https://suefel.com
  • Latest advice and best practices for custom GPT development.

  • Alexandru Strujac
  • Efficient thumbnail creator for YouTube videos

  • Emmet Halm
  • Converts Figma frames into front-end code for various mobile frameworks.

  • Elijah Ng Shi Yi
  • Advanced software engineer GPT that excels through nailing the basics.

  • lumpenspace
  • Take an adjectivised noun, and create images making it progressively more adjective!

  • Lists Tailwind CSS classes in monospaced font

  • https://maiplestudio.com
  • Find Exhibitors, Speakers and more

  • tomoyoshi hirata
  • Sony α7IIIマニュアルアシスタント

  • Yusuf Emre Yeşilyurt
  • I find academic articles and books for research and literature reviews.

  • Carlos Ferrin
  • Encuentra películas y series en plataformas de streaming.

  • https://zenepic.net
  • Embark on a thrilling diplomatic quest across a galaxy on the brink of war. Navigate complex politics and alien cultures to forge peace and avert catastrophe in this immersive interstellar adventure.

  • apappascs
  • 发现市场上最全面,最新的MCP服务器集合。该存储库充当集中式枢纽,提供了广泛的开源和专有MCP服务器目录,并提供功能,文档链接和贡献者。

  • ShrimpingIt
  • MCP系列GPIO Expander的基于Micropython I2C的操作,源自ADAFRUIT_MCP230XX

  • jae-jae
  • MCP服务器使用剧作《无头浏览器》获取网页内容。

  • ravitemer
  • 一个功能强大的Neovim插件,用于管理MCP(模型上下文协议)服务器

  • patruff
  • Ollama和MCP服务器之间的桥梁,使本地LLMS可以使用模型上下文协议工具

  • pontusab
  • 光标与风浪冲浪社区,查找规则和MCP

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

  • Mintplex-Labs
  • 带有内置抹布,AI代理,无代理构建器,MCP兼容性等的多合一桌面和Docker AI应用程序。

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

  • appcypher
  • 很棒的MCP服务器 - 模型上下文协议服务器的策划列表

    Reviews

    4 (1)
    Avatar
    user_YvS5kAs3
    2025-04-17

    I have been using mcp_server_101 for a while now, and I must say it has exceeded my expectations. The setup was straightforward, and the documentation provided by harshal-14 is incredibly helpful. The server runs smoothly and has significantly improved my workflow. Highly recommend checking it out! You can find it here: https://github.com/harshal-14/mcp_server_101