💬 Commit message: Update 2026-02-08 04:14:33, 6 files, 36 lines
📁 Files changed: 6 📝 Lines changed: 36 • cli.js • cli.js.map • mcp.js • mcp.js.map • cli.ts • mcp.ts
This commit is contained in:
+7
-1
@@ -1,4 +1,7 @@
|
||||
#!/usr/bin/env node
|
||||
import { readFileSync } from 'node:fs';
|
||||
import { dirname, resolve } from 'node:path';
|
||||
import { fileURLToPath } from 'node:url';
|
||||
import { McpServer, ResourceTemplate } from '@modelcontextprotocol/sdk/server/mcp.js';
|
||||
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
|
||||
import { z } from 'zod';
|
||||
@@ -6,6 +9,9 @@ import { ClaudeBrowser } from './browser.js';
|
||||
import * as image from './image.js';
|
||||
import { type CommandLike, type ResultLike, stderrLogger as log } from './logger.js';
|
||||
|
||||
const __dirname = dirname(fileURLToPath(import.meta.url));
|
||||
const pkg = JSON.parse(readFileSync(resolve(__dirname, '../package.json'), 'utf-8'));
|
||||
|
||||
const browser = new ClaudeBrowser({ headless: true, width: 1280, height: 800 });
|
||||
let launched = false;
|
||||
let currentScreenshotBuffer: Buffer | null = null;
|
||||
@@ -45,7 +51,7 @@ function withLogging<T extends Record<string, unknown>>(
|
||||
|
||||
const server = new McpServer({
|
||||
name: 'claude-browse',
|
||||
version: '0.1.0',
|
||||
version: pkg.version,
|
||||
});
|
||||
|
||||
// Navigation
|
||||
|
||||
Reference in New Issue
Block a user