Cover image
Try Now
2025-04-12

3 years

Works with Finder

4

Github Watches

0

Github Forks

0

Github Stars

openEuler MCP Servers仓库,欢迎大家贡献

openEuler MCP Servers 仓库

PyPI Python Version Documentation Specification

介绍

MCP是Model Context Protocol的缩写,旨在提供一个通用的大模型上下文协议,用来调用各种应用,拓展大模型能力,openEuler的mcp-servers仓库用来存放各种MCP Server,聚焦于操作系统领域,结合Devstation,EulerCopilot改善openEuler交互体验

软件架构

仓库目录带一个doc目录,用来存放整体的各类文档介绍,之后servers每个文件夹为一个独立的MCP Server

mcp-servers/
├── servers
|      |──oeDeploys
|           |── readme.md
|           |── mcp_config.json
|           └── src
|      |──oeGitExt 
|      └──xxxxx
└── doc

以oeDeploy为例,每个server顶层需要包含以下几个内容:

1、该MCP Server实现了哪些功能,如何使用该MCP Server能力

2、MCP配置的json文件

3、源码

使用说明

1、使用常用的MCP客户端完成配置如EulerCopilot,Roo Code,Cline等等

2、将MCP Server的配置文件写入到MCP客户端

使用yum自动安装(推荐):

openEuler社区会将每个MCP Server构建为一个个RPM包,用户直接yum install安装即可使用,即将上线

快速开始:如何使用MCP Python-SDK编写一个自己的MCP Server服务器

MCP环境搭建(当前手动搭建,后续使用yum一键安装)

1、安装 uv Python管理工具

pip3 install uv

安装完成之后,需要看下 uv 工具在哪个目录,在DevStation上会在 /home/xxx/.local/bin/uv下面,可以手动添加到环境变量,也可以绝对路径引用

2、使用 uv 创建项目目录

uv init oegitext_mcp
cd oegitext_mcp

3、使用 uv 创建虚环境,并进入

uv venv
source .venv/bin/activate

4、安装MCP依赖

uv add "mcp[cli]" httpx

实战编码

1、挑选一个小工具oegitext

oegitext是一个用来和gitee交互的小工具,可以用来查询在gitee上面的一些仓库和issue,查询一些PR信息: 该工具在DevStation上预安装,如果没有安装,可以在配置openEuler-25.03 EPOL仓库后使用 yum install oegitext安装 安装完成之后,使用如下命令配置gitee令牌:

oegitext config -token ${access_token}

之后使用oegitext show issue -p查询当前issue: oegitext的使用方式

2、使用python-sdk进行一个改造

在上面使用uv创建的虚拟环境中,新建一个oegitext_mcp.py文件 下面是代码的一个简单示例:

import subprocess
from mcp.server.fastmcp import FastMCP

mcp = FastMCP("查找openEuler社区的issue")

@mcp.tool()
def get_my_openeuler_issue() -> str:
    """统计我在openEuler社区所负责的issue"""
    try:
        # 执行oegitext命令并解析结果
        result = subprocess.check_output(['oegitext', 'show', 'issue', '-p'], 
                                        text=True, 
                                        stderr=subprocess.STDOUT)
        
        return result
    except subprocess.CalledProcessError as e:
        return e
    except Exception as e:
        return e

if __name__ == "__main__":
    # Initialize
    mcp.run()

3、openEuler MCP环境搭建

打开DevStation预安装的vscodium软件,在插件市场里安装Roo Code(后续也可以使用EulerCopilot实现) 在设置当中配置大模型,我们使用的是DeepSeeK V3的API:

API提供商:OpenAI Compatible
OpenAI基础URL:https://api.siliconflow.cn
密钥:对应的密钥
模型:Pro/deepseek-ai/DeepSeek-V3   #可以自己选择合适的模型

在Roo Code插件上方的选项卡里选择MCP服务器 点击编辑全局MCP

{
  "mcpServers": {
    "oegitext_mcp": {
      "command": "/home/xxx/.local/bin/uv",
      "args": [
        "--directory",
        "/home/xxx/oegitext_mcp",
        "run",
        "oegitext_mcp.py"
      ],
      "disabled": false,
      "autoApprove": [],
      "alwaysAllow": []
    },
  }
}

上面的路径修改成正确的实际路径,之后保存,点击完成

4、MCP Client调用效果

oegitext使用MCP服务后效果

相关推荐

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

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

  • Lists Tailwind CSS classes in monospaced font

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

  • https://appia.in
  • Siri Shortcut Finder – your go-to place for discovering amazing Siri Shortcuts with ease

  • Daren White
  • A supportive coach for mastering all Spanish tenses.

  • J. DE HARO OLLE
  • Especialista en juegos de palabras en varios idiomas.

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

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

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

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

  • HiveNexus
  • 一个适用于中小型团队的AI聊天机器人,支持DeepSeek,Open AI,Claude和Gemini等车型。 专为中小团队设计的ai聊天应用,支持deepSeek,打开ai,claude,双子座等模型。

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

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

    Reviews

    5 (1)
    Avatar
    user_ONLQ5SNI
    2025-04-16

    As a devoted user of mcp-servers, I am thoroughly impressed by its performance and reliability. The project's seamless integration with the openEuler environment is remarkable, and it has significantly enhanced my server management tasks. Kudos to the openeuler-mirror team for creating such a robust and efficient solution. Highly recommend checking it out at https://github.com/openeuler-mirror/mcp-servers!