MCP.so
登录

Go MCP Demo

@Patrick7241

基本信息

分类

其他

传输方式

stdio

作者

Patrick7241

关于 Go MCP Demo

mcp server and client

Go MCP Demo 配置

暂无标准配置

该服务器的 README 中没有可解析的 MCP 配置块,请前往代码仓库查看安装说明。

代码仓库

Go MCP Demo 工具

工具列表暂未提供

当前收录暂时没有可展示的工具列表,不代表服务没有工具。请查阅项目文档了解支持的能力。

工具是从 README 中自动提取的。维护者可以在 ## Tools 标题下列出工具,即可填充这部分内容。

概览

What is go-mcp-demo?

go-mcp-demo is an MCP Server and Client demo built on mark3labs/mcp-go that integrates with Ollama to enable local large language models to call tools via natural language. It targets developers who want to see how an MCP server communicates with an MCP client and performs tasks like reading SQL files and executing MySQL queries.

How to use go-mcp-demo?

Install Ollama and pull a model (e.g., qwen2:1.5b). Edit pkg/config/config.yml to set the Ollama model, MySQL connection, and a .sql file path. Then run cmd/server/main.go to start the main server (default port 2001), and separately run cmd/mcp-server/main.go to start the MCP server (default port 2002). The MCP server registers two tools: read_file and query_db.

Key features of go-mcp-demo

  • Integrates MCP Server and Client communication framework
  • Supports reading local .sql files via natural language
  • Supports executing arbitrary MySQL queries via natural language
  • Uses Ollama local LLM for inference (default port localhost:11434)

Use cases of go-mcp-demo

  • Demonstrate MCP communication with a local LLM and database tools
  • Allow users to query a MySQL database by simply describing what they want
  • Enable reading SQL file contents without manually opening files

常见问题

1

What runtime dependencies does go-mcp-demo require?

It requires Go (to run the code), Ollama (to serve a local LLM), and a MySQL database.

2

How is the LLM model configured?

Edit `config.yml` and set the `model` field to match the name used in `ollama pull` and `ollama run` (e.g., qwen2:1.5b).

3

Where does the SQL file path go?

In `config.yml` under `sql.sqlFilePath`, provide the absolute path to your `.sql` file.

4

What tools are registered by the MCP server?

Two tools: `read_file` (reads the specified .sql file) and `query_db` (executes arbitrary SQL and returns results).

5

What transport does go-mcp-demo use?

The servers listen on localhost TCP ports (2001 for the main client, 2002 for the MCP server). The README does not specify authentication.

评论

其他 分类下的更多 MCP 服务器