Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions .changeset/two-taxis-feel.md

This file was deleted.

3 changes: 3 additions & 0 deletions .github/workflows/version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ jobs:
- name: Build
run: yarn build

- name: Set deployment token
run: npm config set '//registry.npmjs.org/:_authToken' "${{ secrets.NPM_TOKEN }}"

- name: Create Release Pull Request or Publish
id: changesets
uses: changesets/action@v1
Expand Down
8 changes: 4 additions & 4 deletions 1.md
Original file line number Diff line number Diff line change
Expand Up @@ -181,13 +181,13 @@ MCP 使用标准化的请求/响应格式:
- 用于收集用户输入、显示进度和反馈。
- 显示确认提示 (confirm)
- 记录成功和信息消息 (log.success, log.message)
- 区块链交互由 `@hashkey/agentkit` 和 `viem` 处理
- 区块链交互由 `@hashkeychain/agentkit` 和 `viem` 处理
- MCP协议实现由 `@modelcontextprotocol/sdk` 提供
- 上链功能由 `@coinbase/onchainkit` 实现
- Coinbase API访问由 `@coinbase/coinbase-sdk` 提供


# @hashkey/agentkit 库
# @hashkeychain/agentkit 库
https://github.com/hashkey/agentkit

#
Expand All @@ -213,8 +213,8 @@ pnpm link --global
2. 在 base-mcp 项目目录下执行
```shell
cd ~/work/ai/base-mcp
pnpm link --global @hashkey/agentkit
pnpm link --global @hashkey/agentkit-model-context-protocol
pnpm link --global @hashkeychain/agentkit
pnpm link --global @hashkeychain/agentkit-model-context-protocol
```
3. 安装
```shell
Expand Down
5 changes: 0 additions & 5 deletions 2.md

This file was deleted.

9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# base-mcp

## 1.0.11

### Patch Changes

- Updated @coinbase/agentkit to v0.6.0 and removed override
- Added ability to perform read-only operations without a SEED_PHRASE
- Added anonymous telemetry to server
47 changes: 14 additions & 33 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,36 +1,20 @@
# Base MCP Server 🔵
# Hashkey MCP Server 🔵

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

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

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.
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.

## Overview

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

- Retrieve wallet addresses
- List wallet balances
- Transfer funds between wallets
- Deploy smart contracts
- Interact with Morpho vaults for onchain lending
- Call contract functions
- Onramp funds via [Coinbase](https://www.coinbase.com/developer-platform/products/onramp)
- Manage ERC20 tokens
- List and transfer NFTs (ERC721 and ERC1155)
- Buy [OpenRouter](http://openrouter.ai/) credits with USDC

The server interacts with Base, powered by Base Developer Tools and [AgentKit](https://github.com/coinbase/agentkit).

## Extending Base MCP with 3P Protocols, Tools, and Data Sources

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.
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.

### Adding New Tools

If you want to add a new tool to the Base MCP server, follow these steps:
If you want to add a new tool to the Hashkey MCP server, follow these steps:

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

### Project Structure

The Base MCP server follows this structure for tools:
The Hashkey MCP server follows this structure for tools:

```
src/
Expand All @@ -59,7 +43,7 @@ src/

### Best Practices for Tool Development

When developing new tools for Base MCP:
When developing new tools for Hashkey MCP:

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

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

## Prerequisites

Expand Down Expand Up @@ -104,7 +88,7 @@ hashkey-mcp --init
1. Clone this repository:

```bash
git clone https://github.com/base/hashkey-mcp.git
git clone https://github.com/HashkeyHSK/hashkey-mcp.git
cd hashkey-mcp
```

Expand Down Expand Up @@ -151,9 +135,6 @@ ALCHEMY_API_KEY=your_alchemy_api_key
# You can obtain this from https://openrouter.ai/keys
OPENROUTER_API_KEY=your_openrouter_api_key

# Chain ID (optional for Base Sepolia testnet)
# Use 84532 for Base Sepolia testnet
# You do not have to include this if you want to use Base Mainnet
CHAIN_ID=your_chain_id
```

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

## Examples

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

## Integration with Claude Desktop

Expand Down Expand Up @@ -199,7 +180,7 @@ You can easily access this file via the Claude Desktop app by navigating to Clau
"ALCHEMY_API_KEY": "your_alchemy_api_key",
"PINATA_JWT": "your_pinata_jwt",
"OPENROUTER_API_KEY": "your_openrouter_api_key",
"CHAIN_ID": "optional_for_base_sepolia_testnet"
"CHAIN_ID": "177"
},
"disabled": false,
"autoApprove": []
Expand Down Expand Up @@ -403,7 +384,7 @@ If you encounter issues:

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

## License
Expand All @@ -414,13 +395,13 @@ If you encounter issues:

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

For detailed guidelines on contributing to Base MCP, including:
For detailed guidelines on contributing to Hashkey MCP, including:

- Reporting bugs
- Suggesting enhancements
- Development setup
- Coding standards
- **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)
- **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)
- Testing requirements
- Documentation standards

Expand Down
23 changes: 0 additions & 23 deletions claude_desktop_config.json

This file was deleted.

22 changes: 7 additions & 15 deletions mcp_config.json
Original file line number Diff line number Diff line change
@@ -1,22 +1,14 @@
{
"mcpServers": {
"base-mcp": {
"command": "wsl",
"args": [
"-d",
"Ubuntu-20.04",
"-e",
"bash",
"-c",
"source /home/leo/.nvm/nvm.sh && node /home/leo/work/ai/base-mcp/build/index.js"
],
"command": "node",
"args": ["/Users/tinahe/base-mcp/build/index.js"],
"env": {
"COINBASE_API_KEY_NAME": "98496c57-7932-468e-bf0e-fc46ca882395",
"COINBASE_API_PRIVATE_KEY": "VBOLBZSDuWW6PN91TRfir3BIB9cYpo7Zr2oCGd9rW8S+eAylHqXXYcjKFAzylN3fsrK+EhKXLRICZeh+EBcGpQ==",
"SEED_PHRASE": "someone vote uncover blanket wild hundred vault coil setup rack lamp violin",
"COINBASE_PROJECT_ID": "5486300e-2a82-4652-abe5-62ddf9f05c73",
"OPENROUTER_API_KEY": "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",
"CHAIN_ID": "133"
"COINBASE_API_KEY_NAME": "YOUR_COINBASE_API_KEY_NAME",
"COINBASE_API_PRIVATE_KEY": "YOUR_COINBASE_API_PRIVATE_KEY",
"SEED_PHRASE": "YOUR_WALLET_SEED_PHRASE",
"COINBASE_PROJECT_ID": "YOUR_COINBASE_PROJECT_ID",
"OPENROUTER_API_KEY": "YOUR_OPENROUTER_API_KEY" // Optional, only needed for OpenRouter credits
},
"disabled": false,
"autoApprove": []
Expand Down
12 changes: 3 additions & 9 deletions mcp_config.json.example
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
{
"mcpServers": {
"hashkey-mcp": {
"command": "wsl",
"args": [
"-d",
"Ubuntu",
"node",
"/home/leo/work/ai/hashkey-mcp/build/index.js"
],
"command": "npx",
"args": ["-y", "hashkey-mcp@latest"],
"env": {
"COINBASE_API_KEY_NAME": "your_api_key_name",
"COINBASE_API_PRIVATE_KEY": "your_private_key",
Expand All @@ -16,10 +11,9 @@
"ALCHEMY_API_KEY": "your_alchemy_api_key",
"PINATA_JWT": "your_pinata_jwt",
"OPENROUTER_API_KEY": "your_openrouter_api_key",
"CHAIN_ID": "84532"
"CHAIN_ID": "177"
},
"disabled": false,
"autoApprove": []
}
}
}
18 changes: 7 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
{
"name": "hashkey-mcp",
"version": "1.0.10",
"version": "1.0.13",
"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",
"bin": "./build/index.js",
"bin": {
"base-mcp": "build/index.js"
},
"type": "module",
"scripts": {
"run": "tsx src/index.ts",
Expand All @@ -21,7 +23,7 @@
],
"repository": {
"type": "git",
"url": "https://github.com/base/hashkey-mcp"
"url": "git+https://github.com/HashkeyHSK/hashkey-mcp.git"
},
"keywords": [
"mcp",
Expand All @@ -38,7 +40,7 @@
"packageManager": "[email protected]",
"dependencies": {
"@clack/prompts": "^0.10.0",
"@hashkey/agentkit": "^0.6.0",
"@hashkeychain/agentkit": "^0.6.3",
"@coinbase/agentkit-model-context-protocol": "^0.2.0",
"@coinbase/coinbase-sdk": "^0.21.0",
"@coinbase/onchainkit": "^0.37.6",
Expand All @@ -50,7 +52,7 @@
"graphql": "^16.10.0",
"graphql-request": "^7.1.2",
"reflect-metadata": "^0.2.2",
"viem": "^2.23.9",
"viem": "^2.27.2",
"zod": "^3.24.2"
},
"devDependencies": {
Expand All @@ -74,11 +76,5 @@
"typescript": "^5.8.2",
"typescript-eslint": "^8.26.1",
"zod-to-json-schema": "^3.24.4"
},
"pnpm": {
"overrides": {
"@hashkey/agentkit": "link:../../../.local/share/pnpm/global/5/node_modules/@hashkey/agentkit",
"@hashkey/agentkit-model-context-protocol": "link:../../../.local/share/pnpm/global/5/node_modules/@hashkey/agentkit-model-context-protocol"
}
}
}
Loading
Loading