Foxy Contexts logo

Foxy Contexts

by strowk

Foxy Contexts is a Golang library for building context servers supporting the Model Context Protocol. It allows building context servers declaratively by defining tools, resources, and prompts.

View on GitHub

Last updated: N/A

What is Foxy Contexts?

Foxy Contexts is a Golang library that simplifies the creation of Model Context Protocol (MCP) servers. It provides a declarative approach to defining the server's capabilities through tools, resources, and prompts, leveraging Uber's fx dependency injection framework.

How to use Foxy Contexts?

To use Foxy Contexts, you define your tools, resources, and prompts as Go code. You then register them with an app.Builder, which utilizes Uber's fx for dependency injection. The library handles the server setup and communication based on the MCP protocol. Example usage can be found in the repository's examples directory.

Key features of Foxy Contexts

  • Base (lifecycle/ping)

  • Stdio Transport

  • SSE Transport

  • Streamable HTTP Transport (beta)

  • Tools with input schema validation

  • Resources (static and dynamic)

  • Prompts and Completion

  • Functional Testing package foxytest

  • Simple building of your MCP server with the power of Dependency Injection

Use cases of Foxy Contexts

  • Building context servers for AI agents

  • Creating tools for interacting with various services

  • Providing resources to AI agents

  • Implementing prompts for AI agents

  • Developing MCP-compliant servers

FAQ from Foxy Contexts

What is Model Context Protocol (MCP)?

MCP is a protocol for communication between AI agents and context servers.

What is a context server?

A context server provides information and tools to AI agents.

What is a tool in Foxy Contexts?

A tool is a function that can be called by an AI agent to perform a specific task.

What is a resource in Foxy Contexts?

A resource is a piece of information that can be accessed by an AI agent.

What is a prompt in Foxy Contexts?

A prompt is a request for information from an AI agent.