qilin
Qilin is a Model Context Protocol Framework for Go, designed to simplify the creation of MCP servers with a familiar interface for Go developers.
Qilin is a Go-based framework that facilitates the development of Model Context Protocol (MCP) servers. It is designed to be intuitive for developers familiar with Go's web application frameworks, offering a zero-configuration server setup. Qilin supports streamable HTTP transport, making it versatile for various applications. The framework is currently a work in progress, but it already provides essential features such as tools and resources management, middleware support, and subscription capabilities. Qilin aims to streamline the process of building MCP servers by providing a robust and easy-to-use platform.
Features
- {'name': 'Zero-config server', 'description': 'Launches an MCP server on STDIN/STDOUT with minimal setup.'}
- {'name': 'Familiar look and feel', 'description': "Inspired by Go's web application framework, making it easy for developers to adapt."}
- {'name': 'Streamable HTTP', 'description': 'Supports streamable HTTP transport for efficient data handling.'}
MCP Tools
- order_beer: Handles beer ordering requests and calculates the total amount.
MCP Resources
- {'name': 'menu_list', 'description': 'Provides a list of available beers.'}
Usage with Different Platforms
go
go
package main
import (
"fmt"
"github.com/miyamo2/qilin"
"maps"
)
type OrderBeerRequest struct {
BeerName string `json:"beer_name" jsonschema:"title=Beer Name"`
Quantity int `json:"quantity" jsonschema:"title=Quantity of Beers"`
}
type OrderBeerResponse struct {
Amount float64 `json:"amount"`
}
var beers = map[string]string{
"IPA": "A hoppy beer with a bitter finish.",
"Stout": "A dark beer with a rich, roasted flavor.",
"Lager": "A light, crisp beer with a smooth finish.",
}
func main() {
q := qilin.New("beer hall", qilin.WithVersion("v0.1.0"))
q.Resource("menu_list",
"resources://beer_list",
func(c qilin.ResourceContext) error {
return c.JSON(maps.Keys(beers))
})
q.Tool("order_beer",
(*OrderBeerRequest)(nil),
func(c qilin.ToolContext) error {
var req OrderBeerRequest
if err := c.Bind(&req); err != nil {
return err
}
_, ok := beers[req.BeerName]
if !ok {
return fmt.Errorf("beer %s not found", req.BeerName)
}
amount := 8 * req.Quantity // Assume unit cost of all beers is $8.00.
return c.JSON(OrderBeerResponse{Amount: float64(amount)})
})
q.Start() // listen on stdio
}
Related MCP Servers
View all developer_tools servers âSequential Thinking
by modelcontextprotocol
An MCP server implementation that provides a tool for dynamic and reflective problem-solving through a structured thinking process.
git-mcp
by idosal
GitMCP is a free, open-source, remote Model Context Protocol (MCP) server that transforms GitHub projects into documentation hubs, enabling AI tools to access up-to-date documentation and code.
Everything MCP Server
by modelcontextprotocol
The Everything MCP Server is a comprehensive test server designed to demonstrate the full capabilities of the Model Context Protocol (MCP). It is not intended for production use but serves as a valuable tool for developers building MCP clients.
context7
by upstash
Context7 MCP provides up-to-date, version-specific documentation and code examples directly into your prompt, enhancing the capabilities of LLMs by ensuring they use the latest information.
exa-mcp-server
by exa-labs
A Model Context Protocol (MCP) server allows AI assistants to use the Exa AI Search API for real-time web searches in a secure manner.
repomix
by yamadashy
Repomix is a tool that packs your codebase into AI-friendly formats, making it easier to use with AI tools like LLMs.
mcpdoc
by langchain-ai
MCP LLMS-TXT Documentation Server provides a structured way to manage and retrieve LLM documentation using the Model Context Protocol.