> ## Documentation Index
> Fetch the complete documentation index at: https://dynamic-docs-feat-sidebar-revamp.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Overview

Spin up millions of secure, server-controlled wallets with battle-tested MPC infrastructure. Built for onchain automation, Dynamic Server Wallets let you trigger transactions, interact with contracts, and run complex flows—all without user involvement, and fully owned by your backend.

<Info>
  Find pricing for server wallets [here](https://www.dynamic.xyz/pricing?tab=onchain-automation).
</Info>

## Setup (Node SDK)

<Tip>
  Reference example: [https://github.com/dynamic-labs/mpc-node-server-demo](https://github.com/dynamic-labs/mpc-node-server-demo)
</Tip>

<Steps>
  <Step title="Retrieve your auth token">
    Navigate to the [Dynamic Dashboard](https://app.dynamic.xyz/dashboard/developer/api) and create a new API token.
  </Step>

  <Step title="Install desired Node SDKs">
    ```bash
    npm i @dynamic-labs-wallet/node-evm
    npm i @dynamic-labs-wallet/node-svm
    ```
  </Step>

  <Step title="Create client with authenticateApiToken">
    Separate clients are needed for each chain.

    ```typescript
    const BASE_API_URL = 'https://app.dynamicauth.com';
    const MPC_RELAY_URL = 'https://relay.dynamicauth.com';


    export const authenticatedEvmClient = async ({
          authToken,
          environmentId,
          baseApiUrl,
          baseMPCRelayApiUrl,
        }: {
          authToken: string;
          environmentId: string;
          baseApiUrl?: string;
          baseMPCRelayApiUrl?: string;
        }) => {
          const client = new DynamicEvmWalletClient({
            authToken,
            environmentId,
            baseApiUrl: BASE_API_URL,
            baseMPCRelayApiUrl: MPC_RELAY_URL,
          });
          await client.authenticateApiToken(authToken);
          return client;
      };
    ```
  </Step>

  <Step title="Access MPC functionality by creating a new wallet account">
    ```typescript
      const AUTH_TOKEN = 'your-auth-token';
      const ENVIRONMENT_ID = 'your-environment-id';

      const evmClient = await authenticatedEvmClient({
        authToken: AUTH_TOKEN,
        environmentId: ENVIRONMENT_ID,
      });

      const thresholdSignatureScheme = 'TWO_OF_TWO'; // or 'TWO_OF_THREE'
      const password = 'your-optional-password';
      const onError = (error: Error) => {
        // handle error
        console.error(error);
      };

      const {
        accountAddress,
        rawPublicKey,
        publicKeyHex,
        externalServerKeyShares,
          } = await evmClient.createWalletAccount({
            thresholdSignatureScheme,
            password,
            onError,
          });
    ```

    You can now use the accountAddress to sign messages, create transactions, and more. You can also back up your externalServerKeyShares to a secure location.
  </Step>

  <Step title="Example: Sign a message with the MPC wallet account">
    ```typescript
      const AUTH_TOKEN = 'your-auth-token';
      const ENVIRONMENT_ID = 'your-environment-id';

      const evmClient = await authenticatedEvmClient({
        authToken: AUTH_TOKEN,
        environmentId: ENVIRONMENT_ID,
      });

      const message = 'Hello, world!';
      const accountAddress = '0x1234567890123456789012345678901234567890';
      const password = 'your-optional-password';

      const serializedSignature = await evmClient.signMessage({
        message,
        accountAddress,
        password,
      });
    ```
  </Step>
</Steps>

## Guides

[Telegram Bot using server wallets](/guides/integrations/telegram/telegram-server-wallets-bots)
