★ 8720 Go MIT sse 更新 10小时前

Go

A Go implementation of the Model Context Protocol (MCP), enabling seamless integration between LLM applications and external data sources and tools.

安装配置

暂未识别到可直接复制的 MCP 配置,请查看 GitHub README。后台管理员可以补充配置。

README 摘要

[![Build](https://github.com/mark3labs/mcp-go/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/mark3labs/mcp-go/actions/workflows/ci.yml) [![Go Report Card](https://goreportcard.com/badge/github.com/mark3labs/mcp-go?cache)](https://goreportcard.com/report/github.com/mark3labs/mcp-go) [![GoDoc](https://pkg.go.dev/badge/github.com/mark3labs/mcp-go.svg)](https://pkg.go.dev/github.com/mark3labs/mcp-go) [![AgentRank](https://agentrank-ai.com/api/badge/tool/mark3labs--mcp-go)](https://agentrank-ai.com/tool/mark3labs--mcp-go/) A Go implementation of the Model Context Protocol (MCP), enabling seamless integration between LLM applications and external data sources and tools. [![Tutorial](http://img.youtube.com/vi/qoaeYMrXJH0/0.jpg)](http://www.youtube.com/watch?v=qoaeYMrXJH0 "Tutorial") Discuss the SDK on [Discord](https://discord.gg/RqSS2NQVsY) ```go package main import ( "context" "fmt" "github.com/mark3labs/mcp-go/mcp" "github.com/mark3labs/mcp-go/server" ) func main() { // Create a new MCP server s := server.NewMCPServer( "Demo 🚀", "1.0.0", server.WithToolCapabilities(false), ) // Add tool tool := mcp.NewTool("hello_world", mcp.WithDescription("Say hello to someone"), mcp.WithString("name", mcp.Required(), mcp.Description("Name of the person to greet"), ), ) // Add tool handler s.AddTool(tool, helloHandler) // Start the stdio server if err := server.ServeStdio(s); err != nil { fmt.Printf("Server error: %v\n", err) } } func helloHandler(ctx context.Context, request mcp.CallToolRequest) (*mcp.CallToolResult, error) { name, err := request.RequireString("name") if err != nil { return mcp.NewToolResultError(err.Error()), nil } return mcp.NewToolResultText(fmt.Sprintf("Hello, %s!", name)), nil } ``` That's it! MCP Go handles all the complex protocol details and server management, so you can focus on building great tools. It aims to be high-level and easy to use. ### Key features: * **Fast**: High-level interface means less code and faster development * **Simple**: Build MCP servers with minimal boilerplate * **Complete***: MCP Go aims to provide a full implementation of the core MCP specification (\*emphasis on *aims*) 🚨 🚧 🏗️ *MCP Go is under active development, as is the MCP specification itself. Core features are working but some advanced capabilities are still in progress.* ## Table of Contents - [Installation](#installation) - [Quickstart](#quickstart) - [What is MCP?](#what-is-mcp) - [Core Concepts](#core-concepts) - [Server](#server) - [Resources](#resources) - [Tools](#tools) - [Prompts](#prompts) - [Examples](#examples) - [Extras](#extras) - [Transports](#transports) - [OAuth Protected Resource Metadata](#oauth-protected-resource-metadata) - [Session Management](#session-management) - [Basic Session Handling](#basic-session-handling) - [Per-Session Tools](#per-session-tools) - [Tool Filtering](#tool-filtering) - [Working with Context](#working-with-context) - [Request Hooks](#request-hooks) - [Tool Handler Middleware](#tool-handler-middleware) - [Regenerating Server Code](#regenerating-server-code) ## Installation ```bash go get github.com/mark3labs/mcp-go ``` ## Quickstart Let's create a simple MCP server that exposes a calculator tool and some data: ```go package main import (...

相关 MCP

Fastapi

Expose your FastAPI endpoints as Model Context Protocol (MCP) tools, with Auth!

★ 11868 Python sse 待补充
mcp Python sse

Chrome

Chrome MCP Server is a Chrome extension-based Model Context Protocol (MCP) server that exposes your Chrome browser funct...

★ 11659 TypeScript sse 有配置
mcp sse TypeScript

Unity

Unity MCP acts as a bridge, allowing AI assistants (like Claude, Cursor) to interact directly with your Unity Editor via...

★ 9756 C# sse 有配置
mcp sse C#

Agent

Build effective agents using Model Context Protocol and simple workflow patterns

★ 8327 Python sse 待补充
mcp Python sse

Registry

A community driven registry service for Model Context Protocol (MCP) servers.

★ 6836 Go sse 待补充
mcp sse Go

Xcode Build M C P

A Model Context Protocol (MCP) server and CLI that provides tools for agent use when working on iOS and macOS projects.

★ 5672 TypeScript sse 有配置
mcp sse TypeScript