Safe MCP Server
# Safe MCP Server
An MCP (Model Context Protocol) server implementation for interacting with Safe (formerly Gnosis Safe) smart contract wallets.
## Features
- Query Safe transactions for any Safe address
- Get multisig transaction details
- Decode transaction data
- Safe API integration
## Installation
```bash
npm install
```
## Usage
```bash
npm run build
npm start
```
No configuration is required - the server uses the Safe Transaction API mainnet endpoint by default.
## Available Tools
### getSafeTransactions
Get all transactions for any Safe address. The Safe address is determined by the LLM at runtime based on the context of the conversation.
```typescript
// Example tool call
getSafeTransactions({
address: "0x123...", // Safe address determined by LLM
limit: 100, // optional
offset: 0, // optional
});
```
### getMultisigTransaction
Get details of a specific multisig transaction.
```typescript
getMultisigTransaction({
safeTxHash: "0x456...", // Transaction hash to query
});
```
### decodeTransactionData
Decode transaction data using Safe API.
```typescript
decodeTransactionData({
data: "0x789...", // Transaction data to decode
to: "0xabc...", // Optional contract address
});
```
## Configuration (Optional)
By default, the server uses the Safe Transaction API mainnet endpoint:
```
https://safe-transaction-mainnet.safe.global/api/v1
```
If you need to use a different endpoint (e.g., for testnet), you can set it via environment variable:
```bash
SAFE_API_URL=https://safe-transaction-goerli.safe.global/api/v1 npm start
```
## Development
```bash
npm run dev
```
## License
MIT
TDQS
Scored across 3 tools
Each tool has a clearly distinct purpose: decodeTransactionData handles data decoding, getMultisigTransaction retrieves a specific transaction, and getSafeTransactions lists all transactions for a Safe. There is no overlap in functionality, making tool selection straightforward.
The naming follows a consistent verb_noun pattern with camelCase (e.g., decodeTransactionData, getMultisigTransaction). However, the verb 'get' is used for two tools while 'decode' is used for one, which is a minor deviation from perfect uniformity.
With only 3 tools, the set feels thin for a Safe MCP server, as it lacks operations like creating or executing transactions, which are core to multisig workflows. The count is borderline for the apparent scope of Safe management.
The tool surface is significantly incomplete for Safe management, missing essential CRUD operations such as creating, proposing, or executing transactions. This will likely cause agent failures when trying to perform full lifecycle actions on Safes.