Register with Claude Desktop in `npx @agent360/browser-mcp install`

Aperta Adatta ai principianti
#124 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 2 giorni

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
86/100
Tipo di issue
Funzionalità
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
javascript, node.js

Direzione di ricerca

Leggi mcp-server/bin/cli.js, in particolare registerWithCursor e install(), poi esamina nei test Node esistenti i modelli per simulare i percorsi e usare directory temporanee. Aggiungi test per la fusione, i casi già registrati, i client mancanti e i file non leggibili, quindi esegui npm --prefix mcp-server test; il lavoro è concluso quando Claude Desktop viene registrato, se presente, senza sovrascrivere gli altri server.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

enhancement good first issue

npx @agent360/browser-mcp install already registers the server with every client it can find among Claude Code, Codex, VS Code and Cursor. It does not touch Claude Desktop.

The Cursor path in mcp-server/bin/cli.js (registerWithCursor) is the pattern to copy: if the client's config directory exists, merge browser-mcp into its MCP JSON, leave every other entry untouched, and do nothing when the client is not installed. Do not invent a success message when the file could not be read.

The work:

  1. Add registerWithClaudeDesktop() next to the existing helpers in mcp-server/bin/cli.js, and call it from install() alongside the other four.
  2. Claude Desktop's config file is:
    • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
    • Windows: %APPDATA%\\Claude\\claude_desktop_config.json
    • Linux: ~/.config/Claude/claude_desktop_config.json
  3. The entry to merge is the same shape the other clients use: { "command": "npx", "args": ["@agent360/browser-mcp@latest"] } under mcpServers.browser-mcp.
  4. If the file is missing but the Claude Desktop directory exists, create a valid config that only contains this server. If the directory does not exist, return null (client not installed), the same way Cursor does.
  5. Cover it with a test that runs in Node, with no Chrome and no Claude Desktop: point the function at a temp dir (or stub the paths), and assert merge, already-registered, missing-client, and unreadable-file behaviour. npm --prefix mcp-server test must stay green. Mutation-prove the test: break the merge, watch it go red, put it back, and mention that in the PR.

Why this is a good first issue: it is one function with a neighbour that already does the same job, plus a Node test. You do not need to change the extension.

Done when: install registers Claude Desktop when it is present, leaves it alone when it is not, never overwrites other servers in the file, and the new test has been shown failing first.

Related: the docs page for Claude Desktop is tracked separately.

Lingua principale
JavaScript
Stelle
52
Fork
17
Merge medio
4g 2h
PR unite (30g)
13

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di Agent360dk/browser-mcp

Tutte le issue di Agent360dk/browser-mcp

Issue simili

Altre issue su JavaScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.