foxy-contexts

Foxy Contexts is a Golang library for building context servers that support the Model Context Protocol using a declarative approach. It allows defining tools, resources, and prompts for server-side implementation.

96
2

Foxy Contexts

<p align="center">Build MCP Servers Declaratively in Golang</p>

Foxy Contexts is a Golang library designed for building context servers that support the Model Context Protocol (MCP). It focuses on the server-side implementation, enabling developers to create context servers using a declarative approach. This involves defining tools, resources, and prompts, then registering them with an app.Builder, which leverages Uber's fx for dependency injection.

Features:

The library offers features like base lifecycle management, Stdio and SSE transports, tools with input schema validation, static and dynamic resources, prompts, prompt completion, and a functional testing package (foxytest). It also supports simple MCP server construction with dependency injection.

Tool Example:

The README provides an example of using the library to create a tool that lists files in the current directory. This example demonstrates how to define a tool with its input schema and a callback function that executes when the tool is called.

Repository

ST
strowk

strowk/foxy-contexts

Created

December 1, 2024

Updated

March 28, 2025

Language

Go

Category

Developer Tools