
Security News
Axios Maintainer Confirms Social Engineering Attack Behind npm Compromise
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.
@modjules/mcp-remote
Advanced tools
HTTP/SSE adapter for running Modjules MCP servers on remote platforms (Render, Vercel, Hono)
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.
npm install @modjules/mcp-remote hono
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.
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;
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.
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.FAQs
HTTP/SSE adapter for running Modjules MCP servers on remote platforms (Render, Vercel, Hono)
We found that @modjules/mcp-remote demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.