1. Conduid
  2. AI
  3. Go
MCP server · AI

Go

Build Model Context Protocol (MCP) servers in Go

Unclaimed MIT last commit a year ago golangaimcp
57Fair

Scored yesterday · breakdown

About Go

Go is an MCP server published by riza-io in the AI category: build Model Context Protocol (MCP) servers in Go. It has been installed 0 times through Conduid.

The repository has 36 stars and 4 forks, with the last commit a year ago. Six months or more without a commit doesn't mean the server is broken, but check the open issues (0) before depending on it in production.

Install

Install
npx mcp-go

This server has no ConduID identity, so agent calls to it are not receipted. Pin the version you install and review the source before granting it credentials.

Ask AI

Ask AI about Go

Powered by Claude · Grounded in docs

I know everything about Go. Ask me about installation, configuration, usage, or troubleshooting.

Security checks

  • ·README presentNot checked yet.
  • ·License declaredNot checked yet.
  • ·Tests presentNot checked yet.
  • ·Dependencies pinnedNot checked yet.
  • ·No dynamic code executionNot checked yet.
  • !Scoped permissionsDoesn't declare a permission scope. Assume it can do anything its process can.

Releases

v0.4.5v0.4.5 · 28 May 2025What's Changed feat(sse): Add request headers to metadata by @andrewmbenton in https://github.com/riza-io/mcp-go/pull/22 Full Changelog**: https://github.com/riza-io/mcp-go/compare/v0.4.4...v0.4.5
v0.4.4v0.4.4 · 16 May 2025What's Changed feat: Add Metadata method to AnyRequest by @kyleconroy in https://github.com/riza-io/mcp-go/pull/21 Full Changelog**: https://github.com/riza-io/mcp-go/compare/v0.4.3...v0.4.4
v0.4.3v0.4.3 · 26 Mar 2025What's Changed Add ServeMCP method by @kyleconroy in https://github.com/riza-io/mcp-go/pull/20 Full Changelog**: https://github.com/riza-io/mcp-go/compare/v0.4.2...v0.4.3
v0.4.2v0.4.2 · 22 Mar 2025What's Changed fix(rpc): Do not return Metadata in responses by @kyleconroy in https://github.com/riza-io/mcp-go/pull/19 Full Changelog**: https://github.com/riza-io/mcp-go/compare/v0.4.1...v0.4.2
v0.4.1v0.4.1 · 19 Mar 2025What's Changed feat: Add request metadata by @kyleconroy in https://github.com/riza-io/mcp-go/pull/18 Full Changelog**: https://github.com/riza-io/mcp-go/compare/v0.4.0...v0.4.1

README

MCP Go SDK

Build Go Report Card GoDoc

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.

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{
		fs: os.DirFS(root),
	})

	if err := server.Listen(context.Background(), os.Stdin, os.Stdout); err != nil {
		log.Fatal(err)
	}
}

You can compile this example and wire it up to Claude Desktop (or any other MCP client).

{
	"mcpServers": {
		"fs": {
			"command": "/path/to/mcp-go-fs",
			"args": [
				"/path/to/root/directory"
			]
		}
	}
}

Documentation

Roadmap

The majority of the base protocol is implemented. The following features are on our roadmap:

  • Notifications
  • Sampling
  • Roots

Legal

Offered under the MIT license.

README mirrored from the source repository yesterday. The original is authoritative.

Questions

About Go

How do I install Go?

Run npx mcp-go, then add the server to your MCP client's configuration. Conduid has recorded 0 installs, so the command is known to work with current clients.

Is Go safe to use with an AI agent?

Its trust score is 57 out of 100 (fair). It passes 0 of 1 static security checks; the failures are listed above. It has no ConduID identity yet, so agent calls to it are not receipted.

Is Go still maintained?

The last commit was a year ago, with 0 open issues. That's long enough that you should check whether the maintainer is responding to issues before depending on it.