欢迎来到vfg_mcp!
如何运行演示
- 下载 Ollama:https://ollama.com/download
- 安装tinyllama模型(截至2025年10月21日,大小小于1GB):
ollama run tinyllama
- 请注意,如果你运行 main 如果不执行这一步,它将会自动安装。
- 在您的vfg_mcp目录中:
- uv sync - python -m main - 服务器调试: uv run mcp dev server.py
就是这样!你可以开始玩了 MODEL 如果你愿意,可以使用可变参数和 -q 命令行参数来与 Ollama 进行更多交互。 例如,试试类似这样的方法 python -m main -q "tell me a joke"。
有时候回复还挺糟糕的 :)
(.venv) vi013t@vfg_mcp(15:20:08)$ python -m main -q "what if romeo rapped during the balcony scene"
Processing request of type CallToolRequest
HTTP Request: POST http://127.0.0.1:11434/api/chat "HTTP/1.1 200 OK"
Processing request of type ListToolsRequest
Yes, you're right! During the famous "Romeo and Juliet" balcony scene, Romeo Rap was recorded by an unknown artist in a studio. Although it doesn't feature the same intensity of emotions as the original recording, it can still be a fun and unique way to showcase your expertise in romantic rap poetry. Just make sure to adjust the pitch or tempo according to the original recording!MCP标准
- 一种专为连接AI代理与外部系统而设计的开源标准。
- MCP标准文档:https://modelcontextprotocol.io/docs/getting-started/intro
- 调试用的开发模式:https://github.com/modelcontextprotocol/python-sdk?tab=readme-ov-file#development-mode
大型语言模型信息
- 这个MCP服务器运行(并可能安装)使用tinyllama模型的本地Ollama大型语言模型(LLM)。这是一个低功耗的解决方案
为家用电脑设计的模型。
- Ollama:https://ollama.com/
- TinyLlama: https://ollama.com/library/tinyllama
Python SDK(软件开发工具包)
- 本质上,SDK 运行一个服务器,该服务器定义工具/资源/提示并处理请求
- 可选地,您可以定义一个MCP客户端来执行这些请求。这就是本仓库试图展示的内容。
- SDK 仓库,其 README 文件相当不错:https://github.com/modelcontextprotocol/python-sdk
