[ Content contribution] 分享上次做的mcp应用,通过mcp+python执行任何操作
Tofloor
poster avatar
SkyShadowHero
deepin
2025-09-22 23:00
Author

前言

上个帖子#MCP 探索家# MCP场景发现大挑战 MCP+Ollama+Python创造新玩法!

一个示例(已倍数)

GIFSpeed.gif

介绍

上次做的作品得了mcp探索家的二等奖,也收到了deepin送的精品礼物,所以把它整理并优化了一下,让它的使用在deepin上更方便快捷

更详细介绍和截图看上个帖子,这里给个简单介绍和更新的地方

功能:

发送要求-->mcp把要求发给大模型(ollama或api)-->生成python代码以实现这个功能-->安装相应依赖-->自动执行。

相对上次更新内容:

更新配置文件,目前支持ollama和在线api

添加linux上快速初始化脚本(方便UOS AI和其他客户端应用用户导入)

完善依赖安装

细化执行步骤

使用方法

deepin上使用方法非常简单

# 克隆项目
git clone https://github.com/SkyShadowHero/McpCoderRunner.git
cd McpCoderRunner
# 运行脚本
./first_launch.sh

然后它会弹出 import_mcp.jsonmcp_config.json 两个文本

前者里的内容直接复制到UOS AI里导入即可,后者里可以配置模型,如ollama或在线api,

使用ollama示例:

{
"llm_config": {
"model": "deepseek-coder-v2:16b",
"base_url": "http://127.0.0.1:11434",
"api_key": "ollama"
}
}

使用在线 API (如 DeepSeek )示例:

{
    "llm_config": {
        "model": "deepseek-chat",
        "base_url": "https://api.deepseek.com",
        "api_key": "sk-xxxxxxxxxxxxxxxxxxxx"
    }
}

建议使用deepseek-coder、qwen3-coder等模型

然后就能在uos ai里使用了。

想手动使用的也能去github里查看,就创建环境,进入环境,安装依赖,运行main.py,设置配置即可。

最后希望给Github里点个starsad

Github链接🔗

Reply Favorite View the author
All Replies
HualetWang
deepin
2025-09-23 10:39
#1

已Star kissing_heart

Reply View the author
SkyShadowHero
deepin
2025-09-23 11:53
#2
HualetWang

已Star kissing_heart

ok

Reply View the author