qilin
Qilin MCP Framework
Documentation
Qilin π©οΈπ²π©οΈ β Model Context Protocol Framework for Go
π Highlights
| | |
|---|---|
| β‘ Zeroβconfig server | `qilin.New().Start()` launches an MCP server on STDIN/STDOUT |
| π€ Familiar look and feel | Handlers inspired by Go's well-known web application framework. Developers familiar with them will feel right at home. |
| β© Streamable HTTP | Supports Streamable HTTP transport. |
π Quick Start
go get github.com/miyamo2/qilinpackage 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
}For more detailed usage, please refer to the Qilin User Guide.
π€ Roadmap
Transports
- [x] Stdio
- [x] Streamable HTTP
Features
- [x] Tool
- [x] Resource
- [ ] Prompt
π License
Qilin released under the MIT License
Frequently asked questions
What is qilin?
qilin is Qilin MCP Framework
How do I install qilin?
Open the GitHub repository and follow its README. Most MCP servers are added to your client's MCP config, then called by your agent.
Is qilin open source?
Yes β it is hosted on GitHub at https://github.com/miyamo2/qilin and has 2 stars.
Related MCP tools
ToolHive makes deploying MCP servers easy, secure and fun Go-based implementation. Trusted by 1300+ developers. Trusted by 1300+ developers.
Self-hosted MCP Gateway and Registry for AI agents Go-based implementation. Trusted by 600+ developers. Trusted by 600+ developers.
Query anything (GitHub, Notion, +40 more) with SQL and let LLMs (ChatGPT, Claude) connect to using MCP Go-based implementation. Trusted by 1300+ developers.
A command-line interface for interacting with MCP (Model Context Protocol) servers using both stdio and HTTP transport. Go-based implementation.
The most powerful MCP Slack Server with no permission requirements, Apps support, multiple transports Stdio and SSE, DMs, Group DMs and smart history fetch l...
Universal MCP-Server for your Databases optimized for LLMs and AI-Agents. Go-based implementation.
Run your own MCP server? See who uses it and what to fix.
Measure it with TrackMCP