Skip to content

VeltaMCP/SDK

Repository files navigation

Velta — the open-source SDK, powered by Base MCP

@veltamcp/sdk

Official TypeScript SDK for Velta — your USDC, on autopilot.

Query venues, read your portfolio, and manage withdrawals from any TypeScript / JavaScript app.

npm version License: MIT Base TypeScript


What is Velta?

Velta is an MCP-native yield optimizer for the Base network. You deposit USDC once, and Velta continuously moves it to the best available lending rate across Morpho, Moonwell, and Aave — rebalancing automatically, gas-aware, with circuit breakers.

This SDK is a thin, typed client for the public Velta API. It holds no keys and signs nothing on-chain.

Install

npm install @veltamcp/sdk

No registry config needed — it's on the public npm registry.

Quick start

The venue data is public — no key required:

import { VeltaClient } from "@veltamcp/sdk";

const velta = new VeltaClient();

// Where's the best risk-adjusted USDC yield on Base right now? (ranked best-first)
const venues = await velta.getVenues();
const best = venues[0];
console.log(`Best: ${best.venueId} @ ${best.apy7dPct} (7d APY), risk ${best.riskScore}/100`);

Account-scoped calls take your Velta access token:

const account = new VeltaClient({ accessToken: process.env.VELTA_ACCESS_TOKEN! });

const status = await account.getStatus();
console.log(`$${status.totalUsd} across ${status.positions.length} position(s)`);

const ledger = await account.getActivity({ limit: 10 });

See examples/quickstart.ts for a runnable version.

API

Method Auth Description
getVenues() public Venues with live APYs + Velta risk-adjusted scores, ranked best-first
getStatus() token Account snapshot — preferences, managed wallets, positions, total value
getActivity(query?) token Activity ledger (deposits, rebalances, yield, withdrawals) with plain-English reasons
getDepositInfo() token Managed wallet address + network to fund with USDC
withdraw({ amountUsd?, fromVenue? }) token Queue a withdrawal (full or partial); autopilot redeems to USDC

All methods return typed promises and throw a VeltaError (with status and optional code) on non-2xx responses. Calling a token-only method without an accessToken throws a VeltaError(401) before any request.

Roadmap: policy mutations (set risk tier / rebalance threshold, pause/resume) ship in a later release as the authenticated write API lands. They're intentionally omitted here rather than stubbed.

Configuration

new VeltaClient({
  accessToken: "…",                  // optional; required for account-scoped calls
  baseUrl: "https://veltamcp.com/api/v1", // optional override (this is the default)
  fetch: customFetch,                // optional (Node < 18)
});

Security

  • Never hard-code your access token. Load it from an environment variable or secret manager.
  • This SDK only talks to the public Velta API over HTTPS. It contains no secrets and performs no on-chain signing.
  • Found a vulnerability? Email veltamcp@proton.me — please don't open a public issue for security reports.

Links

License

MIT © Velta

About

The Open Source SDK from VeltaMCP. Your USDC, on autopilot.

Resources

License

Contributing

Stars

Watchers

Forks

Packages

 
 
 

Contributors