Foxy Contexts
Foxy contexts is a library for building context servers supporting Model Context Protocol
What is Foxy Contexts?
Foxy Contexts is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to foxy contexts is a library for building context servers supporting model context protocol
Foxy contexts is a library for building context servers supporting Model Context Protocol
This server falls under the Developer Tools category on MCPgee, the world's largest MCP server directory with 33,000+ servers.
Features
- Foxy contexts is a library for building context servers supp
Use Cases
Maintainer
Works with
Installation
Manual Installation
npx foxy-contextsConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
How to Set Up and Use Foxy Contexts
Foxy Contexts is a Go library for building Model Context Protocol (MCP) servers using a declarative, dependency-injection-based approach built on Uber's fx framework. Instead of implementing the MCP wire protocol manually, developers define tools, resources, and prompts as Go structs with callbacks, and Foxy Contexts handles transport (stdio, SSE, or HTTP), session management, input schema validation, and protocol compliance automatically. It is best suited for Go developers who want to ship custom MCP servers quickly with a well-structured, testable codebase.
Prerequisites
- Go 1.21 or higher installed
- Familiarity with Go modules and the Go toolchain
- An MCP-compatible client such as Claude Desktop or the MCP Inspector for testing
- Git to clone example repositories
Add foxy-contexts to your Go module
Initialize a new Go module (or use an existing one) and add the foxy-contexts dependency.
go mod init my-mcp-server
go get github.com/strowk/foxy-contextsDefine a tool using NewTool
Create a tool with a name, description, and input schema using the fxctx package. The callback receives parsed arguments and returns MCP content.
import "github.com/strowk/foxy-contexts/pkg/fxctx"
myTool := fxctx.NewTool(
&protocol.Tool{
Name: "my_tool",
Description: mcp.Ptr("Does something useful"),
},
func(args map[string]interface{}) *protocol.CallToolResult {
// implement tool logic here
return &protocol.CallToolResult{}
},
)Build and start the app
Use app.NewBuilder() to wire everything together, attach your tools, and start the server with your chosen transport (stdio is default).
import "github.com/strowk/foxy-contexts/pkg/app"
app.NewBuilder().
WithName("my-mcp-server").
WithVersion("1.0.0").
WithTool(myTool).
WithTransport(app.NewStdioTransport()).
Run()Test with the MCP Inspector
Use the official MCP Inspector to connect to your server and verify the tools are correctly exposed before wiring it up to a production client.
npx @modelcontextprotocol/inspector go run main.goConfigure your MCP client
Add the compiled server binary to your Claude Desktop configuration so Claude can use the tools you registered.
{
"mcpServers": {
"my-mcp-server": {
"command": "/path/to/my-mcp-server",
"args": []
}
}
}Foxy Contexts Examples
Client configuration
Claude Desktop configuration for a custom MCP server built with Foxy Contexts and compiled to a binary.
{
"mcpServers": {
"my-foxy-server": {
"command": "/usr/local/bin/my-foxy-server",
"args": []
}
}
}Prompts to try
Example prompts depend on what tools you register. These prompts work for a server exposing filesystem or utility tools typical of Foxy Contexts examples.
- "List all Kubernetes namespaces" (if you built a k8s tool)
- "Show the contents of my project directory"
- "Run the registered echo tool with message 'hello world'"
- "What tools are available on this MCP server?"Troubleshooting Foxy Contexts
go get fails with module not found errors
Ensure you have Go modules enabled (GO111MODULE=on or Go 1.16+) and run 'go mod tidy' after adding the dependency. Check your network access if the module proxy is unreachable.
Claude Desktop does not see the server's tools
Verify the server binary path in claude_desktop_config.json is absolute and executable. Run the binary manually in a terminal to confirm it starts without errors. Use 'npx @modelcontextprotocol/inspector /path/to/binary' to inspect the server's tool list before connecting to Claude.
Input schema validation errors at runtime
Foxy Contexts validates tool inputs against the schema you declare. Check that your tool's inputSchema matches the JSON structure your callback expects. The 'toolinput' package provides helpers for defining typed schemas that reduce mismatches.
Frequently Asked Questions about Foxy Contexts
What is Foxy Contexts?
Foxy Contexts is a Model Context Protocol (MCP) server that foxy contexts is a library for building context servers supporting model context protocol It connects AI assistants to external tools and data sources through a standardized interface.
How do I install Foxy Contexts?
Follow the installation instructions on the Foxy Contexts GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.
Which AI clients work with Foxy Contexts?
Foxy Contexts works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.
Is Foxy Contexts free to use?
Yes, Foxy Contexts is open source and available under the MIT license. You can use it freely in both personal and commercial projects.
Foxy Contexts Alternatives — Similar Developer Tools Servers
Looking for alternatives to Foxy Contexts? Here are other popular developer tools servers you can use with Claude, Cursor, and VS Code.
Ecc
★ 188.2kThe agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.
Javaguide
★ 155.8kJava 面试 & 后端通用面试指南,覆盖计算机基础、数据库、分布式、高并发、系统设计与 AI 应用开发
Gemini CLI
★ 104.5kA secure MCP server that wraps the Google Gemini CLI, allowing clients to query Gemini models using local OAuth sessions without requiring an API key. It provides tools for model interaction and diagnostics with built-in protection against command in
Awesome MCP Servers
★ 87.3k⭐ Curated list of Model Context Protocol (MCP) servers - tools that extend Claude Desktop, Cursor, Windsurf, and other MCP clients with custom capabilities.
MCP Servers
★ 86.0kModel Context Protocol Servers
CC Switch
★ 77.5kA cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Gemini CLI & Hermes Agent. Only official website: ccswitch.io
Browse More Developer Tools MCP Servers
Explore all developer tools servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.
Set Up Foxy Contexts in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
Ready to use Foxy Contexts?
Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.