MCP协议测试服务器

用于测试MCP协议的Golang服务器,支持与Ollama模型集成和Python执行环境触发。

  • by PfMartin
  • Go
  • 本地部署
  • 更新于
在 GitHub 查看 pfmartin/golang-mcp-server

使用说明

高朗mcp服务器

用于测试Golang中MCP协议的MCP服务器

设置MCP服务器主机

奥拉马

ollama pull mistral
ollama serve

下载并安装MCP主机工具

mcphost工具

go install github.com/mark3labs/mcphost@latest

设置mcp服务器可执行文件的路径

  • 构建二进制文件
go build
  • 创建 .mcphost.json 在主文件夹中
touch ~/.mcphost.json
{
  "mcpServers": {
    "python-repl": {
      "command": "/home/martin/Projects/golang-mcp-server/golang-mcp-server"
    }
  }
}

运行服务器和MCP主机

mcphost -m ollama:mistral # or any other model (provider:model) e.g. ollama:llama3.2

更多信息