npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@telorun/mcp-client

v0.4.0

Published

Telo MCP Client module — Model Context Protocol client resource kinds for Telo manifests.

Readme

MCP Client

Model Context Protocol (MCP) client resource kinds for Telo: Streamable HTTP and stdio transports, transport-agnostic tools/call and tools/list dispatch.

Why use this

  • Transport-agnostic dispatchMcp.ToolsCall and Mcp.ToolsList reference any concrete client; HTTP, stdio, and future transports are interchangeable.
  • Self-managed session lifecycleMcp.HttpClient handshakes lazily, caches Mcp-Session-Id, and re-handshakes transparently on session-invalid responses.
  • Pluggable session providers — supply MCP session IDs from secrets, SQL, Vault, or OIDC by declaring an Mcp.SessionProvider implementation; no controller code required.
  • Long-lived stdio childrenMcp.StdioClient spawns and supervises a child MCP server with a clean shutdown grace period.
  • Closed error contract — a stable, enumerated set of ERR_MCP_* codes for catches: blocks.

Kinds

| Kind | Purpose | | --- | --- | | Mcp.Client | Abstract JSON-RPC request contract every transport satisfies. | | Mcp.HttpClient | Streamable HTTP transport with lazy handshake, session caching, and DELETE on teardown. | | Mcp.StdioClient | Child-process stdio transport with spawn, handshake, and clean teardown. | | Mcp.SessionProvider | Abstract provider for externally-managed MCP session IDs (HTTP-only). | | Mcp.ToolsCall | Dispatches tools/call through a referenced Mcp.Client. | | Mcp.ToolsList | Dispatches tools/list through a referenced Mcp.Client. |

Example

kind: Telo.Application
metadata: { name: my-mcp-app, version: 1.0.0 }
imports:
  McpClient: std/[email protected]
  Run: std/[email protected]
targets: [ !ref GetWeather ]
secrets:
  MCP_TOKEN: { type: string }
---
kind: McpClient.HttpClient
metadata: { name: RemoteMcp }
url: https://mcp.example.com/mcp
headers:
  authorization: "Bearer ${{ secrets.MCP_TOKEN }}"
clientInfo: { name: my-mcp-app, version: 1.0.0 }
---
kind: McpClient.ToolsCall
metadata: { name: CallGetWeather }
client: !ref RemoteMcp
---
kind: Run.Sequence
metadata: { name: GetWeather }
steps:
  - name: Call
    inputs:
      name: get_weather
      arguments: { city: Atlantis }
    invoke: !ref CallGetWeather

Reference

Error Contract

Both Mcp.ToolsCall and Mcp.ToolsList surface a closed error union via InvokeErrors so catches: blocks have a stable code surface:

| Code | When | | --- | --- | | ERR_MCP_TRANSPORT | Network failure, non-2xx HTTP, unexpected Content-Type, child-process exit. | | ERR_MCP_PROTOCOL | Malformed JSON-RPC envelope (missing jsonrpc, neither result nor error). | | ERR_MCP_JSON_RPC_ERROR | Server returned a JSON-RPC error envelope (error.code, error.message). | | ERR_MCP_TOOL_ERROR | Server returned isError: true in the success envelope (soft tool failure). | | ERR_MCP_SESSION_INVALID | HTTP-only: server rejected the session after the client's internal retry. |

A response with isError: true is converted to ERR_MCP_TOOL_ERROR so the success path never observes it — the outputType of Mcp.ToolsCall does not include an isError field.

Out of Scope for v1

  • resources/read, prompts/get, sampling, server notifications, roots — v1 covers tools/call and tools/list.
  • Per-tool typing of structuredContent (open shape in v1).
  • Dynamic / rotating header values (future headerProvider: slot).
  • Bidirectional / long-lived subscriptions exposed as kernel-level abstractions.