Allows coding agents to start, stop, and read logs of local development servers through Claude Code, Cursor, and Codex.
Also known as marcellosso/localhost, localhost, @getlocalhost/cli
- Stars
- 4
- Tools
- —
- Downloads, 30 days
- —
- Latest version
- 0.2.0
- Last commit
- Nov 14, 2026
- License
- MIT
What is localhost app MCP?
localhost app allows coding agents to start, stop, and read logs of local development servers through Claude Code, Cursor, and Codex.
Summary generated from the project's README
About localhost app MCP server
Managing local development servers through coding agents is what this tool enables for developers using Claude Code, Cursor, Claude Desktop, or Codex. By connecting these agents to the localhost app, you allow them to start and stop services or read logs directly from your terminal environment. The setup process uses a command line interface to automatically update configuration files like claude_desktop_config.json or ~/.cursor/mcp.json, ensuring that your existing settings and comments remain untouched.
To use this server, you must have the localhost app installed on your machine. The CLI handles the installation of the localhost-mcp skill, which allows agents to understand specific tasks. You can run the server in a read-only mode using the --read-only flag if you want to restrict the agent from adding, editing, or removing projects and services. This setup works locally via stdio, making it a direct bridge between your AI coding assistant and your running local processes.
What you can do with it
- 1Configure multiple AI agents at onceUse the CLI to add the localhost server to every compatible agent found on your computer.
Written from the project's README. Every use case is checked against a quote from it.
How to install localhost app MCP
Formats verified 10 Nov 2026Install localhost app MCP in Claude Code
$ claude mcp add localhost -- npx -y @getlocalhost/cliInstall localhost app MCP in Cursor
~/.cursor/mcp.json
{
"mcpServers": {
"localhost": {
"command": "npx",
"args": [
"-y",
"@getlocalhost/cli"
]
}
}
}Install localhost app MCP in VS Code
.vscode/mcp.json
{
"servers": {
"localhost": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@getlocalhost/cli"
]
}
}
}Install localhost app MCP in Claude Desktop
claude_desktop_config.json
{
"mcpServers": {
"localhost": {
"command": "npx",
"args": [
"-y",
"@getlocalhost/cli"
]
}
}
}Install localhost app MCP in Codex
~/.codex/config.toml
[mcp_servers.localhost] command = "npx" args = ["-y", "@getlocalhost/cli"]
Install localhost app MCP in Gemini CLI
~/.gemini/settings.json
{
"mcpServers": {
"localhost": {
"command": "npx",
"args": [
"-y",
"@getlocalhost/cli"
]
}
}
}Automated checks
Ran Nov 14, 2026Full report →Passed our automated checks. That is not a security audit: read the code and give the server the narrowest access it needs. How checks work
- Source repository linked and reachablemarcellosso/localhost is public and reachablegithub.com/marcellosso/localhost ↗Pass
- Package names this repository as its source@getlocalhost/cli names marcellosso/localhost as sourcenpmjs.com/package/@getlocalhost/cli ↗Pass
- Build provenance (Sigstore attestation)Sigstore attestation for @getlocalhost/clinpmjs.com/package/@getlocalhost/cli/v/0.2.0#provenance ↗Pass
- Open source license (OSI)MITspdx.org/licenses/MIT.html ↗Pass
- Commit or release in the last yearLast commit or release 2026-11-12github.com/marcellosso/localhost ↗Pass
- OpenSSF ScorecardNot checked
- Package name not close to a popular packageNo popular package one edit away from @getlocalhost/cliPass
- No critical advisory in the package or its dependencies1 resolved dependencies checked; no critical advisoryosv.dev ↗Pass
- No hidden instructions to the model0 tool descriptions and the README read; no override phrases, credential paths or hidden charactersPass
- Destructive tools are labelledNot checked
- Remote endpoint answers the MCP handshakeNot checked
README
View on GitHub@getlocalhost/cli
Connects your coding agents to localhost mcp, the MCP server of localhost app, from a terminal:
npx @getlocalhost/cli mcp install
It adds a server named localhost to Claude Code, Claude Desktop, Cursor and Codex, whichever are on this computer, and installs the localhost-mcp skill where each agent reads skills. The server runs the localhost command that comes with the app, so the app must be installed: without it, this prints how to install it for your OS and changes nothing.
It writes what Settings → Agents in the app writes, and the app shows these agents as connected:
| Agent | MCP server added to | Skill installed in |
|---|---|---|
| Claude Code | ~/.claude.json, through claude mcp add-json --scope user when claude is installed |
~/.claude/skills/localhost-mcp/ |
| Claude Desktop (macOS, Windows) | claude_desktop_config.json in Claude's folder (~/Library/Application Support/Claude, %APPDATA%\Claude) |
none: it has no skills folder |
| Cursor | ~/.cursor/mcp.json |
~/.cursor/skills/localhost-mcp/, unless Claude Code's or Codex's folder has it: Cursor reads those too |
| Codex | ~/.codex/config.toml |
~/.agents/skills/localhost-mcp/ |
- Only its own entries. Every other server and setting in the file stays as it was, comments and order included. A file it can't read is reported and left alone.
- A backup first, in the
agent-backupsfolder of localhost's data folder, before it first changes a file. - Running it again changes nothing.
Commands
npx @getlocalhost/cli mcp install # add the server and the skill
npx @getlocalhost/cli mcp uninstall # remove them, and nothing else
npx @getlocalhost/cli mcp status # where each agent stands
npx @getlocalhost/cli mcp serve # run the server, for an MCP client's configuration
| Option | |
|---|---|
--client <agent> |
claude-code, claude-desktop, cursor or codex; claude for both Claude apps. Repeat it, or separate with commas, for more than one. Without it: every agent found on this computer. |
--read-only |
For mcp install and mcp serve. The server runs localhost mcp --read-only, without the tools that add, edit or remove Projects and Services. Needs a localhost app that has it (0.4.0 or later). Installing again without it keeps a read-only server read-only. |
--dry-run |
Prints what would change, as a diff, and changes nothing. |
Then start a new Claude Code session, quit and reopen Claude Desktop, check Cursor Settings → MCP, or restart Codex.
Any MCP client
mcp serve is the server itself, for any client that starts MCP servers over stdio:
{
"mcpServers": {
"localhost": { "command": "npx", "args": ["-y", "@getlocalhost/cli", "mcp", "serve"] }
}
}
It finds the app's localhost command as mcp install does and runs localhost mcp with the client's stdin and stdout, passing on Ctrl-C and other signals and exiting as the server does. mcp serve --read-only runs localhost mcp --read-only. It writes nothing to stdout itself, since that is the client's channel: without the app, or with an app whose command doesn't run, it says why on stderr and exits with 1. claude mcp add --scope user localhost -- npx -y @getlocalhost/cli mcp serve and codex mcp add localhost -- npx -y @getlocalhost/cli mcp serve add it from a terminal.
More in the MCP docs. Node 18 or later; no dependencies.
Development
cd packages/cli
npm test
node bin/getlocalhost.js mcp status
The JSON and TOML editors are the same as the core's (core/localhost-core/src/agents/), and their tests too: change both together. npm pack copies the skill from skills/localhost-mcp into the package.
localhost app MCP questions
How do I add localhost app MCP to Claude Code?
Run claude mcp add localhost -- npx -y @getlocalhost/cli in your terminal. Add --scope user to make it available in every project.
How do I add localhost app MCP to Cursor?
Open ~/.cursor/mcp.json and add the server under mcpServers, using the Cursor config shown in the install section above.
Which coding agents can use this server?
The server can be added to Claude Code, Claude Desktop, Cursor, and Codex.
Do I need to install anything else for this to work?
Yes, the localhost app must be installed on your system for the server to function.
Does the installation process modify my existing agent configurations?
It only modifies its own entries and creates a backup in the agent-backups folder before making any changes.