Skip to content

Add Typescript support for Claude/OpenAI MCP server tools#3443

Merged
juliusgeo merged 32 commits intomainfrom
claude_mcp_ts
Apr 28, 2026
Merged

Add Typescript support for Claude/OpenAI MCP server tools#3443
juliusgeo merged 32 commits intomainfrom
claude_mcp_ts

Conversation

@juliusgeo
Copy link
Copy Markdown
Contributor

@juliusgeo juliusgeo commented Apr 1, 2026

Description

Adds support for the Claude/OpenAI MCP servers. Also bumps Zod dependency to require 3.25.0+ (compatible with Zod 4+), but requires Zod 4 for the agent functions. If you try to use Zod 3 you will get:

Error: To use Hatchet's Claude agent SDK integration, Zod v4 must be installed. Please upgrade: npm install zod@^4.0.0

Fixes # (issue)

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • Documentation change (pure documentation change)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Refactor (non-breaking changes to code which doesn't change any behaviour)
  • CI (any automation pipeline changes)
  • Chore (changes which are not directly related to any business logic)
  • Test changes (add, refactor, improve or change a test)
  • This change requires a documentation update

What's Changed

  • Add a list of tasks or features here...

@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 1, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
hatchet-docs Ready Ready Preview, Comment Apr 28, 2026 10:42pm

Request Review

promptless-for-oss pushed a commit to Promptless/oss-contrib-hatchet-dev-hatchet that referenced this pull request Apr 1, 2026
Updates the MCP tools documentation to include TypeScript SDK support
introduced in PR hatchet-dev#3443:
- Add tabbed installation instructions for Python and TypeScript
- Add TypeScript API reference for mcpTool() method
- Update usage overview with TypeScript-specific workflow
- Add mcpTool() method documentation to Runnables.mdx for both
  TaskWorkflowDeclaration and WorkflowDeclaration
@promptless-for-oss
Copy link
Copy Markdown

Promptless prepared a documentation update related to this change.

Triggered by this PR

Added documentation for the new mcpTool() method that allows Hatchet workflows to be converted into MCP tools for use with Claude Agent SDK and other AI agent frameworks. Updates include TypeScript SDK installation instructions, API reference, and usage examples in both the MCP tools guide and the Runnables reference.

Review at https://app.gopromptless.ai/suggestions/9c18c163-0617-40df-a4e8-f78254fc35c9

Comment thread sdks/typescript/src/v1/agent/claude.ts Outdated
);
}
// Check Zod v4 is installed before using any v4-specific schema APIs.
if (!('_zod' in z.string())) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: one message for all dependencies? kind of annoying if you hit this twice

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, yeah let me see if I can integrate these.

try {
require.resolve('@openai/agents');
} catch {
throw new Error(
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same nit as above

Comment thread sdks/typescript/src/v1/agent/openai.ts Outdated
name: runnable.name,
description: description,
// eslint-disable-next-line @typescript-eslint/no-explicit-any
parameters: (inputValidatorV4 as any).toJSONSchema(),
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is this as any needed?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, don't need it--fixed!

Copy link
Copy Markdown
Contributor

@grutt grutt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

great job! minor nits that can optionally be addressed

@juliusgeo juliusgeo merged commit 7fa9c7d into main Apr 28, 2026
56 checks passed
@juliusgeo juliusgeo deleted the claude_mcp_ts branch April 28, 2026 22:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants