An implementation of the Model Context Protocol (MCP) using the
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.
- JSON-RPC based communication
- Type-safe API using Effect and Schema
- Stdio transport implementation
- Tool registration and execution
- Integration with Effect's AI toolkit
pnpm install
See the examples/basic
directory for a simple example of how to use the MCP server.
packages/client
: Core MCP client implementationpackages/server
: Core MCP server implementationexamples/client
: Basic examples of using the MCP server compared with vanilla TS MCP clientexamples/server
: Basic examples of using the MCP server compared with vanilla TS MCP server
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.
- 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
- 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
- Ping
- Create Message
- List Roots
- Client Stdio Transport
- Client SSE Transport
MIT