bowmark-mcp 1.0.2 → 2.0.0
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/README.md +7 -5
- package/dist/bridge.js +3 -3
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
# bowmark-mcp — Bowmark MCP over stdio (Node)
|
|
2
2
|
|
|
3
|
-
Bowmark
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
Bowmark turns the interaction-gated web into a **callable function library**.
|
|
4
|
+
An agent reads the library (`get_library`), writes a short JavaScript script
|
|
5
|
+
against it, and sends it to `run` — Bowmark executes it on the live sites in a
|
|
6
|
+
sandbox and hands back the result. The canonical server is hosted, streamable
|
|
7
|
+
HTTP, no auth required: `https://api.bowmark.ai/mcp`.
|
|
6
8
|
|
|
7
9
|
This package is a **thin stdio bridge** to that hosted server, for MCP hosts
|
|
8
10
|
whose client only speaks stdio, in Node-flavored environments. Tool schemas,
|
|
@@ -33,13 +35,13 @@ If your host speaks streamable HTTP, skip this bridge and connect directly to
|
|
|
33
35
|
| Var | Meaning |
|
|
34
36
|
|---|---|
|
|
35
37
|
| `BOWMARK_MCP_URL` | Target MCP URL. Default `https://api.bowmark.ai/mcp?s=n` (`?s=n` attributes the install to the npm bridge). Point at `http://localhost:3001/mcp` for a local Bowmark API. |
|
|
36
|
-
| `BOWMARK_API_KEY` | Optional. Forwarded as `X-Bowmark-Key`; a free key (bowmark.ai dashboard)
|
|
38
|
+
| `BOWMARK_API_KEY` | Optional. Forwarded as `X-Bowmark-Key`; a free key (bowmark.ai dashboard) lifts the anonymous per-IP daily cap to your plan budget. |
|
|
37
39
|
|
|
38
40
|
## Design notes (repo-internal)
|
|
39
41
|
|
|
40
42
|
- **One remote session per request, retried once.** The hosted MCP is
|
|
41
43
|
stateless, so a fresh connection is semantically identical and its cost (one
|
|
42
|
-
initialize round-trip) is noise next to
|
|
44
|
+
initialize round-trip) is noise next to a `run` that drives real browsers — and it
|
|
43
45
|
sidesteps long-lived-connection failure modes without reconnect bookkeeping.
|
|
44
46
|
Mirrors `packages/bowmark-mcp/python` (the PyPI bridge) exactly.
|
|
45
47
|
- **Pass-through only.** No tool logic lives here; the agent-surfaces sync
|
package/dist/bridge.js
CHANGED
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
import { Client } from "@modelcontextprotocol/sdk/client/index.js";
|
|
24
24
|
import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js";
|
|
25
25
|
import { Server } from "@modelcontextprotocol/sdk/server/index.js";
|
|
26
|
-
import { CallToolRequestSchema, ListToolsRequestSchema
|
|
26
|
+
import { CallToolRequestSchema, ListToolsRequestSchema } from "@modelcontextprotocol/sdk/types.js";
|
|
27
27
|
export const DEFAULT_URL = "https://api.bowmark.ai/mcp?s=n";
|
|
28
28
|
export function targetUrl(env = process.env) {
|
|
29
29
|
return env.BOWMARK_MCP_URL?.trim() || DEFAULT_URL;
|
|
@@ -35,7 +35,7 @@ export function authHeaders(env = process.env) {
|
|
|
35
35
|
return key ? { "X-Bowmark-Key": key } : undefined;
|
|
36
36
|
}
|
|
37
37
|
async function withRemote(fn) {
|
|
38
|
-
const client = new Client({ name: "bowmark-mcp-bridge", version: "
|
|
38
|
+
const client = new Client({ name: "bowmark-mcp-bridge", version: "2.0.0" });
|
|
39
39
|
const headers = authHeaders();
|
|
40
40
|
const transport = new StreamableHTTPClientTransport(new URL(targetUrl()), {
|
|
41
41
|
requestInit: headers ? { headers } : undefined,
|
|
@@ -60,7 +60,7 @@ export async function callRemote(fn, connect = withRemote) {
|
|
|
60
60
|
}
|
|
61
61
|
}
|
|
62
62
|
export function buildServer(remote = callRemote) {
|
|
63
|
-
const server = new Server({ name: "bowmark", version: "
|
|
63
|
+
const server = new Server({ name: "bowmark", version: "2.0.0" }, { capabilities: { tools: {} } });
|
|
64
64
|
server.setRequestHandler(ListToolsRequestSchema, async () => {
|
|
65
65
|
return await remote((c) => c.listTools());
|
|
66
66
|
});
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bowmark-mcp",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"mcpName": "ai.bowmark/bowmark",
|
|
5
|
-
"description": "Bowmark MCP over stdio \u2014 a thin bridge to the hosted Bowmark MCP at https://api.bowmark.ai/mcp",
|
|
5
|
+
"description": "Bowmark MCP over stdio \u2014 a thin bridge to the hosted Bowmark MCP at https://api.bowmark.ai/mcp. The web as callable functions: read a typed library, write a script, Bowmark runs it on the live sites.",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"author": "Bowmark AI <christopher@bowmark.ai>",
|
|
8
8
|
"homepage": "https://bowmark.ai",
|