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

@flink-app/mcp-plugin

v2.0.0-alpha.121

Published

Flink plugin that exposes Flink AI tools over MCP (Model Context Protocol) via Streamable HTTP

Readme

@flink-app/mcp-plugin

Expose Flink AI tools as an MCP server so MCP clients — Claude Code, Claude Desktop, Cursor, custom agents — can call them over HTTP.

  • Uses the Streamable HTTP transport (stateless, load-balancer friendly), mounted on the Flink app's own Express server.
  • Tools are opt-in per tool via mcp: true.
  • Every call runs inside Flink's request context: the authenticated user and permissions flow into tools exactly as for agents, and the tool's declarative permissions are enforced.

Install

pnpm add @flink-app/mcp-plugin

Usage

import { FlinkApp } from "@flink-app/flink";
import { mcpPlugin } from "@flink-app/mcp-plugin";

const app = await new FlinkApp<AppCtx>({
    name: "My app",
    auth: jwtAuthPlugin({ ... }),
    plugins: [
        mcpPlugin({
            instructions: "Tools for looking up cars in the demo inventory.",
        }),
    ],
}).start();

Mark the tools you want to expose:

export const Tool: FlinkToolProps = {
    id: "search-cars-by-brand",
    description: "Search for cars by brand name.",
    inputSchema: z.object({ brand: z.string() }),
    permissions: ["car:read"],
    mcp: true, // 👈 visible over MCP
};

Tools without mcp: true stay internal to your agents.

Connecting from Claude Code

claude mcp add --transport http my-flink-app https://api.example.com/mcp \
  --header "Authorization: Bearer <token>"

Options

| Option | Default | Description | | -------------- | ----------------------- | --------------------------------------------------------------------------------------------- | | path | /mcp | Endpoint path. | | name | app name | Server name reported to clients. | | version | 1.0.0 | Server version reported to clients. | | instructions | — | Short description sent to clients on initialize, shown to the model with the tool list. | | auth | app auth plugin | See Authentication. | | filter | tool.mcp === true | Custom rule for which tools to expose. Replaces the default. | | debug | false | Log each tool call. |

Authentication

| auth value | Behaviour | | -------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | | omitted | Uses the app's auth plugin (authenticateRequest with no required permissions — a valid token is enough). Without an auth plugin the endpoint is open and a warning is logged. | | { permissions: [...] } | Uses the app's auth plugin and requires these permissions to reach the endpoint at all. | | false | Explicitly open, no warning. | | async (req, app) => ... | Custom. Return { user, permissions }, false (401), or a FlinkResponse to shape the rejection. |

Rejected requests get a 401 with WWW-Authenticate: Bearer (or the status of the returned FlinkResponse). Per-tool permissions are always enforced on top, using the permissions resolved by authentication.

How tool results map to MCP

| Flink ToolResult | MCP CallToolResult | | ------------------------------------- | ------------------------------------------------------------------------ | | { success: true, data: object } | content: [text(JSON)] + structuredContent: data | | { success: true, data: primitive } | content: [text(data)] | | { success: false, error, code } | isError: true, content: [text("CODE: error")] | | thrown Flink error (e.g. forbidden) | isError: true, content: [text("PERMISSION_DENIED: ...")] |

Input schemas come from inputSchema (Zod 4), inputJsonSchema, or the compiler-generated schema — same priority as for agents. outputSchema is advertised when it describes an object.

Plugin context

ctx.plugins.mcp.listTools(); // McpToolDefinition[] currently exposed
ctx.plugins.mcp.path;        // "/mcp"

Notes

  • Stateless transport: GET/DELETE on the endpoint return 405 (no sessions, no server-initiated notifications). This is what Claude Code and other current clients expect.
  • Tool descriptions become the model's only documentation — make them explicit about arguments and side effects.
  • Long-running tools must finish within the client's request timeout.