effect-mcp-server

Build MCP servers with Effect using tools, resources, prompts, and stdio or HTTP transports.

1|Updated Aug 24, 2026
One-click install
npx skills add https://github.com/lambdasolver2/opencode-effect-harness --skill effect-mcp-server-lambdasolver2
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: effect-mcp-server
Source: https://github.com/lambdasolver2/opencode-effect-harness/tree/main/packages/module-typescript/assets/skills/effect-mcp-server
Command: npx skills add https://github.com/lambdasolver2/opencode-effect-harness --skill effect-mcp-server-lambdasolver2

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires effect, @effect/platform-node.

What problem does it solve? Building a Model Context Protocol server requires correctly wiring tools, resources, prompts, transports, and logging, and mistakes like logging to stdout over stdio silently break the protocol. This Skill provides the canonical Effect v4 patterns for assembling a working MCP server with McpServer, McpSchema, Tool, and Toolkit. ## Core Features & Use Cases - Tool and Toolkit Definition: Define tools with Tool.make and Effect Schema parameters, group them with Toolkit.make, and register implementations via McpServer.toolkit with Toolkit.toLayer. - Resources and Prompts: Expose static and parameterized resources using McpSchema.param URI templates, plus prompt templates with completion support. - Transport Configuration: Run servers over stdio (with mandatory stderr logging) or HTTP with session handling, and use elicitation and client capability checks. - Use Case: You want Claude Desktop to call a calculator and greeting tool from your own server. Follow the complete stdio example to define the tools, merge the layers, provide NodeStdio, and launch with Layer.launch. ## Quick Start Ask the AI to build an Effect MCP server exposing a greeting tool over stdio transport using McpServer and Toolkit.

Frequently Asked Questions about effect-mcp-server

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I build an MCP server with Effect in TypeScript?

Define tools with Tool.make and Schema parameters, group them with Toolkit.make, then register them via McpServer.toolkit(tk).pipe(Layer.provideMerge(tk.toLayer({...}))). Merge resources and prompts with Layer.mergeAll, provide a transport layer, and launch with Layer.launch.

How do I add tools to an Effect MCP server?

Create each tool with Tool.make specifying name, description, parameters, and success schema, then combine them with Toolkit.make. Provide implementations through Toolkit.toLayer and merge into McpServer.toolkit; multiple toolkits are merged with Layer.mergeAll.

Why is my stdio MCP server not responding to the client?

Any stdout output corrupts the stdio protocol stream. Route all logging to stderr using Logger.consolePretty({ stderr: true }) or Logger.LogToStderr, and ensure NodeStdio.layer is provided to satisfy the Stdio requirement.

Does Effect MCP server support HTTP transport?

Yes, McpServer.layerHttp serves MCP over HTTP with SSE at a configurable path and requires HttpRouter in context. Clients must retain the Mcp-Session-Id from initialization, since requests without a valid session id return 404.

How do I create parameterized MCP resources in Effect?

Use the tagged template form McpServer.resource`file://items/${idParam}` with McpSchema.param('id', Schema.NumberFromString). The content handler receives the URI plus decoded parameters, and completion supplies auto-complete values per parameter.