Skip to content

Commit 0eade87

Browse files
Merge pull request #1 from HashkeyHSK/master
Master
2 parents b3e65e3 + 91522bc commit 0eade87

19 files changed

Lines changed: 888 additions & 162 deletions

.changeset/two-taxis-feel.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

.github/workflows/version.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,9 @@ jobs:
3535
- name: Build
3636
run: yarn build
3737

38+
- name: Set deployment token
39+
run: npm config set '//registry.npmjs.org/:_authToken' "${{ secrets.NPM_TOKEN }}"
40+
3841
- name: Create Release Pull Request or Publish
3942
id: changesets
4043
uses: changesets/action@v1

1.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -181,13 +181,13 @@ MCP 使用标准化的请求/响应格式:
181181
- 用于收集用户输入、显示进度和反馈。
182182
- 显示确认提示 (confirm)
183183
- 记录成功和信息消息 (log.success, log.message)
184-
- 区块链交互由 `@hashkey/agentkit``viem` 处理
184+
- 区块链交互由 `@hashkeychain/agentkit``viem` 处理
185185
- MCP协议实现由 `@modelcontextprotocol/sdk` 提供
186186
- 上链功能由 `@coinbase/onchainkit` 实现
187187
- Coinbase API访问由 `@coinbase/coinbase-sdk` 提供
188188

189189

190-
# @hashkey/agentkit
190+
# @hashkeychain/agentkit
191191
https://github.com/hashkey/agentkit
192192

193193
#
@@ -213,8 +213,8 @@ pnpm link --global
213213
2. 在 base-mcp 项目目录下执行
214214
```shell
215215
cd ~/work/ai/base-mcp
216-
pnpm link --global @hashkey/agentkit
217-
pnpm link --global @hashkey/agentkit-model-context-protocol
216+
pnpm link --global @hashkeychain/agentkit
217+
pnpm link --global @hashkeychain/agentkit-model-context-protocol
218218
```
219219
3. 安装
220220
```shell

2.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# base-mcp
2+
3+
## 1.0.11
4+
5+
### Patch Changes
6+
7+
- Updated @coinbase/agentkit to v0.6.0 and removed override
8+
- Added ability to perform read-only operations without a SEED_PHRASE
9+
- Added anonymous telemetry to server

README.md

Lines changed: 14 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,20 @@
1-
# Base MCP Server 🔵
1+
# Hashkey MCP Server 🔵
22

33
![OpenRouter Integration](public/OpenRouter.gif)
44

55
[![npm version](https://img.shields.io/npm/v/hashkey-mcp.svg)](https://www.npmjs.com/package/hashkey-mcp)
66
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
77

8-
A Model Context Protocol (MCP) server that provides onchain tools for AI applications like Claude Desktop and Cursor, allowing them to interact with the Base Network and Coinbase API.
8+
A Model Context Protocol (MCP) server that provides onchain tools for AI applications like Claude Desktop and Cursor, allowing them to interact with the Hashkey Network.
99

10-
## Overview
1110

12-
This MCP server extends any MCP client's capabilities by providing tools to do anything on Base:
11+
## Extending Hashkey MCP with 3P Protocols, Tools, and Data Sources
1312

14-
- Retrieve wallet addresses
15-
- List wallet balances
16-
- Transfer funds between wallets
17-
- Deploy smart contracts
18-
- Interact with Morpho vaults for onchain lending
19-
- Call contract functions
20-
- Onramp funds via [Coinbase](https://www.coinbase.com/developer-platform/products/onramp)
21-
- Manage ERC20 tokens
22-
- List and transfer NFTs (ERC721 and ERC1155)
23-
- Buy [OpenRouter](http://openrouter.ai/) credits with USDC
24-
25-
The server interacts with Base, powered by Base Developer Tools and [AgentKit](https://github.com/coinbase/agentkit).
26-
27-
## Extending Base MCP with 3P Protocols, Tools, and Data Sources
28-
29-
Base MCP is designed to be extensible, allowing you to add your own third-party protocols, tools, and data sources. This section provides an overview of how to extend the Base MCP server with new capabilities.
13+
Hashkey MCP is designed to be extensible, allowing you to add your own third-party protocols, tools, and data sources. This section provides an overview of how to extend the Hashkey MCP server with new capabilities.
3014

3115
### Adding New Tools
3216

33-
If you want to add a new tool to the Base MCP server, follow these steps:
17+
If you want to add a new tool to the Hashkey MCP server, follow these steps:
3418

3519
1. Create a new directory in the `src/tools` directory for your tool
3620
2. Implement the tool following the existing patterns:
@@ -44,7 +28,7 @@ If you want to add a new tool to the Base MCP server, follow these steps:
4428

4529
### Project Structure
4630

47-
The Base MCP server follows this structure for tools:
31+
The Hashkey MCP server follows this structure for tools:
4832

4933
```
5034
src/
@@ -59,7 +43,7 @@ src/
5943

6044
### Best Practices for Tool Development
6145

62-
When developing new tools for Base MCP:
46+
When developing new tools for Hashkey MCP:
6347

6448
- Follow the existing code style and patterns
6549
- Ensure your tool has a clear, focused purpose
@@ -69,7 +53,7 @@ When developing new tools for Base MCP:
6953
- Add examples demonstrating how to use your tool
7054
- Include tests for your tool
7155

72-
For more detailed information on contributing to Base MCP, including adding new tools and protocols, see the [CONTRIBUTING.md](CONTRIBUTING.md) file.
56+
For more detailed information on contributing to Hashkey MCP, including adding new tools and protocols, see the [CONTRIBUTING.md](CONTRIBUTING.md) file.
7357

7458
## Prerequisites
7559

@@ -104,7 +88,7 @@ hashkey-mcp --init
10488
1. Clone this repository:
10589

10690
```bash
107-
git clone https://github.com/base/hashkey-mcp.git
91+
git clone https://github.com/HashkeyHSK/hashkey-mcp.git
10892
cd hashkey-mcp
10993
```
11094

@@ -151,9 +135,6 @@ ALCHEMY_API_KEY=your_alchemy_api_key
151135
# You can obtain this from https://openrouter.ai/keys
152136
OPENROUTER_API_KEY=your_openrouter_api_key
153137
154-
# Chain ID (optional for Base Sepolia testnet)
155-
# Use 84532 for Base Sepolia testnet
156-
# You do not have to include this if you want to use Base Mainnet
157138
CHAIN_ID=your_chain_id
158139
```
159140

@@ -169,7 +150,7 @@ This script will verify that your MCP server is working correctly by testing the
169150

170151
## Examples
171152

172-
See the [examples.md](examples.md) file for detailed examples of how to interact with the Base MCP tools through Claude.
153+
See the [examples.md](examples.md) file for detailed examples of how to interact with the Hashkey MCP tools through Claude.
173154

174155
## Integration with Claude Desktop
175156

@@ -199,7 +180,7 @@ You can easily access this file via the Claude Desktop app by navigating to Clau
199180
"ALCHEMY_API_KEY": "your_alchemy_api_key",
200181
"PINATA_JWT": "your_pinata_jwt",
201182
"OPENROUTER_API_KEY": "your_openrouter_api_key",
202-
"CHAIN_ID": "optional_for_base_sepolia_testnet"
183+
"CHAIN_ID": "177"
203184
},
204185
"disabled": false,
205186
"autoApprove": []
@@ -403,7 +384,7 @@ If you encounter issues:
403384

404385
1. Check that your Coinbase API credentials are correct
405386
2. Verify that your seed phrase is valid
406-
3. Ensure you're on the correct network (Base Mainnet)
387+
3. Ensure you're on the correct network (Hashkey Mainnet)
407388
4. Check the Claude Desktop logs for any error messages
408389

409390
## License
@@ -414,13 +395,13 @@ If you encounter issues:
414395

415396
Contributions are welcome! Please feel free to submit a Pull Request.
416397

417-
For detailed guidelines on contributing to Base MCP, including:
398+
For detailed guidelines on contributing to Hashkey MCP, including:
418399

419400
- Reporting bugs
420401
- Suggesting enhancements
421402
- Development setup
422403
- Coding standards
423-
- **Adding new tools, protocols, and data sources** (see also the [Extending Base MCP](#extending-hashkey-mcp-with-3p-protocols-tools-and-data-sources) section above)
404+
- **Adding new tools, protocols, and data sources** (see also the [Extending Hashkey MCP](#extending-hashkey-mcp-with-3p-protocols-tools-and-data-sources) section above)
424405
- Testing requirements
425406
- Documentation standards
426407

claude_desktop_config.json

Lines changed: 0 additions & 23 deletions
This file was deleted.

mcp_config.json

Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,14 @@
11
{
22
"mcpServers": {
33
"base-mcp": {
4-
"command": "wsl",
5-
"args": [
6-
"-d",
7-
"Ubuntu-20.04",
8-
"-e",
9-
"bash",
10-
"-c",
11-
"source /home/leo/.nvm/nvm.sh && node /home/leo/work/ai/base-mcp/build/index.js"
12-
],
4+
"command": "node",
5+
"args": ["/Users/tinahe/base-mcp/build/index.js"],
136
"env": {
14-
"COINBASE_API_KEY_NAME": "98496c57-7932-468e-bf0e-fc46ca882395",
15-
"COINBASE_API_PRIVATE_KEY": "VBOLBZSDuWW6PN91TRfir3BIB9cYpo7Zr2oCGd9rW8S+eAylHqXXYcjKFAzylN3fsrK+EhKXLRICZeh+EBcGpQ==",
16-
"SEED_PHRASE": "someone vote uncover blanket wild hundred vault coil setup rack lamp violin",
17-
"COINBASE_PROJECT_ID": "5486300e-2a82-4652-abe5-62ddf9f05c73",
18-
"OPENROUTER_API_KEY": "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",
19-
"CHAIN_ID": "133"
7+
"COINBASE_API_KEY_NAME": "YOUR_COINBASE_API_KEY_NAME",
8+
"COINBASE_API_PRIVATE_KEY": "YOUR_COINBASE_API_PRIVATE_KEY",
9+
"SEED_PHRASE": "YOUR_WALLET_SEED_PHRASE",
10+
"COINBASE_PROJECT_ID": "YOUR_COINBASE_PROJECT_ID",
11+
"OPENROUTER_API_KEY": "YOUR_OPENROUTER_API_KEY" // Optional, only needed for OpenRouter credits
2012
},
2113
"disabled": false,
2214
"autoApprove": []

mcp_config.json.example

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,8 @@
11
{
22
"mcpServers": {
33
"hashkey-mcp": {
4-
"command": "wsl",
5-
"args": [
6-
"-d",
7-
"Ubuntu",
8-
"node",
9-
"/home/leo/work/ai/hashkey-mcp/build/index.js"
10-
],
4+
"command": "npx",
5+
"args": ["-y", "hashkey-mcp@latest"],
116
"env": {
127
"COINBASE_API_KEY_NAME": "your_api_key_name",
138
"COINBASE_API_PRIVATE_KEY": "your_private_key",
@@ -16,10 +11,9 @@
1611
"ALCHEMY_API_KEY": "your_alchemy_api_key",
1712
"PINATA_JWT": "your_pinata_jwt",
1813
"OPENROUTER_API_KEY": "your_openrouter_api_key",
19-
"CHAIN_ID": "84532"
14+
"CHAIN_ID": "177"
2015
},
2116
"disabled": false,
22-
"autoApprove": []
2317
}
2418
}
2519
}

package.json

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
{
22
"name": "hashkey-mcp",
3-
"version": "1.0.10",
3+
"version": "1.0.13",
44
"description": "A Model Context Protocol (MCP) server that provides onchain tools for Claude AI, allowing it to interact with the Base blockchain and Coinbase API",
5-
"bin": "./build/index.js",
5+
"bin": {
6+
"base-mcp": "build/index.js"
7+
},
68
"type": "module",
79
"scripts": {
810
"run": "tsx src/index.ts",
@@ -21,7 +23,7 @@
2123
],
2224
"repository": {
2325
"type": "git",
24-
"url": "https://github.com/base/hashkey-mcp"
26+
"url": "git+https://github.com/HashkeyHSK/hashkey-mcp.git"
2527
},
2628
"keywords": [
2729
"mcp",
@@ -38,7 +40,7 @@
3840
"packageManager": "pnpm@10.5.2",
3941
"dependencies": {
4042
"@clack/prompts": "^0.10.0",
41-
"@hashkey/agentkit": "^0.6.0",
43+
"@hashkeychain/agentkit": "^0.6.3",
4244
"@coinbase/agentkit-model-context-protocol": "^0.2.0",
4345
"@coinbase/coinbase-sdk": "^0.21.0",
4446
"@coinbase/onchainkit": "^0.37.6",
@@ -50,7 +52,7 @@
5052
"graphql": "^16.10.0",
5153
"graphql-request": "^7.1.2",
5254
"reflect-metadata": "^0.2.2",
53-
"viem": "^2.23.9",
55+
"viem": "^2.27.2",
5456
"zod": "^3.24.2"
5557
},
5658
"devDependencies": {
@@ -74,11 +76,5 @@
7476
"typescript": "^5.8.2",
7577
"typescript-eslint": "^8.26.1",
7678
"zod-to-json-schema": "^3.24.4"
77-
},
78-
"pnpm": {
79-
"overrides": {
80-
"@hashkey/agentkit": "link:../../../.local/share/pnpm/global/5/node_modules/@hashkey/agentkit",
81-
"@hashkey/agentkit-model-context-protocol": "link:../../../.local/share/pnpm/global/5/node_modules/@hashkey/agentkit-model-context-protocol"
82-
}
8379
}
8480
}

0 commit comments

Comments
 (0)