mcp-wallet-signer 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Nikolay Bryskin
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,134 @@
1
+ # MCP Wallet Signer
2
+
3
+ MCP server that routes blockchain transactions to browser wallets for signing. Install with just `claude mcp add` - no separate servers to run.
4
+
5
+ ## Installation
6
+
7
+ ### Claude Code CLI
8
+
9
+ ```bash
10
+ claude mcp add evm-wallet -- npx mcp-wallet-signer
11
+ ```
12
+
13
+ ### Claude Desktop
14
+
15
+ Add to your `claude_desktop_config.json`:
16
+
17
+ ```json
18
+ {
19
+ "mcpServers": {
20
+ "evm-wallet": {
21
+ "command": "npx",
22
+ "args": ["mcp-wallet-signer"]
23
+ }
24
+ }
25
+ }
26
+ ```
27
+
28
+ ### Run directly
29
+
30
+ ```bash
31
+ npx mcp-wallet-signer
32
+ pnpx mcp-wallet-signer
33
+ bunx mcp-wallet-signer
34
+ ```
35
+
36
+ ## MCP Tools
37
+
38
+ | Tool | Description | Browser Required |
39
+ |------|-------------|------------------|
40
+ | `connect_wallet` | Connect wallet, return address | Yes |
41
+ | `send_transaction` | Send ETH/tokens, call contracts | Yes |
42
+ | `sign_message` | Sign arbitrary message (personal_sign) | Yes |
43
+ | `sign_typed_data` | Sign EIP-712 typed data | Yes |
44
+ | `get_balance` | Read ETH balance (via RPC) | No |
45
+
46
+ ## How It Works
47
+
48
+ 1. Agent calls an MCP tool (e.g., `send_transaction`)
49
+ 2. Server opens browser to a local signing page
50
+ 3. User connects wallet and approves the action
51
+ 4. Result (address, tx hash, signature) returned to agent
52
+
53
+ ## Supported Chains
54
+
55
+ Built-in RPC URLs for:
56
+ - Ethereum (1)
57
+ - Sepolia (11155111)
58
+ - Polygon (137)
59
+ - Arbitrum One (42161)
60
+ - Optimism (10)
61
+ - Base (8453)
62
+ - Avalanche (43114)
63
+ - BNB Smart Chain (56)
64
+
65
+ ## Configuration
66
+
67
+ Environment variables (optional):
68
+
69
+ | Variable | Description | Default |
70
+ |----------|-------------|---------|
71
+ | `EVM_MCP_PORT` | HTTP server port | 3847 |
72
+ | `EVM_MCP_DEFAULT_CHAIN` | Default chain ID | 1 |
73
+
74
+ ## Development
75
+
76
+ Requires [Deno](https://deno.land/) v2.0+.
77
+
78
+ ```bash
79
+ # Install dependencies
80
+ deno install
81
+ cd web && deno install && cd ..
82
+
83
+ # Run MCP server in dev mode
84
+ deno task dev
85
+
86
+ # Run web UI dev server (separate terminal)
87
+ deno task dev:web
88
+
89
+ # Run tests
90
+ deno task test
91
+
92
+ # Build web UI
93
+ deno task build:web
94
+
95
+ # Build for npm
96
+ deno task build:npm
97
+
98
+ # Format code
99
+ deno task fmt
100
+
101
+ # Lint code
102
+ deno task lint
103
+ ```
104
+
105
+ ## Project Structure
106
+
107
+ ```
108
+ ├── src/
109
+ │ ├── index.ts # Entry point
110
+ │ ├── mcp-server.ts # MCP tool definitions
111
+ │ ├── http-server.ts # Lazy-started HTTP server
112
+ │ ├── pending-store.ts # Promise-based request tracking
113
+ │ ├── browser.ts # Browser launcher
114
+ │ ├── config.ts # Chain/RPC configuration
115
+ │ └── types.ts # Type definitions
116
+ ├── web/ # Svelte UI
117
+ │ ├── src/
118
+ │ │ ├── App.svelte
119
+ │ │ ├── lib/
120
+ │ │ │ ├── api.ts # API client
121
+ │ │ │ └── wallet.ts # viem wallet interactions
122
+ │ │ └── components/
123
+ │ │ ├── ConnectWallet.svelte
124
+ │ │ ├── TransactionSigner.svelte
125
+ │ │ └── MessageSigner.svelte
126
+ │ └── ...
127
+ └── tests/
128
+ ├── pending-store.test.ts
129
+ └── e2e/
130
+ ```
131
+
132
+ ## License
133
+
134
+ MIT