Claude Code、Cursor、Codexを通じて、コーディングエージェントによるローカル開発サーバーの起動、停止、およびログの読み取りを可能にします。
別名 marcellosso/localhost, localhost, @getlocalhost/cli
- スター
- 4
- ツール
- —
- ダウンロード数(30日間)
- 629
- 最新バージョン
- 0.2.0
- 最終コミット
- 2026年11月14日
- ライセンス
- MIT
localhost app MCPとは
localhost appはMCPサーバーです。 Claude Code、Cursor、Codexを通じて、コーディングエージェントによるローカル開発サーバーの起動、停止、およびログの読み取りを可能にします。.
プロジェクトのREADMEから生成された概要
localhost app MCP server について
このツールは、Claude Code、Cursor、Claude Desktop、またはCodexを使用する開発者が、コーディングエージェントを通じてローカル開発サーバーを管理できるようにします。これらのエージェントをlocalhost appに接続することで、エージェントがターミナル環境から直接サービスを起動・停止したり、ログを読み取ったりできるようになります。セットアッププロセスではCLIを使用して、claude_desktop_config.jsonや~/.cursor/mcp.jsonなどの設定ファイルを自動的に更新しますが、既存の設定やコメントが書き換えられないよう配慮されています。
このサーバーを使用するには、マシンにlocalhost appがインストールされている必要があります。CLIはlocalhost-mcp skillのインストールを処理し、これによりエージェントが特定のタスクを理解できるようになります。エージェントによるプロジェクトやサービスの追加、編集、削除を制限したい場合は、--read-onlyフラグを使用してサーバーを読み取り専用モードで実行できます。このセットアップはstdioを介してローカルで動作するため、AIコーディングアシスタントと実行中のローカルプロセスを直接橋渡しします。
できること
- 1複数のAIエージェントを一括設定CLIを使用して、コンピューター上にあるすべての互換性のあるエージェントにlocalhostサーバーを追加します。
プロジェクトの README から作成されています。すべてのユースケースは、その引用と照らし合わせて確認されています。
localhost app MCPのインストール方法
フォーマット検証日 2026年11月10日Claude Codeにlocalhost app MCPをインストール
$ claude mcp add localhost -- npx -y @getlocalhost/cliCursorにlocalhost app MCPをインストール
~/.cursor/mcp.json
{
"mcpServers": {
"localhost": {
"command": "npx",
"args": [
"-y",
"@getlocalhost/cli"
]
}
}
}VS Codeにlocalhost app MCPをインストール
.vscode/mcp.json
{
"servers": {
"localhost": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@getlocalhost/cli"
]
}
}
}Claude Desktopにlocalhost app MCPをインストール
claude_desktop_config.json
{
"mcpServers": {
"localhost": {
"command": "npx",
"args": [
"-y",
"@getlocalhost/cli"
]
}
}
}Codexにlocalhost app MCPをインストール
~/.codex/config.toml
[mcp_servers.localhost] command = "npx" args = ["-y", "@getlocalhost/cli"]
Gemini CLIにlocalhost app MCPをインストール
~/.gemini/settings.json
{
"mcpServers": {
"localhost": {
"command": "npx",
"args": [
"-y",
"@getlocalhost/cli"
]
}
}
}自動チェック
実行日 2026年11月14日詳細レポート →自動チェックに合格しました。これはセキュリティ監査ではありません。コードを読み、サーバーに必要最小限のアクセス権を与えてください。 チェックの仕組み
- ソースリポジトリがリンクされており、アクセス可能marcellosso/localhost is public and reachablegithub.com/marcellosso/localhost ↗合格
- パッケージがこのリポジトリをソースとして示している@getlocalhost/cli names marcellosso/localhost as sourcenpmjs.com/package/@getlocalhost/cli ↗合格
- ビルドの来歴(Sigstore 証明)Sigstore attestation for @getlocalhost/clinpmjs.com/package/@getlocalhost/cli/v/0.2.0#provenance ↗合格
- オープンソースライセンス (OSI)MITspdx.org/licenses/MIT.html ↗合格
- 過去1年以内にコミットまたはリリースありLast commit or release 2026-11-12github.com/marcellosso/localhost ↗合格
- OpenSSF Scorecard未チェック
- パッケージ名が有名なパッケージに酷似していないNo popular package one edit away from @getlocalhost/cli合格
- パッケージと依存関係に重大なアドバイザリがない1 resolved dependencies checked; no critical advisoryosv.dev ↗合格
- モデルへの隠れた指示がない0 tool descriptions and the README read; no override phrases, credential paths or hidden characters合格
- 破壊的なツールがラベル付けされている未チェック
- リモート endpoint が MCP ハンドシェイクに応答する未チェック
README
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のよくある質問
localhost app MCPをClaude Codeに追加するには
ターミナルでclaude mcp add localhost -- npx -y @getlocalhost/cliを実行します。すべてのプロジェクトで利用するには--scope userを追加します。
localhost app MCPをCursorに追加するには
~/.cursor/mcp.jsonを開き、上記のインストールセクションに示すCursor設定を使ってmcpServersの下にサーバーを追加します。
どのコーディングエージェントでこのサーバーを使用できますか?
このサーバーは、Claude Code、Claude Desktop、Cursor、Codexに追加できます。
動作させるために他に何かをインストールする必要がありますか?
はい、サーバーを機能させるには、システムにlocalhost appがインストールされている必要があります。
インストールプロセスによって既存のエージェント設定が変更されることはありますか?
自身の項目のみを変更します。また、変更を加える前にagent-backupsフォルダにバックアップを作成します。