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

@modjules/mcp-remote

v0.2.0-beta.0

Published

HTTP/SSE adapter for running Modjules MCP servers on remote platforms (Render, Vercel, Hono)

Readme

@modjules/mcp-remote

This package provides an HTTP/SSE adapter for running Modjules MCP (Model Context Protocol) servers on various remote platforms like Vercel, Render, or any environment that supports Hono.

It allows you to expose Modjules tools and sessions securely over the web, enabling rich, interactive experiences in your applications.

Installation

npm install @modjules/mcp-remote hono

Usage

The primary export is createMcpHandler, a factory function that creates a Hono application handler. You can use this handler directly with platforms that support Hono, or integrate it into an existing Hono application.

Basic Example

Here's a simple example of how to create an MCP server and expose it using Hono.

// src/index.ts
import { Hono } from 'hono';
import { createMcpHandler } from '@modjules/mcp-remote';

const app = new Hono();

const mcpHandler = createMcpHandler({
  name: 'my-remote-server',
  version: '1.0.0',
  tools: {
    // A simple tool that adds two numbers
    add: {
      schema: {
        a: z.number(),
        b: z.number(),
      },
      handler: async ({ a, b }) => {
        return a + b;
      },
    },
    // A tool with no arguments
    hello: async () => {
      return { message: 'Hello, world!' };
    },
  },
});

// Mount the MCP handler
app.route('/mcp', mcpHandler);

export default app;

Integrating with Modjules Sessions

You can connect your remote MCP server to a Modjules session to create powerful, stateful agents.

import { Hono } from 'hono';
import { createMcpHandler } from '@modjules/mcp-remote';
import { jules } from 'modjules';

const app = new Hono();

const mcpHandler = createMcpHandler({
  name: 'my-agent-server',
  version: '1.0.0',
  // Provide a function that returns a Modjules session
  session: async () => {
    return jules.session(); // Creates a new session
  },
});

app.route('/mcp', mcpHandler);

export default app;

When a session provider is configured, the handler automatically exposes an interact tool that allows clients to send prompts to the session.

API

createMcpHandler(config)

Creates a Hono application instance that handles MCP requests.

config: McpRemoteConfig

An object with the following properties:

  • name (string, required): The name of your MCP server.
  • version (string, required): The version of your server.
  • session (() => Promise, optional): An async function that returns a Modjules SessionClient instance. If provided, enables the built-in interact tool.
  • tools (Record<string, McpToolHandler | McpToolConfig>, optional): An object where keys are tool names and values define the tool's implementation.

Tool Configuration

A tool can be defined as a simple async handler function or as a configuration object:

  • handler (McpToolHandler, required): The async function that executes the tool's logic. It receives the tool arguments as an object.
  • schema (Record<string, z.ZodTypeAny>, optional): A Zod schema definition for validating the tool's input arguments. If not provided, no validation is performed.