MCP ExplorerExplorer

Sqirvy Mcp

@dmh2000on 9 months ago
2 MIT
FreeCommunity
AI Systems
An Model Context Protocol framework for Golang

Overview

What is Sqirvy Mcp

sqirvy-mcp is a Go implementation of the Model Context Protocol (MCP), designed to facilitate communication between AI models/clients and backend servers/tools.

Use cases

Use cases for sqirvy-mcp include building AI-driven applications that require context-aware interactions, integrating various AI models with backend tools, and developing systems that need to handle multiple types of requests efficiently.

How to use

To use sqirvy-mcp, developers can implement the provided core library in their applications, utilizing the example MCP server for guidance on handling standard MCP requests over standard I/O.

Key features

Key features include a core library for MCP, an example server implementation, support for standard MCP requests, and future plans for additional transport protocols such as Server-Sent Events (SSE).

Where to use

sqirvy-mcp can be used in AI development environments where communication between AI models and backend services is required, such as in chatbot frameworks, AI research, and tool integration.

Content

Sqirvy MCP - Model Context Protocol Implementation

This repository contains a Go implementation of the Model Context Protocol (MCP), designed to facilitate communication between AI models/clients and backend servers/tools. It provides both a core library for the protocol itself and an example server implementation.

Overview

The Model Context Protocol (MCP) defines a standard way for AI clients (like large language models or specialized agents) to interact with servers that provide context, tools, or other resources. This project aims to provide robust and easy-to-use Go packages for building MCP-compliant clients and servers.

  • Notes
    • The implementation of MCP prompts, resources and tools are hard coded example placeholders. The next update will add methods to be more convenient for adding real functionality.
    • This implementation currently uses the STDIO transport protocol. Future updates will support the server side event (SSE) protocol also.

Project Structure

The project is organized into the following main directories:

  • cmd/: Contains executable applications.
    • cmd/mcp-server/: An example MCP server implementation demonstrating how to use the pkg/mcp and pkg/transport packages. It handles standard MCP requests like initialize, ping, tools/list, resources/read, etc., over standard I/O. See cmd/mcp-server/README.md for details.
  • pkg/: Contains reusable library packages.
    • pkg/mcp/: The core package implementing the MCP specification. It defines Go types for all MCP messages (requests, responses, notifications, errors) and provides functions for marshaling and unmarshaling these messages to/from JSON. See pkg/mcp/README.md for details.
      It includes type definitions for all definitions in the official MCP schema specification. That file is included in pkg/mcp/schema.json.

    • pkg/transport/: Provides an abstraction layer for sending and receiving MCP messages over different communication channels, primarily focusing on standard I/O (io.Reader/io.Writer). See pkg/transport/README.md for details.

    • pkg/utils/: Contains general utility functions used across the project, currently focused on providing a flexible, level-based logger. See pkg/utils/README.md for details.

Getting Started

  1. Build the Server:

    make -C cmd build
    
  2. Run the Server:
    Navigate to the cmd/bin directory and use the provided script:

    cd cmd/bin
    ./run.sh
    

    This script runs the mcp-server executable, which will listen for MCP messages on standard input and send responses to standard output. You can interact with it using an MCP client or tool like mcp-inspector.

  3. Run Tests:
    To run tests for all packages:

    make test
    

    Or for a specific package:

    go test ./pkg/mcp/...
    go test ./pkg/transport/...
    go test ./pkg/utils/...
    

Tools

No tools

Comments

Recommend MCP Servers

View All MCP Servers