You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A XGo implementation of the Model Context Protocol (MCP), enabling seamless integration between LLM applications and external data sources and tools.
This repo contains two XGo classfiles. They are mcp (MCP Server Framework) and mcptest (MCP Server Test Framework).
The classfile mcp has the file suffix _mcp.gox (the MCP Server), _res.gox (a MCP Resource or ResourceTemplate), _tool.gox (a MCP Tool) and _prompt.gox (a MCP Prompt). The classfile mcptest has the file suffix _mtest.gox.
mcp: MCP Server Framework
Here is a MCP Server example (source code). It has two files: main_mcp.gox (the MCP Server) and hello_tool.gox (a MCP Tool).
The content of main_mcp.gox (the MCP Server) is as follows
server"Tool Demo 🚀", "1.0.0"
The content of hello_tool.gox (a MCP Tool) is as follows
tool"helloWorld", => {
description"Say hello to someone"string"name", => {
requireddescription"Name of the person to greet"
}
}
name, ok:= ${name}.(string)
if!ok {
returnnewError("name must be a string")
}
returntext("Hello, ${name}!")