Goose Docker镜像与MCP服务器

Goose是一个Docker镜像,集成了MCP服务器,用于配置和管理与LLM的连接,支持自动安装和扩展配置。

  • by elsewhat
  • 本地部署
  • 5 星标
  • 更新于
在 GitHub 查看 elsewhat/goose-with-mcp-servers

使用说明

鹅与mcp服务器

带有mcp服务器的鹅docker镜像

配置Goose

跑 goose configure 设置从鹅到LLM的连接。

Ollama的示例输出(由于docker网络,使用host.docker.internal而不是localhost)

Welcome to goose! Let's get you set up with a provider.
  you can rerun this command later to update your configuration

┌   goose-configure 
│
◇  Which model provider should we use?
│  Ollama 
│
◇  Provider Ollama requires OLLAMA_HOST, please enter a value
│  host.docker.internal
│
◇  Enter a model from that provider:
│  qwen2.5
│
◓  Checking your configuration...                                                                                                                                                                                                   └  Configuration saved successfully

  Tip: Run 'goose configure' again to adjust your config or add extensions

鹅的自动安装

Devcontainer包含通过以下方式安装Goose postCreateCommand.

curl -fsSL https://github.com/block/goose/releases/download/stable/download_cli.sh | CONFIGURE=false bash

依赖

Goose需要libdbus,它也被添加到Devcontainer中

sudo apt-get update && sudo apt-get install -y libdbus-1-3

将GitHub MCP服务器添加到Goose

通过添加GitHub个人访问令牌https://github.com/settings/personal-access-tokens/

node ➜ /workspaces/goose-with-mcp-servers (main) $ goose configure

This will update your existing config file
  if you prefer, you can edit it directly at /home/node/.config/goose/config.yaml

┌   goose-configure 
│
◇  What would you like to configure?
│  Add Extension 
│
◇  What type of extension would you like to add?
│  Command-line Extension 
│
◇  What would you like to call this extension?
│  GitHub
│
◇  What command should be run?
│  npx -y @modelcontextprotocol/server-github
│
◇  Would you like to add environment variables?
│  Yes 
│
◇  Environment variable name:
│  GITHUB_PERSONAL_ACCESS_TOKEN
│
◇  Environment variable value:
│  ▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪
│
◇  Add another environment variable?
│  No 
│
└  Added GitHub extension