Separate McpServer definition from implementation
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 25/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- typescript
- Lĩnh vực
- api
Hướng nghiên cứu
Start by reading the McpServer and McpClient modules and the Rpc definition/implementation split they are built on, then read the linked comment in #8912. The request is for McpServer.make(...) to describe the server shape while McpClient.make(MyMcpServer) infers tools, resources and prompts. Done means an agreed API direction and a refactor separating definition from handlers; no files or tests are named, so this is design work first.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
What is the problem this feature would solve?
This came up when looking at sharing the
McpSchematypes across theMcpServerandMcpClientand I was thinking how nice of a DX it would be to have a similar experience as HttpApi and Rpc where the server definition could be used to already infer the client shape. I did a bit of digging and this is certainly a bit of work to refactor how the server handers are currently structured, but it shouldnt be too hard to allow theMcpServerto be shared in a monorepo?export class MyMcpServer extends McpServer.make( Tool.make("tick", { parameters: Schema.Struct({ arg: Schema.String, }), success: Schema.String, failure: Schema.String }), ) {} // ┏━ Effect.Effect<{...}, McpClient.McpClientError, McpClient> const workflow = Effect.gen(function*() { const client = yield* McpClient.make(MyMcpServer) // ┏━ Tool.Tool<string, string> const tick = yield* client.tools.tick({arg:"hello"}) // ┏━ string const r = yield* tick; yield* tick; yield* tick; })This isn't something I've seen possible with other SDKs but would open up a "fullstack MCP architecture" and improve the DX for application workflows not reliant on LLMs and json schema.
Originally posted by @lloydrichards in #8912
What is the feature you are proposing to solve the problem?
As it says in the original comment, the idea would be to have McpServer / McpClient to follow the same pattern of shape definition followed by implementation details so the server can be shared with the client to get typesafe completion and access to tools, resources and prompts.
Since McpServer is already built on Rpc this shouldnt be too difficult but would be good to have some discussion on this direction and what would feel right for the API.
What alternatives have you considered?
Right now, the McpClient needs a lot of manual mapping and calling to find what it needs which is fine if you're looking at both implementation but maybe for larger projects it doesn't feel like a very integrated experience like many of the other higher level Effect APIs feel (HttpAPI, RPC)
- Ngôn ngữ chính
- TypeScript
- Star
- 16.7k
- Fork
- 808
- Merge trung bình
- 21 giờ 22 phút
- Pull request đã merge (30 ngày)
- 486
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của Effect-TS/effect
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
`@effect/ui-native` (Effect-TS/ui): `kit/VirtualList` `list` part widens `R` to `any`, poisoning enclosing componentsCó thể đã có người làm @effect-bot đã nhận hôm nay. Đang mở
Effect-TS/effect#11097 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
`@effect/ui-native` (Effect-TS/ui): Controlled `input` rejected-edit restore never calls `host.commit()`Có thể đã có người làm @effect-bot đã nhận hôm nay. Đang mở
Effect-TS/effect#11096 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của Effect-TS/effect
Issue tương tự
-
check:failed streams:edit
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
iptv-org/iptv#60585 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 67/100
Maintainer thường phản hồi trong vòng 1 ngày
-
[Bug]: Critical path skips a child span that ends exactly when the next one startsCó thể đã có người làm @Piyush4801 đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
jaegertracing/jaeger-ui#4865 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 90/100
anthropics/claude-code#112972 ·
-
Type: Improvement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
Maintainer thường phản hồi trong vòng 1 ngày