212LensPortfolio workspace

212Lens AI Portfolio Connector

Discuss your latest personal 212Lens portfolio snapshot with ChatGPT, Claude, Grok or any compatible MCP client. The connector is read-only and never shares your Trading 212 credentials.

Credential isolation

Only derived portfolio data is synced; Trading 212 keys stay in browser storage.

No API rate impact

AI conversations read a cached snapshot and do not refresh Trading 212.

Read-only tools

The connector cannot place trades, move cash or modify your account.

Personal setup

  1. Run npm run connector:token and keep the generated token private.
  2. Set that value as MCP_API_TOKEN in the 212Lens server environment.
  3. Open Settings → AI Portfolio Connector, paste the same token and enable sync.
  4. Refresh the Dashboard. 212Lens will sync the derived snapshot to the server.
  5. Add https://your-domain.example/mcp as a custom MCP connector and authenticate with the token.

Production OAuth

Configure MCP_AUTH_ISSUER, MCP_AUTH_AUDIENCE and MCP_AUTH_JWKS_URL to validate per-user OAuth access tokens. Use an established OAuth 2.1 provider with PKCE and refresh-token support.

Storage

Local snapshots use an atomic file store at CONNECTOR_STORE_PATH. On Vercel, snapshots use a connected private Blob store and never fall back to an ephemeral filesystem.

Available tools

get_portfolio_summarylist_holdingsget_holdingget_allocationget_performancecompare_benchmarksget_cash_flowsget_dividendssimulate_scenarioget_methodologyrender_portfolio_cardsearchfetch

212Lens is informational software. Connector output is not investment, tax or legal advice.