# Printr MCP \[NEW]

## What is Printr MCP?

<figure><img src="/files/KXpIvjrorX7UmIrp0Wbr" alt="Printr MCP conversation flow example"><figcaption></figcaption></figure>

Printr MCP is a [Model Context Protocol](https://modelcontextprotocol.io/) server that lets AI agents create, discover, and manage tokens across multiple chains. Think of it as giving Claude, Cursor, or any MCP-compatible AI the power to print tokens on your behalf.

* **GitHub:** <https://github.com/PrintrFi/printr-mcp>
* **NPM:** [@printr/mcp](https://www.npmjs.com/package/@printr/mcp)

### Why use it?

* **Zero config** - Works out of the box, no API key needed
* **Multi-chain** - Print tokens on EVM + Solana at once
* **Your keys, your control** - Private keys never touch the AI
* **Browser signing** - Sign with MetaMask or Phantom like normal
* **Local wallet storage** - Encrypted keystore on your machine

***

## Quick Start (Demo Video)

{% embed url="<https://drive.google.com/file/d/1_pm_Ml3NJNX9O35y888qnpU95Nl5pywG/view?usp=sharing>" %}

### Automated Setup (Recommended)

The CLI auto-detects your AI clients and sets everything up:

```bash
# Using Bun (recommended)
bunx @printr/mcp setup

# Using Node.js
npx @printr/mcp setup

# Want AI-generated token images? Add your OpenRouter key
bunx @printr/mcp setup --openrouter-api-key <key>

# Target a specific client
bunx @printr/mcp setup --client claude-desktop
```

### One-liner Install

```bash
curl -fsSL https://raw.githubusercontent.com/PrintrFi/printr-mcp/main/scripts/install.sh | bash
```

### Agent Skills

If your agent runtime supports skills, install Printr directly:

```bash
npx skills add PrintrFi/printr-mcp
```

***

## Manual Setup

<details>

<summary>Claude Desktop</summary>

**Config location:**

* macOS: `~/Library/Application Support/Claude/claude_desktop_config.json`
* Linux: `~/.config/Claude/claude_desktop_config.json`

```json
{
  "mcpServers": {
    "printr": {
      "command": "npx",
      "args": ["-y", "@printr/mcp@latest"]
    }
  }
}
```

</details>

<details>

<summary>Claude Code CLI</summary>

```bash
claude mcp add --scope user printr -- npx -y @printr/mcp@latest
```

</details>

<details>

<summary>Cursor</summary>

**Config location:** `~/.cursor/mcp.json`

```json
{
  "mcpServers": {
    "printr": {
      "command": "npx",
      "args": ["-y", "@printr/mcp@latest"]
    }
  }
}
```

</details>

<details>

<summary>VS Code</summary>

Add to your VS Code settings:

```json
{
  "servers": {
    "printr": {
      "type": "stdio",
      "command": "npx",
      "args": ["-y", "@printr/mcp@latest"]
    }
  }
}
```

</details>

***

## Available Tools

Your AI gets access to these tools:

### Token Creation

| Tool                  | What it does                          |
| --------------------- | ------------------------------------- |
| `printr_create_token` | Create tokens with full customization |
| `printr_quote`        | Get cost estimates before printing    |
| `printr_launch_token` | One-call token creation + signing     |

### Token Discovery

| Tool                     | What it does                                    |
| ------------------------ | ----------------------------------------------- |
| `printr_get_token`       | Look up token details by ID or contract address |
| `printr_get_deployments` | Check deployment status and progress per chain  |

### Signing

| Tool                         | What it does                              |
| ---------------------------- | ----------------------------------------- |
| `printr_sign_and_submit_evm` | Sign and submit EVM transactions          |
| `printr_sign_and_submit_svm` | Sign and submit Solana transactions       |
| `printr_open_web_signer`     | Open browser for MetaMask/Phantom signing |

### Wallet Management

| Tool                        | What it does                        |
| --------------------------- | ----------------------------------- |
| `printr_wallet_new`         | Generate new keypairs (EVM/SVM)     |
| `printr_wallet_import`      | Import existing private keys        |
| `printr_wallet_list`        | List all saved wallets              |
| `printr_wallet_unlock`      | Decrypt and activate a saved wallet |
| `printr_wallet_remove`      | Delete wallet from keystore         |
| `printr_wallet_bulk_remove` | Remove multiple wallets at once     |

### Treasury & Deployment Wallets

| Tool                             | What it does                                   |
| -------------------------------- | ---------------------------------------------- |
| `printr_set_treasury_wallet`     | Unlock treasury wallet for funding deployments |
| `printr_fund_deployment_wallet`  | Create and fund an ephemeral deployment wallet |
| `printr_drain_deployment_wallet` | Return unused funds from deployment wallet     |

### Balances & Transfers

| Tool                       | What it does                     |
| -------------------------- | -------------------------------- |
| `printr_get_balance`       | Get native token balance         |
| `printr_get_token_balance` | Get ERC-20/SPL token balance     |
| `printr_transfer`          | Send native tokens to an address |

### Fees

| Tool                      | What it does                           |
| ------------------------- | -------------------------------------- |
| `printr_get_creator_fees` | Check claimable creator fees for token |
| `printr_claim_fees`       | Claim accumulated creator fees         |

### Staking

| Tool                           | What it does                                      |
| ------------------------------ | ------------------------------------------------- |
| `printr_get_staking_positions` | Get staking positions with claimable rewards      |
| `printr_claim_staking_rewards` | Claim rewards from a stake position (or withdraw) |

### Image Generation

| Tool                    | What it does                                      |
| ----------------------- | ------------------------------------------------- |
| `printr_generate_image` | AI-generated token avatars (needs OpenRouter key) |

### Utility

| Tool                      | What it does                              |
| ------------------------- | ----------------------------------------- |
| `printr_supported_chains` | List all supported chains with CAIP-2 IDs |

***

## Configuration

### Environment Variables

#### Core

| Variable              | Description     | Default                            |
| --------------------- | --------------- | ---------------------------------- |
| `PRINTR_API_KEY`      | Partner API key | Public AI-integration key          |
| `PRINTR_API_BASE_URL` | API endpoint    | `https://api-preview.printr.money` |
| `PRINTR_APP_URL`      | Web app URL     | `https://app.printr.money`         |

#### Image Generation (Optional)

| Variable                 | Description        | Default                         |
| ------------------------ | ------------------ | ------------------------------- |
| `OPENROUTER_API_KEY`     | OpenRouter API key | -                               |
| `OPENROUTER_IMAGE_MODEL` | Image model to use | `google/gemini-2.5-flash-image` |

#### Autonomous Mode

For full automation without browser prompts:

| Variable                     | Description                           | Note                                                       |
| ---------------------------- | ------------------------------------- | ---------------------------------------------------------- |
| `EVM_WALLET_PRIVATE_KEY`     | Hex private key for EVM               | Signs without prompts                                      |
| `SVM_WALLET_PRIVATE_KEY`     | Base58 keypair for Solana             | Signs without prompts                                      |
| `AGENT_MODE`                 | Set to `1` for headless mode          | Skips all interactive flows                                |
| `PRINTR_WALLET_STORE`        | Custom keystore path                  | Default: `~/.printr/wallets.json`                          |
| `PRINTR_DEPLOYMENT_PASSWORD` | Master password for deployment wallet | Min 16 chars. Required for `printr_fund_deployment_wallet` |

#### Logging

| Variable     | Description                                          | Default |
| ------------ | ---------------------------------------------------- | ------- |
| `LOG_LEVEL`  | `trace`, `debug`, `info`, `warn`, `error`, `fatal`   | `info`  |
| `LOG_FORMAT` | `json` for structured logs, `pretty` for development | `json`  |

***

## Supported Chains

### EVM (CAIP-2 format)

| Chain           | CAIP-2 ID      |
| --------------- | -------------- |
| Ethereum        | `eip155:1`     |
| Base            | `eip155:8453`  |
| Arbitrum        | `eip155:42161` |
| Avalanche       | `eip155:43114` |
| BNB Smart Chain | `eip155:56`    |
| Monad           | `eip155:10143` |
| Mantle          | `eip155:5000`  |

### Solana

| Network | CAIP-2 ID                                 |
| ------- | ----------------------------------------- |
| Mainnet | `solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp` |

***

## Signing Options

Three ways to sign transactions:

1. **Browser-based (Recommended)** - Opens MetaMask or Phantom via `printr_open_web_signer`. You stay in control.
2. **Private key input** - Pass keys directly for automation workflows.
3. **Encrypted keystore** - Password-protected local storage at `~/.printr/wallets.json`.

{% hint style="info" %}
Your private keys **never** go to the AI. Signing happens locally in your browser or via encrypted storage.
{% endhint %}

***

## Example Flow

Here's how an AI agent might print a token for you:

```
1. printr_quote
   → Get cost estimates for Base + Solana

2. printr_create_token
   → Generate unsigned transactions

3. printr_open_web_signer
   → You connect MetaMask/Phantom in browser
   → Sign the transactions

4. printr_get_deployments
   → Monitor until status = "live"

5. Done! Trade at:
   → https://app.printr.money/trade/{token_id}
```

### Full Automation

Want the AI to handle everything without prompts?

```bash
export EVM_WALLET_PRIVATE_KEY=0x...
export SVM_WALLET_PRIVATE_KEY=...
export AGENT_MODE=1

# Now printr_launch_token goes brrr without interruption
```

***

## Security

* **Keys stay local** - Handled via browser, encrypted keystore, or env vars only
* **Session isolation** - Bound to `127.0.0.1` with 30-minute TTL
* **AES-256 encryption** - Stored wallets use AES-256-GCM + scrypt
* **Balance checks** - Verifies funds before signing

***

## Using the SDK Directly

For programmatic access without MCP, install the SDK:

```bash
npm install @printr/sdk
# or
bun add @printr/sdk
```

### Quick Example

```typescript
import { createPrintrClient, buildToken } from '@printr/sdk';

const client = createPrintrClient({
  apiKey: process.env.PRINTR_API_KEY,
});

const result = await buildToken({
  creator_accounts: ['eip155:8453:0x...'],
  name: 'My Token',
  symbol: 'TKN',
  description: 'A cool token',
  chains: ['eip155:8453'],
  initial_buy: { spend_usd: 10 },
}, client);

if (result.isOk()) {
  console.log('Token created:', result.value.token_id);
}
```

### SDK Modules

```typescript
// Main exports
import { createPrintrClient, buildToken } from '@printr/sdk';

// Chain information
import { CHAIN_META, getChainMeta } from '@printr/sdk/chains';

// EVM operations
import { signAndSubmitEvm } from '@printr/sdk/evm';

// Solana operations
import { signAndSubmitSvm } from '@printr/sdk/svm';

// Balance queries
import { checkEvmBalance, checkSvmBalance } from '@printr/sdk/balance';

// Token transfers
import { executeTransfer } from '@printr/sdk/transfer';

// Wallet keystore
import { addWallet, listWallets } from '@printr/sdk/keystore';

// Image generation
import { generateImageFromPrompt } from '@printr/sdk/image';

// CAIP utilities
import { parseCaip2, parseCaip10 } from '@printr/sdk/caip';

// Staking API
import { listStakePositionsWithRewards, claimStakingRewards } from '@printr/sdk';
```

***

## Resources

* [GitHub](https://github.com/PrintrFi/printr-mcp)
* [NPM - MCP](https://www.npmjs.com/package/@printr/mcp)
* [Printr SDK](/printr-docs/for-developers/printr-sdk.md)
* [Printr API Docs](https://api-preview.printr.money/login#description/introduction)
* [Model Context Protocol](https://modelcontextprotocol.io/)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://printr.gitbook.io/printr-docs/for-agents-new/printr-mcp.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
