AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
MCP verified MIT Self-run

Personalcapital2

mcp-wpwilson10-personalcapital2 · by wpwilson10

Python client and MCP server for the Empower (Personal Capital) API. Fetch accounts, holdings, net worth, and more as clean dataclasses — or expose them as tools for AI agents.

— No reviews yet
0 installs
12 views
0.0% view→install

Install

$ agentstack add mcp-wpwilson10-personalcapital2

✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • ✓ Prompt-injection patterns
  • ✓ Secret / credential exfiltration
  • ✓ Dangerous shell & filesystem operations
  • ✓ Untrusted network calls
  • ✓ Known-malicious package signatures

What it can access

  • ✓ Network access No
  • ✓ Filesystem access No
  • ✓ Shell / process execution No
  • ✓ Environment & secrets No
  • ✓ Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

View the full security report →

Verified badge

Passed review? Show it. Paste this badge into your README, it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/mcp-wpwilson10-personalcapital2)

Reliability & compatibility

✓ Security review passed
0 installs to date
— no reviews yet
● 3mo ago

Declared compatibility

Claude CodeClaude DesktopCursorWindsurf

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work →
Are you the author of Personalcapital2? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

personalcapital2

[](https://github.com/wpwilson10/personalcapital2/actions/workflows/ci.yml) [](https://pypi.org/project/personalcapital2/) [](https://pypi.org/project/personalcapital2/) [](LICENSE)

Get your financial data out of Empower (formerly Personal Capital) and into your own tools. Track net worth over time, analyze spending, monitor investment performance, or let an AI agent answer questions about your finances.

Three interfaces, one library:

  • Python API — frozen dataclasses with Decimal precision, not raw JSON
  • CLI (pc2) — structured JSON to stdout, pipe to jq, scripts, or spreadsheets
  • MCP server — drop into Claude Desktop, ask "how much did I spend on dining last quarter?"

Built on the reverse-engineering work of haochi/personalcapital and traviscook21/personalcapital (both MIT). Adds typed dataclasses, an agent-first CLI, and an MCP server on top.

Install

pip install personalcapital2
# or with uv
uv add personalcapital2

Quick start

from datetime import date, timedelta
from personalcapital2 import authenticate

client = authenticate()  # interactive login with 2FA

result = client.get_accounts()
for acct in result.accounts:
    print(f"{acct.name: **Note:** Empower removed email 2FA — verification codes are sent by SMS only. `EMPOWER_2FA_MODE` is kept for compatibility but now only accepts `sms`; a stale `email` value raises a clear error pointing you to SMS.

Sessions live ~24 hours. Set `EMPOWER_EMAIL` and `EMPOWER_PASSWORD` so commands self-heal when a session expires; otherwise re-run `pc2 login`. Override the session path per-command with `--session`.

#### Headless authentication

For unattended invocation, pipe the verification code on stdin:

```bash
EMPOWER_EMAIL=... EMPOWER_PASSWORD=... \
    printf '%s\n' "$CODE" | pc2 login

The orchestrator handles SMS code pickup; pc2 reads the code from stdin.

CLI

The pc2 command outputs structured JSON (data to stdout, errors to stderr) and follows an agent-first design: every error has a machine-readable type and recovery suggestion, exit codes are meaningful, and the help text is self-documenting.

pc2 accounts                                # all linked accounts
pc2 transactions --start 90d                # last 90 days of transactions
pc2 holdings                                # current investment positions
pc2 net-worth --start yb --format csv       # YTD net worth as CSV
pc2 performance --start mb-6 --account-ids 123,456
pc2 spending                                # current month/week/year spending

Date shortcuts: 30d (days ago), mb / me (month begin/end), yb / ye (year begin/end), mb-3 (3 months ago). See [CLI Reference](docs/cli.md) for the full list.

Python API

Methods return response containers with typed dataclass fields and a pre-computed summary, not bare lists:

result = client.get_accounts()
result.accounts     # tuple[Account, ...]
result.summary      # AccountsSummary — networth, assets, liabilities, ...

result = client.get_transactions(start, end)
result.transactions # tuple[Transaction, ...]
result.categories   # tuple[Category, ...]
result.summary      # TransactionsSummary — money_in, money_out, net_cashflow, ...

All fields use datetime.date and decimal.Decimal. See the [API Reference](docs/api.md) for the full method list and the [Model Reference](docs/models.md) for every field and type.

MCP Server

An MCP tool server gives AI agents (Claude Code, Claude Desktop, etc.) direct access to your financial data. The agent can call tools like get_transactions or get_holdings and reason over the results.

pip install "personalcapital2[mcp]"
pc2 login   # authenticate first
pc2 mcp     # start the server

Client config (Claude Code / Claude Desktop):

{
  "mcpServers": {
    "empower": {
      "type": "stdio",
      "command": "pc2",
      "args": ["mcp"],
      "env": {
        "PC2_SESSION_PATH": "~/.config/personalcapital2/session.json",
        "EMPOWER_EMAIL": "you@example.com",
        "EMPOWER_PASSWORD": "..."
      }
    }
  }
}

When the cached session expires mid-conversation, the agent recovers in chat without dropping to a terminal: it calls start_authentication, asks you for the SMS verification code, then calls complete_authentication with the code. The server reads the credentials from this env block.

> Note: EMPOWER_PASSWORD sits plaintext in the MCP client config — standard pattern for MCP servers, but worth knowing.

The server is token-aware — large responses are automatically truncated to fit within context limits (~12,500 tokens by default, configurable via PC2_MCP_MAX_CHARS), while summaries are always preserved in full.

Known API quirks

This library uses Empower's unofficial internal web API, which is not affiliated with Empower and may change without notice.

  • is_spending is unreliable on refunds. Use transaction_type (e.g. "Refund") instead.
  • performance and benchmarks share one API call. get_performance() returns both in a single PerformanceResult.
  • get_accounts may not list all accounts with holdings. Some accounts (employer 401k plans, crypto exchanges) can appear in get_holdings, get_account_balances, and get_performance but not in get_accounts. Use get_holdings to discover investment account IDs.
  • Fee fields can be NaN. The API returns "NaN" for fees_per_year, fund_fees, total_fee, and advisory_fee_percentage on some investment accounts (401k plans, crypto, RSUs). These are coerced to None — the account is not dropped.
  • get_spending ignores date range and interval. The API always returns current-period spending for all three interval types (MONTH, WEEK, YEAR), regardless of the start_date, end_date, or interval parameters.
  • Sessions expire. Typically ~24 hours, sometimes sooner. CLI users run pc2 login again; MCP users let the agent call start_authentication / complete_authentication. Stale-session recovery handles this automatically when EMPOWER_EMAIL/EMPOWER_PASSWORD are set.

Source & license

This open-source MCP server is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet, be the first.

Versions

  • v0.1.0 Imported from the upstream source.