go-mcp-server

jiasyuanchu/go-mcp-server

3.1

If you are the rightful owner of go-mcp-server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.

A simple Model Context Protocol (MCP) server implementation in Go.

Tools
1
Resources
0
Prompts
0

Go MCP Server

A simple Model Context Protocol (MCP) server implementation in Go.

Features

  • Basic MCP protocol support
  • Echo tool for testing
  • JSON-RPC communication via stdin/stdout

Usage

# Build the server
go build -o mcp-server cmd/server/main.go

# Run the server
./mcp-server

Development

# Run directly with go
go run cmd/server/main.go

# Test with a simple request
echo '{"id":"1","method":"tools/list"}' | go run cmd/server/main.go

Architecture

  • cmd/server/ - Application entry point
  • internal/server/ - Core server logic
  • internal/types/ - Type definitions
  • pkg/ - Reusable packages (future use)

MCP Protocol Support

Currently supported methods:

  • tools/list - List available tools
  • tools/call - Execute a tool

Available tools:

  • echo - Echo back input text