OO

opensuse/osc-mcp

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

6 stars 9 forks 质量 72 趋势 34MIT

This project aims to offer a MCP service for the Open Build Service (OBS). The Model Context Protocol (MCP) is an open-source framework designed to standardize how artificial intelligence systems,...

概览

This project aims to offer a MCP service for the Open Build Service (OBS). The Model Context Protocol (MCP) is an open-source framework designed to standardize how artificial intelligence systems, such as large language models (LLMs), connect and share data with external tools and data sources. The project is in a very early stage, so things may break. It uses the credentials found in your configuration and keyring if not configured per command line in another way! which uses preset temporary working directory. You can now use gemini-cli or mcphost to access this server Following prompts can be used and give you an example of what this tool can do You can see the result at science:machinelearning:mcp/osc-mcp Add the following configuration to ~/.gemini/settings.json

README

以下为原文 README 节选,完整内容请查看原文。

MCP server for Open Build Service

This project aims to offer a MCP service for the Open Build Service (OBS). The Model Context Protocol (MCP) is an open-source framework designed to standardize how artificial intelligence systems, such as large language models (LLMs), connect and share data with external tools and data sources.

An example conversation is here

[!NOTE] The project is in a very early stage, so things may break.

[!CAUTION] It uses the credentials found in your configuration and keyring if not configured per command line in another way!

Building

Build the project with

  go build .

Usage

Start a server with

go run osc-mcp.go --http localhost:8666 --workdir /tmp/mcp/osc-mcp/ --clean-workdir

which uses preset temporary working directory.

You can now use gemini-cli or mcphost to access this server

Reference prompts

Following prompts can be used and give you an example of what this tool can do

Self packaging

Check at first https://github.com/openSUSE/osc-mcp online for the actual version and used language. Then package it as osc-mcp in home:mslacken:ml. Download the source via a service and make sure that files are                
correctly included in the spec file.                                                                                    
Build the package to confirm success. Between builds, check if services correctly donwloaded. If a download fails check online in the github repo if the version is correct.
After success commit the package.

You can see the result at science:machinelearning:mcp/osc-mcp

gemini-cli

Add the following configuration to ~/.gemini/settings.json

  "mcpServers": {
    "osc-mcp": {
      "httpUrl": "http://localhost:8666"
    }
  },
  "include-directories": ["/tmp/mcp/osc-mcp" ]
  

and change to preset temporary directory /tmp/mcp as then gemini-cli can modify checked out sources.

  cd /tmp/mcp
  npx https://github.com/google-gemini/gemini-cli

Check the example for how a conversation looks like.

mcphost

Create a configuration file ~/.mcphost.yml and add the following lines to add the server

model: "ollama:mistral-small3.2:24b"
provider-url: "http://localhost:11434"
mcpServers:
  osc-mcp:
    type: "remote"
    url: "http://localhost:8666"
  fs:
    name: "fs"
    type: "builtin"
    options:
      allowed_directories:
        - ${env://WORK_DIR:-/tmp}
        - /tmp/mcp
  web-fetcher: 
    type: "builtin"
    name: "http"

With that configuration mcphost will

  • connect to a local ollama instance
  • use the mistral-small3.2:24b model
  • access to the internet to check for updates
  • access /tmp/mcp and ${WORK_DIR} or /tmp

[!NOTE]

在 GitHub 查看完整 README

安装

npx https://github.com/google-gemini/gemini-cli
新手?先看 mcpskill.org 教程 →