Rescript
ReScript bindings for the public MCP TypeScript SDK split packages
Ask AI about Rescript
Powered by Claude · Grounded in docs
I know everything about Rescript. Ask me about installation, configuration, usage, or troubleshooting.
0/500
Reviews
Documentation
rescript-mcp
ReScript bindings for the split Model Context Protocol TypeScript SDK packages:
@modelcontextprotocol/client@modelcontextprotocol/server@modelcontextprotocol/node
The bindings stay close to the upstream SDK names and transport model, so the TypeScript MCP docs remain useful when working from ReScript.
Release Stage
This package is pre-alpha.
- current repo version line:
0.0.1-alpha.0 - the repo release workflow is in PR-only mode
- stable
latestpublication requires explicit owner approval after the package leaves pre-alpha - do not treat the current repo line as a stable production contract
Install
npm install rescript-mcp @modelcontextprotocol/client @modelcontextprotocol/server @modelcontextprotocol/node
Add the package to rescript.json:
{
"dependencies": ["rescript-mcp"]
}
Supported package line:
@modelcontextprotocol/client@2.0.0-alpha.2@modelcontextprotocol/server@2.0.0-alpha.2@modelcontextprotocol/node@2.0.0-alpha.2
Quick Start
let implementation = McpImplementation.make(~name="example-server", ~version="0.1.0")
let server = McpLowLevelServer.make(implementation)
let transport =
McpWebStandardStreamableHttpServerTransport.makeWithOptions(
McpWebStandardStreamableHttpServerTransportOptions.make(~enableJsonResponse=true, ()),
)
let _promise = server->McpLowLevelServer.connect(transport)
Package Guide
McpClientcovers client setup, connection, and request flowMcpLowLevelServerandMcpServercover low-level server wiring and higher-level server APIsMcpTool,McpPrompt,McpResource, andMcpResourceTemplatecover server authoring APIsMcp.Server.ExperimentalTasks,Mcp.Client.ExperimentalTasks, andMcp.Shared.Task*cover the installed experimental task flow, pluggable task stores, and task queuesMcpProtocoland related schema modules cover typed protocol request/result objects,Mcp.Protocol.JsonValue, notification params, and shared transport dataMcp.Shared.UriTemplateexposes the upstream URI template surface used by resource templates- transport modules cover stdio, Streamable HTTP, SSE, and web-standard server transports
- grouped re-exports also live under
Mcp
Published package subpaths:
rescript-mcprescript-mcp/authrescript-mcp/protocolrescript-mcp/corerescript-mcp/sharedrescript-mcp/serverrescript-mcp/clientrescript-mcp/transports
Upstream package references:
Examples:
Development
npm install
npm run build
npm test
npm pack --dry-run
Release
Releases are versioned with Changesets.
The current repo stays in pre-alpha PR-only mode. GitHub Actions may open version PRs through the repository workflow, and stable npm publication remains gated behind explicit owner approval:
