@achswap/mcp-sdk
v1.0.7
Published
Local signer SDK for Achswap AI agents — private keys never leave your machine.
Readme
@achswap/mcp-sdk
Local signer for Achswap AI agents. Your private key stays on your machine; the remote MCP server never sees it.
Install
npm install -g @achswap/mcp-sdkQuick Start
# 1. Create an encrypted wallet
achswap init
# 2. Show your address without unlocking
achswap address
# 3. Check your native USDC balance
achswap balance
# 4. Run the local MCP signer
export ACHSWAP_PASSWORD=<your-password>
achswap serveAuto-config for AI clients
One command writes the MCP entry into each client’s config (uses npx -y @achswap/mcp-sdk serve):
# 1. Install CLI (once)
npm install -g @achswap/mcp-sdk
# 2. Wallet (password auto-managed by default — no flag needed)
achswap init
# 3. Defaults are already: autoSign=true, autoPassword=true
# Opt out only if you want manual control:
# achswap set autoSign false
# achswap set autoPassword false
# 4. Wire up the AI (pick one or more)
achswap install claude # Claude Desktop / Claude Code
achswap install cursor
achswap install opencode
achswap install codexThen restart that AI app.
| Client | Config file written |
|--------|---------------------|
| claude | %APPDATA%\Claude\claude_desktop_config.json (Windows), or ~/.claude.json |
| cursor | ~/.cursor/mcp.json |
| opencode | ~/.config/opencode/opencode.json (or OPENCODE_CONFIG) |
| codex | ~/.codex/config.toml (or CODEX_HOME) |
Password for the AI process: export it before achswap install so it is copied into the client env (autoSign / signing):
# Windows PowerShell
$env:ACHSWAP_PASSWORD = "your-strong-password"
achswap install cursor
# Linux / macOS / VPS
export ACHSWAP_PASSWORD="your-strong-password"
achswap install claudeOr edit the client config and add under env:
"ACHSWAP_PASSWORD": "your-strong-password"Without a password, reads still work; writes stay pending until:
achswap pending
achswap approve <pending_id>Manual config example (Cursor / Claude)
{
"mcpServers": {
"achswap": {
"command": "npx",
"args": ["-y", "@achswap/mcp-sdk", "serve"],
"env": {
"ACHSWAP_MODE": "remote",
"ACHSWAP_AUTO_SIGN": "false",
"ACHSWAP_PASSWORD": "your-strong-password"
}
}
}
}Environment Variables
| Variable | Required | Description |
|----------|----------|-------------|
| ACHSWAP_PASSWORD | Yes* | Password to decrypt ~/.achswap/keystore.json |
| ACHSWAP_RPC_URL | No | ARC RPC URL (default: https://rpc.testnet.arc.network) |
| ACHSWAP_CHAIN_ID | No | Chain ID (default: 5042002) |
| ACHSWAP_MCP_SERVER_URL | No | Remote keyless MCP backend URL |
| ACHSWAP_BUILDER_TOKEN | No | Token for gated builder endpoints |
* Required for achswap serve and write operations.
Keystore Location
- macOS/Linux:
~/.achswap/keystore.json - Windows:
%USERPROFILE%\.achswap\keystore.json
The file is created with restricted permissions (0o600 on Unix).
CLI Commands
| Command | Description |
|---------|-------------|
| achswap init | Create an encrypted local wallet |
| achswap address | Show wallet address without unlocking |
| achswap balance | Show native USDC balance |
| achswap serve | Start the local MCP signer server (stdio) |
| achswap serve --http | Start the local MCP signer server (HTTP) |
| achswap (no args) | Full control panel: settings, processes, kill, install |
| achswap status | Wallet, config, and short MCP running summary |
| achswap running (alias ps) | List running Achswap MCP processes |
| achswap running --kill <n\|pid> | Kill one process by list number or PID |
| achswap running --kill-all | Kill all detected Achswap MCP processes |
Security
- Private keys are generated locally.
- Keys are encrypted at rest with your password.
- Keys are decrypted only while signing, inside the local process.
- The remote MCP server builds unsigned transactions but never sees your key.
See the top-level SECURITY.md for details.
