add Effect-native McpClient
Maintainers usually reply within 1 day
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 8/100
- Issue type
- Feature
- Clarity
- Needs clarification
- Activity status
- Active
- Tech stack
- typescript
- Domain
- api
Research direction
This is a large design-level feature, not a starter task. Before any code, read the linked open pull request #8862 and the existing McpServer implementation the issue refers to, to see what is already in flight. The issue proposes trimming the first deliverable to transports, legacy and modern protocols, and tool, prompt and resource discovery, but the maintainers have not agreed on that scope yet. Done means an agreed scope and design, not a patch.
Written by the indexing model from the issue text.
Description
What is the problem this feature would solve?
At the moment Effect only has an McpServer implementation which means we can only offer part of the stack. There are already a lot of effect harnesses that need to either use the @modelcontextprotocol sdk or roll their own version. Since Effect already has a lot of the Schema implementation setup, it would benefit greatly from being able to reuse to build out the McpClient as well.
What is the feature you are proposing to solve the problem?
Add an MCP client that lets Effect applications discover server capabilities, use tools, access prompts and resources, and handle interactive requests. The full requirement would cover both legacy and modern protocols over stdio and Streamable HTTP.
flowchart LR
Server[McpServer] <--> Client[McpClient]
Client --> Toolcall[Toolcall] --> Direct(Application workflow)
Client --> Toolkit[Toolkit] --> Model[LanguageModel] --> Agent(Agent workflow)
Client --> Prompt[Prompt] --> Direct
Client --> Resource[Resource] --> Direct
Client --> Subscription[Subscription] --> Direct
Tools
- Discover tools, preserving schemas, annotations, and metadata.
- Call a discovered tool and retain its complete result, including content, structured output, and isError.
- Decode structured output with a caller-provided Effect schema.
- Adapt discovered tools through the standard
ToolandToolkitAPIs.
Prompts
- List available prompts. Retrieve a prompt with its arguments.
- Preserve message roles, content, and metadata.
Resources
- List resources and resource templates. Read a resource by URI.
- Preserve text, binary content, MIME types, and metadata.
Subscriptions
- Observe tool, prompt, and resource list changes where the selected protocol supports them. Subscribe to resource updates where supported.
- Expose notifications through scoped streams with bounded buffering.
- Release subscriptions when their scope closes.
Elicitation
- Let applications supply Effect handlers for server requests for user input.
- Support form and URL elicitation where the selected revision permits them.
- Represent acceptance, rejection, and cancellation explicitly.
Keep it reasonably simple
Adding all this at once will be a complex and heavy PR so I would trim back the first deliverable to to just the transport layers, legacy/modern protocols, and tools / prompts / resource discovery. I think adding the subscription and elicitation in the first pass will complicate things with the lifecycle so should be addressed in a follow up.
- Dominant language
- TypeScript
- Stars
- 16.7k
- Forks
- 808
- Avg merge
- 10h 14m
- Merged PRs (30d)
- 518
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Effect-TS/effect
-
BrowserWorkerRunner: port finalizer throws when the worker global has no close() (Bun)Possibly taken @santiago-ramos-02 claimed this 11 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Effect-TS/effect#8635 · 3 comments ·
Maintainers usually reply within 1 day
-
Support {self: this} for fnUntracedMay be free again @ArjunCodess claimed this 23 days ago, and no pull request is open. Openenhancement
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
Effect-TS/effect#8101 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
Schema.isPowerOfPossibly taken @effect-bot claimed this 1 day ago. Openenhancement
Difficulty 3/5 1-2 days Newbie friendliness 35/100
Maintainers usually reply within 1 day
All issues in Effect-TS/effect
Similar issues
-
Bayern feature:Application ready web
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
digitalfabrik/entitlementcard#3176 ·
Maintainers usually reply within 7 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
NanmiCoder/cc-haha#1533 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
🐛 Bug: Calendar work items cannot be opened on mobilePossibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 1/5 Under an hour Newbie friendliness 75/100
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 92/100