R
riza-io/mcp-go
Build Model Context Protocol (MCP) servers in Go
View on GitHub ↗Link checked 2026-11-12 · HTTP 200 · opens the vendor's own site
We have neither an install command nor a public remote endpoint from this repository, so we do not print a config. A made-up one is worse than none. How each client wires MCP up →
- Source
- collected from the abordage/awesome-mcp list · type: MCP server
- Harvest history
- first seen 2026-11-05 · last seen 2026-11-14 · seen 10× · listed by 10 sources
- Score
- score 1,003 · 10 sources · mcp
FAQ (answers come from our records)
Who is it for?
We filed it under these tags: MCP 服务. The tags come from the entry itself, not a taxonomy we imposed.
Who maintains it?
first catalogued 2026-11-05;last seen 2026-11-14。There is no official certification or quality rating here — we record sources and dates only.
MCP Go SDK
以下摘录自该仓库的 README(片段) · 在 GitHub 读完整 README →
==========
A Go implementation of the Model Context Protocol (MCP), providing both client and server capabilities for integrating with LLM surfaces.
## Overview
The Model Context Protocol allows applications to provide context for LLMs in a standardized way, separating the concerns of providing context from the actual LLM interaction. This Go SDK implements the full MCP specification, making it easy to:
Build MCP clients that can connect to any MCP server
Create MCP servers that expose resources, prompts and tools
Use standard transports like stdio and SSE (coming soon)
Handle all MCP protocol messages and lifecycle events
## A small example
Curious what all this looks like in practice? Here's an example server that
exposes the contents of an io.FS as resources.
go
package main
import (
"context"
"flag"
"io/fs"
"log"
"mime"
"os"
"path/filepath"
"strings"
"github.com/riza-io/mcp-go"
type FSServer struct {
fs fs.FS
mcp.UnimplementedServer
func (s FSServer) Initialize(ctx context.Context, req mcp.Request[mcp.InitializeRequest]) (mcp.Response[mcp.InitializeResponse], error) {
return mcp.NewResponse(&mcp.InitializeResponse{
ProtocolVersion: req.Params.ProtocolVersion,
Capabilities: mcp.ServerCapabilities{
Resources: &mcp.Resources{},
},
}), nil
func (s FSServer) ListResources(ctx context.Context, req mcp.Request[mcp.ListResourcesRequest]) (mcp.Response[mcp.ListResourcesResponse], error) {
var resources []mcp.Resource
fs.WalkDir(s.fs, ".", func(path string, d fs.DirEntry, err error) error {
if err != nil {
return err
if d.IsDir() {
return nil
resources = append(resources, mcp.Resource{
URI: "file://" + path,
Name: path,
MimeType: mime.TypeByExtension(filepath.Ext(path)),
})
return nil
})
return mcp.NewResponse(&mcp.ListResourcesResponse{
Resources: resources,
}), nil
func (s FSServer) ReadResource(ctx context.Context, req mcp.Request[mcp.ReadResourceRequest]) (mcp.Response[mcp.ReadResourceResponse], error) {
contents, err := fs.ReadFile(s.fs, strings.TrimPrefix(req.Params.URI, "file://"))
if err != nil {
return nil, err
return mcp.NewResponse(&mcp.ReadResourceResponse{
Contents: []mcp.ResourceContent{
URI: req.Params.URI,
MimeType: mime.TypeByExtension(filepath.Ext(req.Params.URI)),
Text: string(contents), // TODO: base64 encode
},
},
}), nil
func main() {
flag.Parse()
root := flag.Arg(0)
if root == "" {
root = "/"
server := mcp.NewStdioServer(&FSServer{
A Go implementation of the Model Context Protocol (MCP), providing both client and server capabilities for integrating with LLM surfaces.
## Overview
The Model Context Protocol allows applications to provide context for LLMs in a standardized way, separating the concerns of providing context from the actual LLM interaction. This Go SDK implements the full MCP specification, making it easy to:
Build MCP clients that can connect to any MCP server
Create MCP servers that expose resources, prompts and tools
Use standard transports like stdio and SSE (coming soon)
Handle all MCP protocol messages and lifecycle events
## A small example
Curious what all this looks like in practice? Here's an example server that
exposes the contents of an io.FS as resources.
go
package main
import (
"context"
"flag"
"io/fs"
"log"
"mime"
"os"
"path/filepath"
"strings"
"github.com/riza-io/mcp-go"
type FSServer struct {
fs fs.FS
mcp.UnimplementedServer
func (s FSServer) Initialize(ctx context.Context, req mcp.Request[mcp.InitializeRequest]) (mcp.Response[mcp.InitializeResponse], error) {
return mcp.NewResponse(&mcp.InitializeResponse{
ProtocolVersion: req.Params.ProtocolVersion,
Capabilities: mcp.ServerCapabilities{
Resources: &mcp.Resources{},
},
}), nil
func (s FSServer) ListResources(ctx context.Context, req mcp.Request[mcp.ListResourcesRequest]) (mcp.Response[mcp.ListResourcesResponse], error) {
var resources []mcp.Resource
fs.WalkDir(s.fs, ".", func(path string, d fs.DirEntry, err error) error {
if err != nil {
return err
if d.IsDir() {
return nil
resources = append(resources, mcp.Resource{
URI: "file://" + path,
Name: path,
MimeType: mime.TypeByExtension(filepath.Ext(path)),
})
return nil
})
return mcp.NewResponse(&mcp.ListResourcesResponse{
Resources: resources,
}), nil
func (s FSServer) ReadResource(ctx context.Context, req mcp.Request[mcp.ReadResourceRequest]) (mcp.Response[mcp.ReadResourceResponse], error) {
contents, err := fs.ReadFile(s.fs, strings.TrimPrefix(req.Params.URI, "file://"))
if err != nil {
return nil, err
return mcp.NewResponse(&mcp.ReadResourceResponse{
Contents: []mcp.ResourceContent{
URI: req.Params.URI,
MimeType: mime.TypeByExtension(filepath.Ext(req.Params.URI)),
Text: string(contents), // TODO: base64 encode
},
},
}), nil
func main() {
flag.Parse()
root := flag.Arg(0)
if root == "" {
root = "/"
server := mcp.NewStdioServer(&FSServer{
Listed badge (optional)
Copy this line into the README if you want the listing mark. Optional, and it does not affect being listed.
[](https://anclum.com/en/s/riza-io-mcp-go/)
- Source
- awesome · https://github.com/riza-io/mcp-go
- Browse by field
- MCP servers
- Listed by
- 10 independent sources
- added
- today
More like this
Filed under
Every tag opens the full list for that filter. Counts are the live catalogue figures.