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

Go MCP

Go module for running MCP server on AWS Lambda

Unclaimed MIT last commit a year ago cloud
49Fair

Scored 5 months ago · breakdown

About Go MCP

Go MCP is an MCP server published by puttsk in the Cloud category: go module for running MCP server on AWS Lambda.

The repository has 1 stars and 0 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 before depending on it in production.

Install

From source
git clone https://github.com/puttsk/go-mcp

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 MCP

Powered by Claude · Grounded in docs

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

Security checks

Static checks derived from the repository 22 hours ago. Heuristics on the source, not an audit.

  • ✓README presentThe repository ships documentation.
  • ✓License declaredUsable under a stated license.
  • ✓Tests presentA test suite exists in the repository.
  • ✓Dependencies pinnedA lockfile pins dependency versions.
  • ✓No dynamic code executionSource scan found no eval, dynamic Function, or shell execution.
  • !Scoped permissionsDoesn't declare a permission scope. Assume it can do anything its process can.

README

go-mcp

Go module for running MCP server on AWS Lambda.

Install

go get -u github.com/puttsk/go-mcp

Usage

AWS Lambda function

This example demonstrates how to create an MCP server on AWS Lambda with a simple tool named add, which adds two integers. The server uses an in-memory session manager along with a Lambda transport handler.

Note: The in-memory session manager used in this example is intended for testing purposes only. Since AWS Lambda instances are stateless and can be terminated at any time, session data cannot be shared across instances and will be reset when the function ends.

// main.go
import (
  "context"
  "fmt"
  "log"
  "net/http"

  "github.com/aws/aws-lambda-go/events"
  "github.com/aws/aws-lambda-go/lambda"
  "github.com/puttsk/go-mcp"
  "github.com/puttsk/go-mcp/session/memory"
  "github.com/puttsk/go-mcp/transport/awslambda"
)

var server *mcp.McpServer

func handler(ctx context.Context, request events.APIGatewayProxyRequest) (events.APIGatewayProxyResponse, error) {

  // Processing request from AWS Lambda
  resp, err := server.ProcessRequest(ctx, request)
  if err != nil {
    return events.APIGatewayProxyResponse{
      Body:       "Error processing request",
      Headers:    headers,
      StatusCode: http.StatusInternalServerError,
    }, nil
  }

  if response, ok := resp.(events.APIGatewayProxyResponse); ok {
    return response, nil
  } else {
    return events.APIGatewayProxyResponse{
      Body:       "Invalid response type",
      Headers:    headers,
      StatusCode: http.StatusInternalServerError,
    }, nil
  }
}

func init() {
  // Initialize the MCP server with in-memory session manager and AWS Lambda transport handler
  server, _ = mcp.NewMcpServer("mcptest", "1.0.0", mcp.McpProtocol2025_30_26)
  server.LogLevel = mcp.LogLevelDebug
  server.TransportHandler = &awslambda.TransportHandler{} // Setup transport handler
  server.SessionManager = memory.NewSessionManager() // Setup in-memory session manager

  // Register tool "add" with the server
  server.RegisterTool("add", 
    func(a, b int) int { return a + b },
    mcp.McpToolParameter{Name: "a", Description: "First number"},
    mcp.McpToolParameter{Name: "b", Description: "Second number"},
  )
  server.SetToolDescription("add", "Tool for adding two integers")
}

func main() {
  lambda.Start(handler)
}

Tool Functions

Tool functions can accept a Go context as their first parameter. You can retrieve the current session and MCP request ID using the following helper functions:

  • GetSessionFromContext(ctx)
  • GetRequestIDFromContext(ctx)

These functions allow you to access session-specific and request-specific information within your tool logic.

Known Limitations

  • Only support streamable HTTP transport; Server-Sent Event (SSE) and stdin are not support
  • Only support following MCP methods
    • initailize
    • notifications/initialized
    • tools/list
    • tools/call
  • Tool inputs are limited to scalar types: number, string, boolean, and image.
  • Tool outputs are limited to text and image.

README fetched from the repository 22 hours ago. The original is authoritative.

Questions

About Go MCP

How do I install Go MCP?

No package has been published for this server, so install it from source: clone the repository and follow its README.

Is Go MCP safe to use with an AI agent?

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

Is Go MCP still maintained?

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