Skip to content
 
 

Repository files navigation

Effect MCP

An implementation of the Model Context Protocol (MCP) using the Effect library.

Overview

Effect MCP provides a TypeScript implementation of the Model Context Protocol, which enables AI models to interact with external tools and resources. This implementation leverages the Effect library for robust, type-safe, and functional programming patterns.

Features

  • JSON-RPC based communication
  • Type-safe API using Effect and Schema
  • Stdio transport implementation
  • Tool registration and execution
  • Integration with Effect's AI toolkit

Installation

pnpm install

Usage

See the examples/basic directory for a simple example of how to use the MCP server.

Project Structure

  • packages/client: Core MCP client implementation
  • packages/server: Core MCP server implementation
  • examples/client: Basic examples of using the MCP server compared with vanilla TS MCP client
  • examples/server: Basic examples of using the MCP server compared with vanilla TS MCP server

⚠️ Active Development

This project is in active development and is not yet ready for production use. Many features are still being implemented.

Also MCP itself is still early and under development. There is currently a somewhat implicit 1:1 relationship between client and server. In my opinion this is likely to change and will require much refactoring. Hopefully this wont impact the surface API too much.

Implementation Checklist

MCP Server

  • Basic JSON-RPC message handling
  • Stdio transport implementation
  • SSE transport implementation
  • Server initialization
  • Ping implementation
  • Add comprehensive error handling
  • Add tests
  • Ensure error codes match Spec

MCP Client -> Server Requests

  • Ping
  • Initialize
  • Complete
  • Set Log Level
  • Get Prompt
  • List Prompts
  • List Resources
  • List Resource Templates
  • Read Resource
  • Notification Subscribe
  • Notification Unsubscribe
  • List Tools
  • Call Tool

MCP Server -> Client Requests

  • Ping
  • Create Message
  • List Roots

MCP Client

  • Client Stdio Transport
  • Client SSE Transport

License

MIT

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages