@zenrows/mcp 1.1.0 → 1.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/http.js +10 -0
  2. package/package.json +1 -1
package/dist/http.js CHANGED
@@ -1,9 +1,19 @@
1
1
  import { Hono } from "hono";
2
+ import { cors } from "hono/cors";
2
3
  import { serve } from "@hono/node-server";
3
4
  import { WebStandardStreamableHTTPServerTransport } from "@modelcontextprotocol/sdk/server/webStandardStreamableHttp.js";
4
5
  import { createServer } from "./server.js";
5
6
  // ─── app ──────────────────────────────────────────────────────────────────────
6
7
  const app = new Hono();
8
+ // CORS — required for browser-side MCP clients (Claude.ai, Cursor web, etc.)
9
+ // All origins allowed: the API key is the auth mechanism, not the origin.
10
+ app.use(cors({
11
+ origin: "*",
12
+ allowMethods: ["GET", "POST", "OPTIONS"],
13
+ allowHeaders: ["Authorization", "Content-Type", "Accept", "Mcp-Session-Id"],
14
+ exposeHeaders: ["WWW-Authenticate", "Mcp-Session-Id"],
15
+ maxAge: 86_400,
16
+ }));
7
17
  function extractApiKey(req) {
8
18
  const auth = req.headers.get("authorization");
9
19
  if (auth) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zenrows/mcp",
3
- "version": "1.1.0",
3
+ "version": "1.1.1",
4
4
  "description": "ZenRows MCP server — Universal Scraper API for AI coding assistants",
5
5
  "type": "module",
6
6
  "bin": {