Skip to content
PluginStats

toolport weekly downloads statistics

By assistant-ui (6 listings) · npm · AI SDKs

Define a toolkit once, expose it as a CLI, MCP server, WebMCP, AI SDK tools, and a typed API.

View on npm Fresh · Dec 6, 2026

toolport has 3,381 recorded weekly downloads on npm, ranking #1690 of 3,247 tracked listings.

Weekly downloads
3,381
Official API · Dec 5, 2026
7-day growth
—
Insufficient history
30-day growth
—
Insufficient history
90-day growth
—
Insufficient history
Rank
#1690
Among tracked npm listings

About toolport

toolport

Define a toolkit once. Serve it as a CLI, an MCP server, WebMCP, AI SDK tools, or a typed JavaScript or Python API.

import { defineToolkit, tool } from "toolport";

export const weather = defineToolkit({
  name: "weather",
  description: "Weather lookups.",
  tools: {
    getWeather: tool({
      description: "Get the current weather for a location.",
      parameters: {
        type: "object",
        properties: {
          location: { type: "string", description: "City name." },
          unit: { type: "string", enum: ["celsius", "fahrenheit"] },
        },
        required: ["location"],
      },
      execute: async ({ location, unit }) =>
        fetchWeather(location, unit ?? "celsius"),
    }),
  },
});

The key is the tool's name: 1-128 letters, digits, _, - or ., as MCP requires (defineToolkit throws on anything else). Parameters are plain JSON Schema: tool types execute's arguments from the literal, and a tool without arguments omits parameters. Any schema library that emits JSON Schema works (z.toJSONSchema(schema) for zod, or toJsonSchema(schema) from toolport for any Standard JSON Schema library).

Results

execute returns any JSON value. The MCP server sends a string as text, an object as text plus structuredContent, and anything else as JSON text. To send a result of your own, such as text beside JSON, warnings, or an error with data, return toolResult():

import { tool, toolResult } from "toolport";

const show = tool({
  description: "Show a task.",
  parameters: {
    type: "object",
    properties: { key: { type: "string" } },
    required: ["key"],
  },
  execute: async ({ key }) => {
    const task = await loadTask(key);
    return toolResult({
      content: [{ type: "text", text: `${task.key}: ${task.title}` }],
      structuredContent: task,
      _meta: { "toolport/warnings": ["2 steps are overdue"] },
    });
  },
});
  • MCP clients get the result as given.
  • The CLI prints content (or structuredContent with --json) and each toolport/warnings entry on stderr. With isError: true it prints structuredContent on stdout, the text on stderr, and exits with the toolport/error code (1 by default).
  • callTool, toApi, toAiSdkTools and WebMCP resolve to structuredContent, else the text of a single text block, else the blocks. With isError: true they throw a ToolError with the text and its toolport/error code when that is a ToolErrorCode other than unknown_tool, else execution_failed.
  • content is an array of MCP content blocks; structuredContent is an object. toolResult throws on anything else.
  • JSON that isn't an object, such as a list beside its text, goes in _meta["toolport/json"]; the CLI's --json, callTool and the other adapters resolve to it.

CLI

Install toolport in your project (Node.js 20.19+):

npm install toolport

Run a toolkit file directly, without writing an entry-point script:

npx toolport ./weather.ts                    # commands
npx toolport ./weather.ts --help --json      # tools as JSON
npx toolport ./weather.ts getWeather --help
npx toolport ./weather.ts getWeather --location Berlin --unit fahrenheit
npx toolport ./weather.ts getWeather --input '{"location":"Berlin"}'

The executable loads TypeScript and JavaScript files with tsx, including local imports and top-level await in ESM modules. Export a toolkit object as the default export, or as a single named export (like weather above). If there are multiple toolkit exports, the default wins; use --export to select another:

npx toolport --export weather ./toolkits.ts --help

Runner options go before the tool name; everything after it is passed to the tool. Toolkit files run with your process's permissions and environment, so only load files you trust. Console logs are sent to stderr to keep stdout reserved for results and MCP messages. An optional toolkit close() method is awaited after a CLI call, on stdio EOF, or on HTTP shutdown.

You can still build a dedicated executable with the programmatic adapter:

#!/usr/bin/env node
import { serveCli } from "toolport/cli";
import { weather } from "./weather";

serveCli(weather);
weather                                   # commands
weather getWeather --help                 # flags derived from the schema
weather getWeather --location Berlin --unit fahrenheit
One CLI over several MCP servers

serveCli also takes MCP servers (Streamable HTTP, through the official MCP client, 2026-07-28 or the 2025 handshake) and local toolkits, each under its own command word:

serveCli({
  name: "mycli",
  servers: { ttt: "https://ttt.example.com/mcp", board: { url, headers } },
  local: [weather],
});
mycli                                     # servers and toolkits
mycli board                               # board's commands
mycli board step done AUI-1 2 --result ok # calls the tool "step.done"
mycli board task show AUI-1 --json --fields title,steps
mycli weather getWeather --location Berlin

root: true on one server (board: { url, root: true }) puts its tools at the top level, beside the other commands: mycli task show AUI-1, and mycli login signs in to it. context: () => ({ agent, cwd }) adds fields to every call's toolport/context.

Before any call, the CLI checks required arguments, top-level types and enums, and exits 2 naming the flag. JSON prints indented on a terminal and as one compact line otherwise.

The commands come from standard MCP tool fields:…

Description from the npm listing.

  • tools
  • toolkit
  • cli
  • mcp
  • webmcp
  • agents
  • ai-sdk
  • langchain
  • openapi

README badge

Show your rank in a README or on your website. The badge updates automatically.

Charts

Images: 30d · 1y · all time · 1600×900 dark

Adoption over time

toolport weekly downloads on npm, last 90 days: 3,381 weekly downloads as of Dec 5, 2026.toolportWeekly downloads on npm · Last 90 days3,381downloads / week3K3.1K3.2K3.3K3.4K3.5K3.6K3.7K3.8KSep 6Sep 21Oct 6Oct 21Nov 5Nov 20Dec 5downloads / weekDec 5, 2026 – Dec 5, 2026 · 1 observations · Updated Dec 5, 2026pluginstats.com
toolport weekly downloads on npm, last 90 days: 3,381 weekly downloads as of Dec 5, 2026.

7/30/90-day growth

toolport weekly downloads growth on npm: 7-day growth unavailable, 30-day growth unavailable, 90-day growth unavailable.toolportWeekly downloads growth on npm3,381downloads / week now7-day growthinsufficient historyInsufficient history30-day growthinsufficient historyInsufficient history90-day growthinsufficient historyInsufficient historyGrowth vs. nearest observation to each baseline date · Updated Dec 5, 2026pluginstats.com
toolport weekly downloads growth on npm: 7-day growth unavailable, 30-day growth unavailable, 90-day growth unavailable.

Ranking history

toolport npm ranking history: currently #1690 (by weekly downloads).toolportnpm ranking · by weekly downloads · Last 90 days#1690current rank#1688#1689#1690#1691#1692Sep 7Sep 22Oct 7Oct 22Nov 6Nov 21Dec 6rankDec 6, 2026 – Dec 6, 2026 · 1 observations · Updated Dec 5, 2026pluginstats.com
toolport npm ranking history: currently #1690 (by weekly downloads).

Listing placement

All npm3,247 listings · 163 pages · 1,083 shown · page 85, #10 (overall #1,690)
All npm: every listing in weekly downloads order

Listing placement

AI SDKs378 listings · 19 pages · page 8, #6 (overall #146)
AI SDKs: every listing in weekly downloads order

Filled points are observed values; hollow points come from Internet Archive snapshots of the listing page. Dashed segments span periods with no observations — values between points are not interpolated.

Each band is one page of 20. Weekly downloads on a linear scale. Placement is projected from weekly downloads, so it can differ from the marketplace's own sort order. Hover a dot to see the listing.

Recent observations

Full history (1)
Recent weekly downloads observations for toolport
Date (UTC)Weekly downloadsChange vs. previous
3,381—

Similar npm AI SDKs plugins

All 20 toolport alternatives

Data source

Weekly downloads (trailing 7 complete days) come from the official npm downloads API. Downloads include CI and mirrors and are not equivalent to installs or users. npm publishes no ratings.

Listing: https://www.npmjs.com/package/toolport. First seen Dec 6, 2026; last successful collection Dec 6, 2026. See the methodology.