1. Conduid
  2. Developer Tools
  3. Go MCP Demo
MCP server · Developer Tools

Go MCP Demo

mcp server and client

Unclaimed last commit a year ago devtools
41Fair

Scored 5 months ago · breakdown

About Go MCP Demo

Go MCP Demo is an MCP server published by Patrick7241 in the Developer Tools category: mcp server and client.

The repository has 4 stars and 0 forks, with the last commit a year ago. Six months or more without a commit doesn't mean the server is broken, but check the open issues before depending on it in production.

Install

From source
git clone https://github.com/Patrick7241/go-mcp-demo

This server has no ConduID identity, so agent calls to it are not receipted. Pin the version you install and review the source before granting it credentials.

Ask AI

✦

Ask AI about Go MCP Demo

Powered by Claude · Grounded in docs

I know everything about Go MCP Demo. Ask me about installation, configuration, usage, or troubleshooting.

Security checks

Static checks derived from the repository 7 days ago. Heuristics on the source, not an audit.

  • ✓README presentThe repository ships documentation.
  • !License declaredNo license file. Legally you have no right to use it in a product.
  • !Tests presentNo tests found. Behaviour changes may go unnoticed between versions.
  • ✓Dependencies pinnedA lockfile pins dependency versions.
  • ✓No dynamic code executionSource scan found no eval, dynamic Function, or shell execution.
  • !Scoped permissionsDoesn't declare a permission scope. Assume it can do anything its process can.

README

go-mcp-demo

本项目基于 mark3labs/mcp-go 实现了一个 MCP Server 与 MCP Client 通信的演示,结合 Ollama 启动本地大语言模型,实现自然语言调用工具的能力。

b站演示视频

✨ 功能概览

  • 集成 MCP Server + Client 通信框架
  • 支持基于自然语言执行:
    • 读取本地 .sql 文件
    • 执行任意 MySQL 查询
  • 使用 Ollama 本地大模型进行推理(默认端口:http://localhost:11434)

🚀 快速开始

1. 安装 Ollama

请参考官网:https://ollama.com
根据操作系统下载安装 Ollama CLI 工具。


2. 拉取并运行模型

在命令行中执行以下命令,拉取你需要的模型(示例使用 qwen2:1.5b):

ollama pull qwen2:1.5b
ollama run qwen2:1.5b

模型将监听本地端口:http://localhost:11434/api/generate


3. 修改配置文件

打开并编辑 pkg/config/config.yml:

ollama:
  model: qwen2:1.5b

mysql:
  host: localhost
  port: 3306
  user: root
  password: your_password
  database: your_database

sql:
  sqlFilePath: E:/your/path/to/test.sql

✅ 注意事项:

  • model 名称需与 ollama pull 和 ollama run 保持一致
  • mysql 信息替换为你本地或远程数据库连接参数
  • sqlFilePath 设置为你希望读取的 .sql 文件绝对路径

4. 启动主服务(Client)

进入主服务目录并运行:

cd cmd/server
go run main.go

默认监听地址:http://localhost:2001


5. 启动 MCP 服务(Server)

在新终端中启动 MCP 服务:

cd cmd/mcp-server
go run main.go

默认监听地址:http://localhost:2002 服务将自动注册以下工具:

  • read_file: 读取指定的 .sql 文件内容
  • query_db: 执行任意 SQL 并返回查询结果

README fetched from the repository 7 days ago. The original is authoritative.

Questions

About Go MCP Demo

How do I install Go MCP Demo?

No package has been published for this server, so install it from source: clone the repository and follow its README.

Is Go MCP Demo safe to use with an AI agent?

Its trust score is 41 out of 100 (fair). It passes 3 of the 6 static security checks run so far; the failures are listed above. It has no ConduID identity yet, so agent calls to it are not receipted.

Is Go MCP Demo still maintained?

The last commit was a year ago. That's long enough that you should check whether the maintainer is responding to issues before depending on it.