Skip to content
localhost-aliases

MCP server

Let Claude Code or Codex see which URL belongs to which project, and register new ones.

One-click install

The last onboarding step — also available any time from Settings — installs the stdio MCP server into Claude Code or Codex in one click. It edits only that client's config file, preserves every other key, and refuses rather than overwrites if the file is not valid JSON.

ClientConfig fileFormat
Claude Code~/.claude.jsona mcpServers.localhost-aliases entry
Codex~/.codex/config.tomlan [mcp_servers.localhost-aliases] table

If you would rather paste it yourself, the same screen shows the exact snippet. In an installed app the server is a compiled binary inside the bundle and runs directly; in a git checkout it is a TypeScript entry point run by Bun, so the command differs between the two and the UI shows the one that applies to you.

~/.codex/config.toml (installed app)

[mcp_servers.localhost-aliases]
command = "/Applications/LocalhostAliases.app/Contents/Resources/mcp"
args = []

What the agent can do

ToolWhat it doesPrompts?
list_aliasesevery alias with its hostname, target port, loopback IP and live statusNo
list_projectsthe folders that have at least one alias linkedNo
create_aliascreates http://<name>.<tld> pointing at 127.0.0.1:<port>Yes
delete_aliasremoves an alias by hostname, name or idYes
link_projectattaches a folder, imports its declared aliasesOnly if it creates one
get_usage_instructionsthe full mechanism, so the agent explains it correctlyNo

The agent cannot approve the prompt for you

create_alias and delete_alias raise the macOS admin prompt that you must accept in person. The server's own instructions tell the model not to call them speculatively.

It needs the app running

The MCP server is a thin client of the dashboard's HTTP API on 127.0.0.1:7788, and the dashboard is embedded in the menu-bar app. If a tool reports the dashboard is unreachable, the fix is to open Localhost Aliases — not to retry.

The server is also told, in its own instructions, that project aliases are http:// only, so your agent should never suggest https://myapp.test.