@pairdraw/mcp 0.19.1 → 0.19.2

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.
package/dist/server.mjs CHANGED
@@ -1,2 +1,2 @@
1
- import { l as fail, n as startServer, o as MCP_AGENT_KINDS, s as registerTools, t as MCP_VERSION, u as ok } from "./server-B12lqdzN.mjs";
1
+ import { l as fail, n as startServer, o as MCP_AGENT_KINDS, s as registerTools, t as MCP_VERSION, u as ok } from "./server-CC9cdo1E.mjs";
2
2
  export { MCP_AGENT_KINDS, MCP_VERSION, fail, ok, registerTools, startServer };
package/dist/stdio.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import "./rolldown-runtime-ClRpJifh.mjs";
3
- import { c as registerSkill, r as createServerInstructions, s as registerTools, t as MCP_VERSION } from "./server-B12lqdzN.mjs";
3
+ import { c as registerSkill, r as createServerInstructions, s as registerTools, t as MCP_VERSION } from "./server-CC9cdo1E.mjs";
4
4
  import { a as getSocketPath, o as platformHasUnixSockets } from "./paths-BpcXnrbP.mjs";
5
5
  import { t as resolveMCPRoot } from "./root-BzmoiT2g.mjs";
6
6
  import { r as parseDisabledTools } from "./policy-3SjGqzs8.mjs";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pairdraw/mcp",
3
- "version": "0.19.1",
3
+ "version": "0.19.2",
4
4
  "license": "MIT",
5
5
  "files": [
6
6
  "dist",
@@ -15,7 +15,7 @@
15
15
  "dependencies": {
16
16
  "@hono/node-server": "^1.19.17",
17
17
  "@modelcontextprotocol/server": "^2.0.0",
18
- "@pairdraw/core": "^0.19.1",
18
+ "@pairdraw/core": "^0.19.2",
19
19
  "@valibot/to-json-schema": "^1.8.0",
20
20
  "es-toolkit": "^1.52.0",
21
21
  "hono": "^4.13.13",
package/src/server.ts CHANGED
@@ -146,7 +146,11 @@ function buildServerContext(options: ServerOptions) {
146
146
  options.authToken === undefined ? randomBytes(16).toString('hex') : options.authToken
147
147
  const corsOrigin = options.corsOrigin ?? null
148
148
  const withTcp = options.withTcp ?? false
149
- const origins = admittedOrigins(corsOrigin, { withAgents: options.agents !== undefined })
149
+ // A `*` origin lets any website reach the server; it may only do so while a token still guards
150
+ // the routes, so an unauthenticated server ignores it exactly as the agent bridge does.
151
+ const origins = admittedOrigins(corsOrigin, { withAgents: options.agents !== undefined }).filter(
152
+ (origin) => authToken !== null || origin !== '*'
153
+ )
150
154
  // The bridge learns the TCP port once the listener is up; agents may reach only that `/mcp`.
151
155
  const listening = { port: 0 }
152
156
  const bridgeOptions = {