UNPKG

@cyanheads/jinaai-mcp-server

Version:

A Model Context Protocol (MCP) server that provides intelligent web reading capabilities using the Jina AI Reader API. It extracts clean, LLM-ready content from any URL.

27 lines 1.18 kB
/** * @fileoverview Hono middleware for handling MCP transport logic. * This middleware encapsulates the logic for processing MCP requests, * delegating to the appropriate transport manager, and preparing the * response for Hono to send. * @module src/mcp-server/transports/http/mcpTransportMiddleware */ import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js"; import { MiddlewareHandler } from "hono"; import { TransportManager, TransportResponse } from "../core/transportTypes.js"; import { HonoNodeBindings } from "./httpTypes.js"; /** * Creates a Hono middleware for handling MCP POST requests. * @param transportManager - The main transport manager (usually stateful). * @param createServerInstanceFn - Function to create an McpServer instance. * @returns A Hono middleware function. */ type McpMiddlewareEnv = { Variables: { mcpResponse: TransportResponse; }; }; export declare const mcpTransportMiddleware: (transportManager: TransportManager, createServerInstanceFn: () => Promise<McpServer>) => MiddlewareHandler<McpMiddlewareEnv & { Bindings: HonoNodeBindings; }>; export {}; //# sourceMappingURL=mcpTransportMiddleware.d.ts.map