Go MCP server demo with local LLM tool calling

Go MCP server demo with local LLM tool calling

go-mcp-demo•bypatrick7241

A demonstration project pairing an MCP Server and Client, using a local Ollama model to invoke tools through natural language.

License: Not specified•Runtime: Awaiting documentation review•Category: developer tools

WHAT IT DOES

  • •Provides an MCP Server plus Client communication framework.
  • •The MCP server registers a read_file tool that reads a specified .sql file.
  • •The MCP server registers a query_db tool that runs arbitrary SQL and returns results.
  • •Uses a local Ollama model, by default on port 11434, for reasoning.

BEST FOR

  • •Executing natural-language requests to read .sql files through an MCP server.
  • •Running MySQL queries via natural-language instructions.

ABOUT GO-MCP-DEMO

Go MCP server demo with local LLM tool calling is cataloged as an MCP server attributed to patrick7241. A demonstration project pairing an MCP Server and Client, using a local Ollama model to invoke tools through natural language. It is categorized under developer tools. See the capability inspector for recorded interfaces and their independent review status; consult upstream documentation for the current interface.

HOW TO INSTALL

Installation configuration is not reviewed. No executable setup is offered for this entry; inspect the source repository before proceeding.

LICENSE

Catalog license label: Not specified. Check the source repository's current license and terms before using, modifying or distributing this software.

Capability inspector

Capability definitions are not reviewed. Unreviewed imports are not exposed as trusted interfaces.

Tools (0)

No reviewed records to display. This does not establish that upstream lacks this capability.

Resources (0)

No reviewed records to display. This does not establish that upstream lacks this capability.

Prompts (0)

No reviewed records to display. This does not establish that upstream lacks this capability.

NEWSLETTER - COMING LATER

Newsletter subscriptions are not open yet

Email delivery is not connected. This page does not collect email addresses or create subscriptions.

Browse the registry for current listings instead.

Community Reviews

Coming later

Reviews for Go MCP server demo with local LLM tool calling are not available yet

Review publishing and storage are not connected. This page does not collect or publish ratings or comments, including after sign-in.

FREQUENTLY ASKED QUESTIONS

What is the default port of the MCP server?

The MCP server listens by default on port 2002.

Which model does the demo use by default?

The example uses the qwen2:1.5b model pulled and run through Ollama.

Upstream README

View this exact version on GitHub

README.md · c19b9a083f88 · Fetched 2026-11-13 10:35:33 UTC

Original upstream text, without AI rewriting. Scripts, forms and unsafe links are filtered for safety.

Showing the last retrieved documentation snapshot; check the source for current changes.

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 并返回查询结果

Install configuration

Are you the maintainer?

Claim this server with your GitHub account to request manual ownership verification.

README Embed Badge
Markdown

Link to the catalog listing for Go MCP server demo with local LLM tool calling from your README. This badge does not certify ownership, compatibility or security.

[![MCP catalog listing](https://img.shields.io/badge/MCP-awesome--mcp-orange?style=flat-square)](https://awesome-mcp.com/servers/go-mcp-demo)

REPOSITORY STATS

GitHub StarsUnavailable
ForksUnavailable

Public repository statistics could not be verified. Check the configured source address; unavailable counts are not zero.

Downloads and pulls

Separate sources, scopes and periods. Never combined or treated as installations, active users or security reviews.

No reviewed package or image identity; download statistics are not listed yet.

Related developer tools MCP Servers

Alternative and complementary servers in the same category

View all in developer tools →
Postbye
postbye-mcp•postbye-team

A directory listing describing a cancellation-letter and mailing-address service. The configured public GitHub repository returned 404 during source verification.

Repository stats unavailable
Developer Tools
Singapore Proxy MCP
singapore-proxy-mcp•Xavierfok

A hosted MCP service for browsing and searching through Singapore mobile-network proxies.

0
Developer Tools

A directory listing describing a Markdown-to-PDF service. The configured public GitHub repository returned 404 during source verification.

Repository stats unavailable
Developer Tools