Skip to main content
Glama
Factor MCP Server

Factor MCP Server

Official
by FactorDAO

factor_wallet_setup

Import an existing private key, generate a new wallet, or reuse Foundry keystores, then store it securely under ~/.factor-mcp/wallets with optional password encryption and set it active.

Instructions

Import or generate a wallet. REQUIRES model_name (your LLM model ID, e.g. "claude-opus-4-6", "gpt-4o"). Optionally encrypt with a password. Stored securely in ~/.factor-mcp/wallets/

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "model_name": "<model_name>"
    },
    "name": "factor_wallet_setup"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameNoName for the wallet (default: "default"). Use alphanumeric characters, hyphens, and underscores only.default
passwordNoPassword to encrypt the private key. If not provided, key is stored unencrypted (not recommended for production).
setActiveNoSet this wallet as the active wallet for transactions
model_nameYesIMPORTANT: You MUST provide your own LLM model name here (e.g., "grok-4.1", "claude-sonnet-4-5-20250929", "gpt-4o"). This is used to track which AI model generated strategies and profiles.
privateKeyNoPrivate key to import (64 hex chars, with or without 0x prefix). Required unless generateNew is true.
generateNewNoGenerate a new random wallet instead of importing
storageTypeNoStorage backend for the wallet. "factor-mcp" (default) stores in ~/.factor-mcp/wallets/. "foundry-keystore" stores in ~/.foundry/keystores/ using Web3 V3 format (compatible with cast, geth).factor-mcp
skipPasswordProtectionNoSet to true to explicitly skip password protection. WARNING: This stores the private key unencrypted.
useExistingFoundryKeystoreNoUse an existing Foundry keystore wallet (from ~/.foundry/keystores/) instead of importing or generating. Set name to the keystore file name.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.7.9

TDQS

B3.4/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden. It discloses the storage location and the encryption option, which is real behavioral context, but it omits what happens on re-import/overwrite, whether the operation is reversible, and what the tool returns. It also states storage is 'in ~/.factor-mcp/wallets/' without noting the alternate foundry-keystore location described in the schema.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three short sentences with the critical requirement (model_name) front-loaded in caps and the storage note last. Efficient, though the blanket 'stored securely' claim is slightly at odds with the unencrypted default and the alternate keystore backend.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 9-parameter mutation-style tool with no annotations and no output schema, the description covers the core modes and encryption but leaves gaps: overwrite semantics, the three mutually exclusive wallet-source paths, and what the caller receives back. Adequate but not complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents all 9 parameters including the enum and defaults. The description reinforces the required model_name with examples and adds the encrypt-vs-unencrypted framing, but adds no syntax or precedence rules (e.g., privateKey vs generateNew vs useExistingFoundryKeystore) beyond what the schema provides.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with a specific verb+resource pair, 'Import or generate a wallet', which is materially different from the sibling factor_hl_add_api_wallet. It does not explicitly name that sibling or state the contrast, so it stops short of a 5.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It establishes the hard precondition (model_name required) and mentions optional encryption, which is useful call-time guidance. It gives no when-to-use vs. when-not guidance, no mention of the existing-keystore path, and no note about what happens if a wallet with the same name already exists.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools