home / mcp / safe mcp server

Safe MCP Server

An MCP server implementation for interacting with Safe (Gnosis Safe) smart contract wallets

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "5ajaki-safe-mcp-server": {
      "url": "https://safe-transaction-mainnet.safe.global/api/v1",
      "headers": {
        "SAFE_API_URL": "https://safe-transaction-goerli.safe.global/api/v1"
      }
    }
  }
}

You can run a dedicated MCP server to interact with Safe multisig wallets, enabling you to query transactions, inspect multisig details, and decode on-chain data through Safe APIs. This server provides a practical bridge between your applications and Safe’s transaction data, making it easier to build tooling and dashboards around Safe wallets.

How to use

Use this MCP server with your MCP client to access Safe transaction data, multisig transaction details, and decoded transaction data. When you connect, you can query all transactions for a given Safe address, fetch specific multisig transaction details, and decode transaction data via the Safe API. By default, it points to the mainnet Safe Transaction API, so you can start querying right away. If you need a different network, you can override the endpoint with an environment variable.

How to install

Prerequisites you need before running this server: Node.js (16.x or newer) and npm.

Install dependencies and set up the server, then start it.

npm install

Build the project to generate the runnable assets.

npm run build

Run the server. It uses the Safe Transaction API mainnet endpoint by default.

npm start

Optional: override the API endpoint using an environment variable if you need to target a testnet or a private endpoint.

SAFE_API_URL=https://safe-transaction-goerli.safe.global/api/v1 npm start

Configuration and notes

Default endpoint: https://safe-transaction-mainnet.safe.global/api/v1. If you want to use a different endpoint, set the SAFE_API_URL environment variable before starting the server.

Available tools

getSafeTransactions

Fetch all transactions for a given Safe address, with optional limit and offset parameters to paginate results.

getMultisigTransaction

Retrieve details for a specific multisig transaction by its Safe transaction hash.

decodeTransactionData

Decode transaction data using the Safe API, with optional contract address to provide context for decoding.