-
Notifications
You must be signed in to change notification settings - Fork 0
feat(mcp): add types and interfaces for MCP server #77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: p3-14/ui/shapes-render
Are you sure you want to change the base?
Conversation
c36b4d8 to
df2f41f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: df2f41f74a
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
df2f41f to
169e1af
Compare
62ebc0c to
0693864
Compare
0693864 to
885a6aa
Compare
169e1af to
378aebe
Compare
Greptile Summary
|
| Filename | Overview |
|---|---|
| packages/mcp/src/types.ts | New file establishing core type definitions for MCP server including tool/resource definitions, error handling, and server interface contracts |
| packages/mcp/package.json | New package configuration with modular exports structure and dependencies on MCP SDK and internal packages |
Confidence score: 4/5
- This PR is safe to merge with minimal risk as it only adds type definitions without runtime implementation
- Score reflects well-structured types that properly integrate with existing contracts, but includes complex generic signatures that warrant code review
- Pay close attention to
packages/mcp/src/types.tsfor the handler integration patterns and error taxonomy alignment
Sequence Diagram
sequenceDiagram
participant User
participant Client as "MCP Client"
participant Server as "McpServer"
participant Tool as "ToolDefinition"
participant Handler as "Tool Handler"
User->>Client: "Request tool execution"
Client->>Server: "invokeTool(name, input)"
Server->>Server: "Validate input against schema"
Server->>Tool: "Find registered tool"
Server->>Handler: "handler(validatedInput, context)"
Handler->>Handler: "Process business logic"
Handler-->>Server: "Return Result<output, error>"
Server-->>Client: "Return tool execution result"
Client-->>User: "Present result"
885a6aa to
0246fb8
Compare
378aebe to
ac4a0b1
Compare
|
Addressed review feedback: added McpError coverage to ensure the package has tests and kept the entrypoint export in place. Submitted the update with gt. |
Add core type definitions for MCP server implementation: - ServerOptions: Configuration for server creation - Handler<I,O,E>: Generic handler function type - ToolDefinition/ResourceDefinition: MCP entity schemas - ServerContext: Request context with logger - McpError: TaggedError subclass for MCP failures Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
0246fb8 to
f86a139
Compare
ac4a0b1 to
d91d9f1
Compare
|
Restacked after downstack update (formatRelative test stabilization); no additional changes in this PR. |

Add core type definitions for MCP server implementation:
Co-Authored-By: Claude Opus 4.5 noreply@anthropic.com
Contributes to #46