Cover image
Try Now
2025-04-05

mcp example from webset

3 years

Works with Finder

1

Github Watches

0

Github Forks

0

Github Stars

mcp

这个是参考:

https://mp.weixin.qq.com/s/ULxokHOn4zVOgiLHf9DQUA,

https://zhuanlan.zhihu.com/p/20222456593

作出一些简单地补充,采用cline 当作client,可以选择gemini作为llm

1743774040990

文中似乎没有特意注明如何使用claude desktop。这里可以选择多种client作为和llm沟通的平台(就是一个界面,也可以自己写)

当前可以选择的client 在llms-full.txt 中有列出来

server 主要是用来生成工具的,工具正如/src/calculate.py,src/datawale.py中展示的,所以一般而言,我们需要定义的就是这个工具(有人进行了开源可以自行选择,比如:https://composio.dev/)

在这里主要展示如何使用client

vscode 中安装Cline 插件,选择合适的模型,如上图

然后选择 mcp servers ,installed ,edit configuration将配置文件添加进去即可

1743774942455

1743774549113

command 这里必须使用绝对路径,相对路径会出现错误

调用工具的时候,应该是类似与首先执行server 使其始终运行,以便之后进行通信调用 类似于:/Users/{username}/.local/bin/uv --directory /Users/{username}... run txt_counter.py

--directory 切换执行目录。

1743774752161

也可以直接运行txt_counter.py,但是需要自己修改端口 1743774856667

client(我没有尝试)

src/mcp_client.py

参考:https://github.com/modelcontextprotocol/python-sdk?tab=readme-ov-file#quickstart

实际上的作用就是类似于一个ui,目的就是和llm进行通信,获取response(比如需要调用的工具,可以参考langchain)

llms-full.txt
官方的说明文档吧(第一个链接中有)

一些使用的简单示例

https://modelcontextprotocol.io/examples

prompts:的结构

有点类似与langchain bind_tools,但是功能更强大

https://modelcontextprotocol.io/docs/concepts/prompts#prompts

Prompts enable servers to define reusable prompt templates and workflows that clients can easily surface to users and LLMs. They provide a powerful way to standardize and share common LLM interactions.

Prompts are designed to be user-controlled , meaning they are exposed from servers to clients with the intention of the user being able to explicitly select them for use.

{
  name: string;              // Unique identifier for the prompt
  description?: string;      // Human-readable description
  arguments?: [              // Optional list of arguments
    {
      name: string;          // Argument identifier
      description?: string;  // Argument description
      required?: boolean;    // Whether argument is required
    }
  ]
}

how to use:

git clone <repo_path>

cd

安装 uv

https://docs.astral.sh/uv/getting-started/installation/

uv run script.py

上面的指令会自动安装对应的环境到(./.venv)当前文件夹下,实际上在cline中配置mcp server的时候会自己运行uv相关的内容,如果没有环境,会自动根据项目下的

相关推荐

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

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

  • 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.

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

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

  • 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.

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

  • https://reddgr.com
  • Delivers concise Python code and interprets non-English comments

  • 林乔安妮
  • A fashion stylist GPT offering outfit suggestions for various scenarios.

  • 1Panel-dev
  • 💬 MaxKB is a ready-to-use AI chatbot that integrates Retrieval-Augmented Generation (RAG) pipelines, supports robust workflows, and provides advanced MCP tool-use capabilities.

  • ShrimpingIt
  • Micropython I2C-based manipulation of the MCP series GPIO expander, derived from Adafruit_MCP230xx

  • Dhravya
  • Collection of apple-native tools for the model context protocol.

  • GLips
  • MCP server to provide Figma layout information to AI coding agents like Cursor

  • open-webui
  • User-friendly AI Interface (Supports Ollama, OpenAI API, ...)

  • Mintplex-Labs
  • The all-in-one Desktop & Docker AI application with built-in RAG, AI agents, No-code agent builder, MCP compatibility, and more.

    Reviews

    1 (1)
    Avatar
    user_0yo33iO5
    2025-04-18

    I've been using mcp_learning by zhkzly and it has exceeded my expectations. The tool is user-friendly, comprehensively structured, and perfect for anyone looking to deepen their knowledge in the field. The repository on GitHub provides clear instructions and extensive resources, making it an invaluable addition to my toolkit. Highly recommended for both beginners and seasoned professionals!