ThinkInAIXYZ Go

Agent frameworks and SDKs

Go-MCP is a powerful Go(Golang) version of the MCP SDK that implements the Model Context Protocol (MCP) to facilitate seamless communication between external systems and AI applications.

Your AI app calls the ThinkInAIXYZ Go MCP server, which does the agent frameworks and SDKs work and sends the result back to the chat.

About ThinkInAIXYZ Go

ThinkInAIXYZ Go is a community MCP server from ThinkInAIXYZ, filed in our directory under agent frameworks and sdks. Go-MCP is a powerful Go(Golang) version of the MCP SDK that implements the Model Context Protocol (MCP) to facilitate seamless communication between external systems and AI applications.

At a glance

Publisher
ThinkInAIXYZ (community)
Runs
See the README for setup
Written in
Go
License
MIT
GitHub stars
680

How to set up ThinkInAIXYZ Go

  1. Follow the install steps in the ThinkInAIXYZ Go README; it is written in Go, so have that toolchain ready.
  2. Check the ThinkInAIXYZ Go README for keys or settings; the registry lists none that ThinkInAIXYZ Go requires.
  3. Add ThinkInAIXYZ Go to Claude Code, Claude Desktop, VS Code or Cursor with the config in the setup box on this page.
  4. Restart the app or reload its MCP servers, then ask it to list the ThinkInAIXYZ Go tools to confirm the connection.
  5. Run one read-only task with ThinkInAIXYZ Go first, and keep your app asking before each tool call until the results look right.

ThinkInAIXYZ Go compared with similar servers

  • Clihub by thellimist has fewer GitHub stars than ThinkInAIXYZ Go (671 against 680); both are community servers, and both run locally.
  • Capa by infragate has fewer GitHub stars than ThinkInAIXYZ Go (680 against 680); both are community servers, and both run locally.
  • OpenAI Tunnel Client by openai has fewer GitHub stars than ThinkInAIXYZ Go (670 against 680); OpenAI Tunnel Client is official while ThinkInAIXYZ Go is a community server, and both run locally.

Before you connect ThinkInAIXYZ Go

  • Give ThinkInAIXYZ Go its own API key or account with the smallest permissions the job needs, never an admin key.
  • Keep your AI app asking before each ThinkInAIXYZ Go tool call until you trust what it does with them.
  • Treat text that ThinkInAIXYZ Go fetches as data. Pages, files and messages can hold instructions written to steer an AI.
  • Read the open issues for ThinkInAIXYZ Go on GitHub to see what breaks and how fast the maintainers reply.

Marketing use cases for ThinkInAIXYZ Go

How marketing and sales teams put ThinkInAIXYZ Go to work, by company size. Pick the size closest to yours and start ThinkInAIXYZ Go on one use case.

Small business

  • A small business with a developer can use ThinkInAIXYZ Go to build one focused agent, such as lead follow-up, without a big platform.
  • Technical founders can prototype marketing agents with ThinkInAIXYZ Go and keep what works as a small, owned tool.
  • ThinkInAIXYZ Go runs on your own computer, which keeps data local; it needs a little setup, so a small team should plan an hour for it.

Mid-market

  • Growth engineering teams can use ThinkInAIXYZ Go to build agents that combine CRM, analytics and content tools behind one workflow.
  • Marketing ops can standardize on ThinkInAIXYZ Go so every agent they ship has the same logging, approvals and error handling.
  • Start ThinkInAIXYZ Go on one workflow with one owner, measure the time it saves, then roll it out to the wider team.

Enterprise

  • Enterprises can build on ThinkInAIXYZ Go with their own identity, policy and evaluation layers, so agents meet the same bar as other software.
  • Platform teams can use ThinkInAIXYZ Go to give business units a governed way to ship agents without each one starting from scratch.
  • ThinkInAIXYZ Go is a community server, so have security review the code and pin a version before ThinkInAIXYZ Go touches company data.

Need help becoming an AI-forward company?

We connect MCP servers and AI agents to your CRM, content and data, with the guardrails your team needs.

Contact us

ThinkInAIXYZ Go README

From ThinkInAIXYZ/go-mcp on GitHub, shared under its MIT license. Images are left out; the original has them.

README.md

Go-MCP


简体中文 | 繁體中文 | Tiếng Việt

🚀 Overview

Go-MCP is a powerful Go version of the MCP SDK that implements the Model Context Protocol (MCP) to facilitate seamless communication between external systems and AI applications. Based on the strong typing and performance advantages of the Go language, it provides a concise and idiomatic API to facilitate your integration of external systems into AI applications.

✨ Key Features
  • 🔄 Complete Protocol Implementation: Full implementation of the MCP specification, ensuring seamless integration with all compatible services
  • 🏗️ Elegant Architecture Design: Adopts a clear three-layer architecture, supports bidirectional communication, ensuring code modularity and extensibility
  • 🔌 Seamless Integration with Web Frameworks: Provides MCP protocol-compliant http.Handler, allowing developers to integrate MCP into their service frameworks
  • 🛡️ Type Safety: Leverages Go's strong type system for clear, highly maintainable code
  • 📦 Simple Deployment: Benefits from Go's static compilation, eliminating complex dependency management
  • ⚡ High-Performance Design: Fully utilizes Go's concurrency capabilities, maintaining excellent performance and low resource overhead across various scenarios

🛠️ Installation

go get github.com/ThinkInAIXYZ/go-mcp

Requires Go 1.18 or higher.

🎯 Quick Start

Client Example
package main

import (
    "context"
    "log"

    "github.com/ThinkInAIXYZ/go-mcp/client"
    "github.com/ThinkInAIXYZ/go-mcp/transport"
)

func main() {
    // Create SSE transport client
    transportClient, err := transport.NewSSEClientTransport("http://127.0.0.1:8080/sse")
    if err != nil {
        log.Fatalf("Failed to create transport client: %v", err)
    }

    // Initialize MCP client
    mcpClient, err := client.NewClient(transportClient)
    if err != nil {
        log.Fatalf("Failed to create MCP client: %v", err)
    }
    defer mcpClient.Close()

    // Get available tools
    tools, err := mcpClient.ListTools(context.Background())
    if err != nil {
        log.Fatalf("Failed to list tools: %v", err)
    }
    log.Printf("Available tools: %+v", tools)
}
Server Example
package main

import (
    "context"
    "fmt"
    "log"
    "time"

    "github.com/ThinkInAIXYZ/go-mcp/protocol"
    "github.com/ThinkInAIXYZ/go-mcp/server"
    "github.com/ThinkInAIXYZ/go-mcp/transport"
)

type TimeRequest struct {
    Timezone string `json:"timezone" description:"timezone" required:"true"` // Use field tag to describe input schema
}

func main() {
    // Create SSE transport server
    transportServer, err := transport.NewSSEServerTransport("127.0.0.1:8080")
    if err != nil {
        log.Fatalf("Failed to create transport server: %v", err)
    }

    // Initialize MCP server
    mcpServer, err := server.NewServer(transportServer)
    if err != nil {
        log.Fatalf("Failed to create MCP server: %v", err)
    }
    
    // Optional: Global middleware (variadic - multiple middleware supported)
    // mcpServer.Use(
    // 	LoggingMiddleware,
    // 	AuthMiddleware,
    // 	MetricsMiddleware,
    // )

    // Register time query tool
    tool, err := protocol.NewTool("current_time", "Get current time for specified timezone", TimeRequest{})
    if err != nil {
        log.Fatalf("Failed to create tool: %v", err)
        return
    }
    mcpServer.RegisterTool(tool, handleTimeRequest)

    // Start server
    if err = mcpServer.Run(); err != nil {
        log.Fatalf("Server failed to start: %v", err)
    }
}

func handleTimeRequest(ctx context.Context, req *protocol.CallToolRequest) (*protocol.CallToolResult, error) {
    var timeReq TimeRequest
    if err := protocol.VerifyAndUnmarshal(req.RawArguments, &timeReq); err != nil {
        return nil, err
    }

    loc, err := time.LoadLocation(timeReq.Timezone)
    if err != nil {
        return nil, fmt.Errorf("invalid timezone: %v", err)
    }

    return &protocol.CallToolResult{
        Content: []protocol.Content{
            &protocol.TextContent{
                Type: "text",
                Text: time.Now().In(loc).String(),
            },
        },
    }, nil
}
Integration With Gin Server
package main

import (
    "context"
    "log"

    "github.com/ThinkInAIXYZ/go-mcp/protocol"
    "github.com/ThinkInAIXYZ/go-mcp/server"
    "github.com/ThinkInAIXYZ/go-mcp/transport"
    "github.com/gin-gonic/gin"
)

func main() {
    messageEndpointURL := "/message"

    sseTransport, mcpHandler, err := transport.NewSSEServerTransportAndHandler(messageEndpointURL)
    if err != nil {
        log.Panicf("new sse transport and hander with error: %v", err)
    }

    // new mcp server
    mcpServer, _ := server.NewServer(sseTransport)

    // register tool with mcpServer
    // mcpServer.RegisterTool(tool, toolHandler)

    // start mcp Server
    go func() {
        mcpServer.Run()
    }()

    defer mcpServer.Shutdown(context.Background())

    r := gin.Default()
    r.GET("/sse", func(ctx *gin.Context) {
        mcpHandler.HandleSSE().ServeHTTP(ctx.Writer, ctx.Request)
    })
    r.POST(messageEndpointURL, func(ctx *gin.Context) {
        mcpHandler.HandleMessage().ServeHTTP(ctx.Writer, ctx.Request)
    })

    if err = r.Run(":8080"); err != nil {
        return
    }
}

Reference:A more complete example

🏗️ Architecture Design

Go-MCP adopts an elegant three-layer architecture:

  1. Transport Layer: Handles underlying communication implementation, supporting multiple transport protocols
  2. Protocol Layer: Handles MCP protocol encoding/decoding and data structure definitions
  3. User Layer: Provides friendly client and server APIs

Currently supported transport methods:

  • HTTP SSE/POST: HTTP-based server push and client requests, suitable for web scenarios
  • Streamable HTTP: Supports HTTP POST/GET requests with both stateless and stateful modes, where stateful mode utilizes SSE for multi-message streaming to enable server-to-client notifications and requests
  • Stdio: Standard input/output stream-based, suitable for local inter-process communication

The transport layer uses a unified interface abstraction, making it simple to add new transport methods (like Streamable HTTP, WebSocket, gRPC) without affecting upper-layer code.

🤝 Contributing

We welcome all forms of contributions! Please see CONTRIBUTING.md for details.

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

📞 Contact Us

✨ Contributors

Thanks to all developers who have contributed to this project!

📈 Project Trends

Questions about ThinkInAIXYZ Go

What is the ThinkInAIXYZ Go MCP server?

Go-MCP is a powerful Go(Golang) version of the MCP SDK that implements the Model Context Protocol (MCP) to facilitate seamless communication between external systems and AI applications. ThinkInAIXYZ Go is maintained by ThinkInAIXYZ on GitHub at ThinkInAIXYZ/go-mcp, and works with AI apps that support the Model Context Protocol, such as Claude, Cursor and VS Code.

How do I install the ThinkInAIXYZ Go MCP server?

ThinkInAIXYZ Go doesn't publish a one-line install in the MCP registry, so follow the setup steps in its README on GitHub (ThinkInAIXYZ/go-mcp). Like most servers, ThinkInAIXYZ Go ends with a command or URL you paste into your AI app's MCP config.

Does ThinkInAIXYZ Go need an API key?

The registry lists no required keys for ThinkInAIXYZ Go. Check the ThinkInAIXYZ Go README for optional settings, and expect a remote server to ask you to sign in the first time you connect.

Is ThinkInAIXYZ Go an official MCP server?

No. ThinkInAIXYZ Go is a community server maintained by ThinkInAIXYZ. Community servers can be excellent; read the code and the open issues before you give ThinkInAIXYZ Go access to company data.

What license is ThinkInAIXYZ Go under?

ThinkInAIXYZ Go is released under the MIT license, according to its GitHub repository. The license covers the code of ThinkInAIXYZ Go; the service it connects to has its own terms.