](https://hex.pm/packages/gbr_mcp) 
🧠 MCP服务器/客户端构建器
MCP(模型上下文协议)是连接人工智能的开源标准 应用程序到外部系统。
使用MCP,像Claude或ChatGPT这样的AI应用程序可以连接到数据 来源(如本地文件、数据库)、工具(如搜索引擎、计算器) 以及工作流程(例如专门的提示)——使他们能够访问密钥 信息和执行任务。
将MCP想象成AI应用程序的USB-C端口。
正如USB-C提供了一种连接电子设备的标准化方式一样, MCP提供了一种将AI应用程序连接到外部系统的标准化方法。
更多:https://modelcontextprotocol.io/docs/getting-started/intro
💡 正在进行中
- \[ \] 🐛 将MCP json模式更新为2025-11-25:解析器错误
- \[ \] 🔧 客户MCP即将上线。..
- \[ \] 🩺 更新deps
gbr_...
- \[\]完成deps gbr并发布十六进制版本。 - \[\]在此处更新 gleam.toml 去deps gbr_... 出版。
🚀 安装
gleam add gbr_mcp@1🛠️ 用法
🧩 MCP JSON模式加载
import gbr/mcp/loader
pub fn main() -> Nil {
let path = "./priv/2025-06-18-schema.json"
let field = "definitions"
let output = "./src/gbr/mcp/defs.gleam"
case loader.load_file_write(path, field, output) {
Ok(Nil) -> io.println("> Definitions write to " <> output)
Error(err) -> io.println_error(err)
}
}📡 MCP JSON-RPC服务器
- 示例:带有Hello工具的Wisp Mist服务器
- 示例:带有数学工具的Wisp Mist服务器
- 更多的例子即将出现。..
发展
gleam run # Run the project
gleam test # Run the tests