|
| 1 | +# Claude Installation |
| 2 | + |
| 3 | +This repository can be installed into Claude Code as an MCP server in three |
| 4 | +scopes: |
| 5 | + |
| 6 | +- `local`: machine-local config for the current project, stored in |
| 7 | + `~/.claude.json` |
| 8 | +- `user`: machine-wide config for your user, stored in `~/.claude.json` |
| 9 | +- `project`: project-scoped config written to `.mcp.json` in the repo root |
| 10 | + |
| 11 | +On this Windows setup, writing the config file directly is more reliable than |
| 12 | +shelling out to `claude mcp add`, so the install script uses the config-file |
| 13 | +path directly and then verifies the result with `claude mcp get`. |
| 14 | + |
| 15 | +## Prerequisites |
| 16 | + |
| 17 | +- Claude Code CLI installed and available as `claude` |
| 18 | +- Node.js available as `node` |
| 19 | +- Project already built with `npm run build` |
| 20 | + |
| 21 | +## Recommended Install |
| 22 | + |
| 23 | +From the repository root: |
| 24 | + |
| 25 | +```powershell |
| 26 | +.\install-to-claude.ps1 |
| 27 | +``` |
| 28 | + |
| 29 | +The default scope is `user`, so this installs the server once for your account |
| 30 | +and makes it available in all Claude Code projects on this machine. |
| 31 | + |
| 32 | +The script also writes a stable `WORKSPACE_ROOT` by default: |
| 33 | + |
| 34 | +- `%USERPROFILE%/.windows-exe-decompiler-mcp-server/workspaces` |
| 35 | + |
| 36 | +It also pins: |
| 37 | + |
| 38 | +- `DB_PATH` |
| 39 | +- `CACHE_ROOT` |
| 40 | +- `AUDIT_LOG_PATH` |
| 41 | + |
| 42 | +## Pass Ghidra Explicitly |
| 43 | + |
| 44 | +```powershell |
| 45 | +.\install-to-claude.ps1 -GhidraPath "C:\path\to\ghidra" |
| 46 | +``` |
| 47 | + |
| 48 | +The script writes both `GHIDRA_PATH` and `GHIDRA_INSTALL_DIR`. |
| 49 | + |
| 50 | +If you want a different persistent workspace root: |
| 51 | + |
| 52 | +```powershell |
| 53 | +.\install-to-claude.ps1 -WorkspaceRoot "D:\reverse-data\workspaces" |
| 54 | +``` |
| 55 | + |
| 56 | +## Change Scope |
| 57 | + |
| 58 | +Examples: |
| 59 | + |
| 60 | +```powershell |
| 61 | +.\install-to-claude.ps1 -Scope local |
| 62 | +.\install-to-claude.ps1 -Scope user |
| 63 | +.\install-to-claude.ps1 -Scope project |
| 64 | +``` |
| 65 | + |
| 66 | +If you choose `project`, the script writes `.mcp.json` into the repository |
| 67 | +root. If you choose `local` or `user`, the script updates `~/.claude.json`. |
| 68 | +Use `local` only when you want this repo to override the global `user` |
| 69 | +registration. |
| 70 | + |
| 71 | +## Manual Config Format |
| 72 | + |
| 73 | +Claude Code recognizes the standard MCP config shape: |
| 74 | + |
| 75 | +```json |
| 76 | +{ |
| 77 | + "mcpServers": { |
| 78 | + "windows-exe-decompiler": { |
| 79 | + "command": "node", |
| 80 | + "args": ["E:/Playground/Reverse/dist/index.js"], |
| 81 | + "cwd": "E:/Playground/Reverse", |
| 82 | + "env": { |
| 83 | + "WORKSPACE_ROOT": "C:/Users/<you>/.windows-exe-decompiler-mcp-server/workspaces", |
| 84 | + "GHIDRA_PATH": "C:/path/to/ghidra", |
| 85 | + "GHIDRA_INSTALL_DIR": "C:/path/to/ghidra" |
| 86 | + } |
| 87 | + } |
| 88 | + } |
| 89 | +} |
| 90 | +``` |
| 91 | + |
| 92 | +That same server object works in: |
| 93 | + |
| 94 | +- repo-local `.mcp.json` for `project` scope |
| 95 | +- top-level `mcpServers` in `~/.claude.json` for `user` scope |
| 96 | +- `projects["E:/path/to/repo"].mcpServers` in `~/.claude.json` for `local` |
| 97 | + scope |
| 98 | + |
| 99 | +## Verify |
| 100 | + |
| 101 | +```powershell |
| 102 | +claude mcp list |
| 103 | +claude mcp get windows-exe-decompiler |
| 104 | +``` |
| 105 | + |
| 106 | +If you used `project` scope, `claude mcp get` should report `Scope: Project |
| 107 | +config (shared via .mcp.json)`. If you used `local` or `user`, it should report |
| 108 | +the corresponding Claude config scope from `~/.claude.json`. |
| 109 | + |
| 110 | +## References |
| 111 | + |
| 112 | +- Claude Code MCP overview: https://docs.anthropic.com/en/docs/claude-code/mcp |
| 113 | +- Claude Code MCP CLI reference: https://docs.anthropic.com/en/docs/claude-code/mcp#manage-mcp-servers |
0 commit comments