Connect your installed tools to Claude Desktop, Cursor, VS Code, Claude Code, and more
After installing and configuring tools, you need to register them with an MCP host so your AI application can use them. This page explains how to work with different hosts and manage tool registrations.
An MCP host is an application that can communicate with MCP servers using the Model Context Protocol. The host acts as the client side of the connection. When you ask the AI to perform a task that requires a tool, the host sends requests to the appropriate MCP server and processes the responses.
The CLI supports eleven hosts:
Each host has its own configuration file format and storage location. The CLI knows these details and handles them automatically.
claude-code
opencode
codex
cursor
vscode
claude-desktop
windsurf
zed
gemini-cli
kiro
roo-code
To see which hosts the CLI supports and their status:
tool host listThis shows each host, whether its configuration file exists, and whether it appears to be installed on your system.
The tool host add command registers tools with a host:
tool host add claude-desktop namespace/toolnameThis reads the tool's manifest, generates the appropriate configuration, and writes it to the host's configuration file.
You can add multiple tools at once:
tool host add claude-desktop library/bash library/filesystemTo add all installed tools:
tool host add claude-desktopWithout specifying tools, the CLI adds every tool in ~/.tool/tools/.
Use these names when specifying hosts:
| Host | Name | Aliases |
|---|---|---|
| Claude Desktop | claude-desktop | cd, claudedesktop |
| Cursor | cursor | - |
| VS Code | vscode | vs-code, vsc, code |
| Claude Code | claude-code | cc, claudecode |
| Codex | codex | - |
| Windsurf | windsurf | ws |
| Zed | zed | - |
| Gemini CLI | gemini-cli | gemini |
| Kiro | kiro | - |
| Roo Code | roo-code | roo, roocode |
| OpenCode | opencode | oc, open-code |
The names are case-insensitive, so Claude-Desktop and CLAUDE-DESKTOP also work.
Short aliases make typing faster:
tool host add cd library/bash # Same as claude-desktop
tool host add cc library/bash # Same as claude-codeBefore modifying the configuration file, you can preview what the CLI will generate:
tool host show claude-desktop library/bashThis prints the configuration that would be added without actually writing it. Useful for understanding what changes will happen or for debugging issues.
The --dry-run flag shows what changes would happen without making them:
tool host add claude-desktop library/bash --dry-runThis is similar to tool host show but in the context of the full add operation.
If the tool is already registered with the host, the CLI updates the existing entry rather than creating a duplicate. The --overwrite flag ensures that existing configuration gets replaced:
tool host add claude-desktop library/bash --overwriteWithout this flag, the CLI may prompt you to confirm overwriting.
To unregister a tool:
tool host remove claude-desktop library/bashThis removes the tool's configuration from the host's file. The tool remains installed; it just will not be available to the AI until you add it again.
You can remove multiple tools:
tool host remove claude-desktop library/bash library/filesystemThe CLI may ask for confirmation before removing. Use -y to skip:
tool host remove claude-desktop library/bash -yTo see where a host stores its configuration:
tool host path claude-desktopThis prints the file path. You can then view or edit the file directly if needed.
To see the generated configuration for specific tools:
tool host show claude-desktop library/bash library/filesystemThis shows the JSON that would be written for those tools.
Claude Desktop stores MCP configuration in a JSON file. The location depends on your operating system:
~/Library/Application Support/Claude/claude_desktop_config.json%APPDATA%\Claude\claude_desktop_config.json~/.config/Claude/claude_desktop_config.jsonThe configuration file has a mcpServers section where each tool gets an entry:
{
"mcpServers": {
"bash": {
"command": "node",
"args": ["/path/to/server/index.js"],
"env": {
"API_KEY": "configured-value"
}
}
}
}After adding or removing tools, restart Claude Desktop for changes to take effect. Quit the application completely (not just close the window) and reopen it.
Cursor stores MCP configuration in:
~/.cursor/mcp.jsonOn Windows, this is %USERPROFILE%\.cursor\mcp.json.
The format is similar to Claude Desktop's format.
After modifying configuration, you may need to reload the MCP extension or restart Cursor.
VS Code with MCP support stores configuration in a dedicated file:
~/Library/Application Support/Code/User/mcp.json%APPDATA%\Code\User\mcp.json~/.config/Code/User/mcp.jsonThe configuration file has a servers section (note: VS Code uses servers instead of mcpServers):
{
"servers": {
"bash": {
"type": "stdio",
"command": "tool",
"args": ["run", "--expose", "stdio", "library/bash", "--yes"]
}
}
}Reload the VS Code window after changes for them to take effect.
Claude Code stores configuration in:
~/.claude.jsonOn Windows, this is %USERPROFILE%\.claude.json.
The format follows the same pattern as Claude Desktop with a mcpServers section.
Claude Code picks up configuration changes on the next command invocation without needing a restart.
When you run tool host add, the CLI:
~/.tool/tools/namespace/toolname/manifest.json~/.tool/config/namespace/toolname.json${user_config.api_key}) to actual valuesThe generated configuration includes:
If the tool uses system configuration like an allocated port (MCPBX), the CLI handles that too.
Sometimes you need to configure a host manually. You might want to tweak settings the CLI does not expose, or you might be troubleshooting issues.
You can edit the host's configuration file directly. Use tool host path to find it:
tool host path claude-desktop
cat "$(tool host path claude-desktop)"The file is JSON. Make sure to use valid JSON syntax when editing. Back up the file before making changes.
If you manually edit the configuration, the CLI will still work for adding and removing other tools. It reads the existing file and merges its changes.
The CLI creates backups before modifying host configuration files. Backups are stored in ~/.tool/backups/. If something goes wrong, you can restore from a backup.
If you added a tool but the AI cannot see it:
tool host show hostname to see current configuration.tool host path hostname and verify the file contents.If the CLI says the configuration file does not exist:
You can create the file manually if needed. For Claude Desktop, create an empty JSON object:
{
"mcpServers": {}
}If the tool appears in the host but does not work:
tool config get namespace/toolnametool call namespace/toolname -m some_methodYou can register the same tool with multiple hosts. Each host gets its own copy of the configuration. If you change the tool's configuration, you need to update each host:
tool config set namespace/toolname KEY=newvalue
tool host add claude-desktop namespace/toolname --overwrite
tool host add cursor namespace/toolname --overwriteOr remove and re-add:
tool host remove claude-desktop namespace/toolname
tool host add claude-desktop namespace/toolname