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.

コメント

「その他」の他のコンテンツ