DEV Community

Local-MCP for Local-MCP

Posted on AI-assisted

Turning a logged-in dashboard into an Excel file with Claude Code

Everyone has one of these: a dashboard behind a login, no export button worth using, and a weekly ritual of copying a table into Excel. This is how we'd hand that ritual to Claude Code with LMCP, a free MCP server for Mac I work on, including the parts that aren't obvious from the tool names.

Step 1: log in once

The browser tools run in LMCP's own window, not your Safari or Chrome. Ask your agent to call web_login with a session name and the URL, log in yourself (2FA included), and the session is saved for every run after that. The password never goes through the AI. (More on that in our previous post.)

Step 2: actually getting the table

This is the part people get wrong, including us at first. web_extract takes a map of field names to CSS selectors, but it returns the first match for each one. It's great for "the account balance" or "the report date", not for a table with 200 rows.

For full tables there are two good options:

  • web_read in text mode. It returns the page's visible text and the model builds the rows from it. Simple, and fine for small or medium tables.
  • web_eval. It runs JavaScript in the page and returns the result as JSON, so you can ask for the table directly:
[...document.querySelectorAll('table tbody tr')]
  .map(r => [...r.cells].map(c => c.innerText.trim()))
Enter fullscreen mode Exit fullscreen mode

It's a power-user tool: it doesn't await async code, and it's disabled in read-only mode.

Pagination isn't automatic. If the table has pages, the agent clicks "Next" with web_click, waits with web_wait_for, and reads again. If that button submits a form, web_click asks for confirm: true first.

Step 3: writing the Excel file

excel_create takes headers and rows and writes a real .xlsx, natively, no Excel installed needed. A few behaviors worth knowing:

  • It previews before writing. The first call shows what will be created; the agent calls again with confirm: true.
  • It won't silently overwrite. If the file exists, it needs overwrite: true as well, and refuses otherwise. Losing last week's file by accident isn't on the menu.
  • Numbers stay numbers, so SUM() and charts work. Strings stay text even if they look numeric, and very long numbers (IDs, phone numbers) stay text too.
  • One sheet, no formatting. It always creates Sheet1, with no styling options.
  • Formulas go through excel_write_cell, one cell per call, and anything that reaches outside the file (WEBSERVICE, external links) is rejected.

If you save to Desktop, Documents or Downloads, LMCP needs Full Disk Access; without it the tool tells you how to grant it instead of quietly writing somewhere else.

Making it repeatable

LMCP has recipes: you save the sequence of tool calls once, with parameters, and run it again with recipe_run. One catch we'd rather you hear from us: a recipe step can't confirm itself. Starting a recipe that changes things takes one confirmation, but individual steps that need confirm (like excel_create) return their preview instead of running.

The pattern that works unattended is appending to a CSV with file_write, which doesn't need confirmation to create a file or add rows to one. Excel opens it fine, and you get a growing history instead of a weekly overwrite.

LMCP doesn't schedule anything itself. For "every Monday at 9", use your client's scheduled tasks or whatever already runs your jobs.

Limits, honestly

  • Extraction calls time out after 10 seconds, so very heavy pages may need to be read in parts.
  • "Sign in with Google" doesn't work in LMCP's browser window.
  • The LMCP menu bar app has to be running for the browser tools to work.

Try it

It's free:

curl -fsSL 'https://local-mcp.com/install?ref=devto-t3' | bash
Enter fullscreen mode Exit fullscreen mode

Or npx -y local-mcp@latest setup. Restart Claude Code afterwards.

What's the table you copy by hand every week?


Top comments (0)