mcp

v0.2.15
@upshiftfinance/mcp Checked 2 days ago Published 19 hours ago

Local stdio MCP server exposing the Upshift SDK as Model Context Protocol tools.

Local stdio Model Context Protocol server exposing the Upshift SDK's read surface as MCP tools, plus documentation, GitHub, and Jira helpers for triage. Shares its config under ~/.upshift/ with @upshiftfinance/cli, and returns the same JSON envelope — tool results are diff-clean against the matching upshift … --json output. No chain writes: nothing here signs or broadcasts a transaction. The one tool that creates anything is jira_create_ticket, which opens a Jira issue when Jira credentials are configured (see Integrations).

Summary extracted from the README.

@upshiftfinance/mcp

Local stdio Model Context Protocol server exposing the Upshift SDK's read surface as MCP tools, plus documentation, GitHub, and Jira helpers for triage. Shares its config under ~/.upshift/ with @upshiftfinance/cli, and returns the same JSON envelope — tool results are diff-clean against the matching upshift … --json output.

No chain writes: nothing here signs or broadcasts a transaction. The one tool that creates anything is jira_create_ticket, which opens a Jira issue when Jira credentials are configured (see Integrations).

Tools

70 tools in 19 groups.

Group Tools
Meta whoami, chain_list, rpc_test
Discovery vault_list, vault_search
Vault vault_get, vault_apy, vault_tvl, vault_positions, vault_loans, vault_allocations, vault_redemptions, vault_history, vault_summary
User user_points, user_positions, user_pnl
Data points_leaderboard, vault_pending_redemptions, vault_pnl_history, pnl_latest
Activity vault_activity, activity_ranking, user_activity, user_transfers
Reads total_deposited, token_price, vault_withdrawals, vault_pnl, vault_annualized_apy, withdrawal_requests_status
Subaccounts subaccount_list, subaccount_summary, subaccount_health_factor, subaccount_loans, subaccount_cefi_positions, subaccount_otc_positions, subaccount_transactions, subaccount_loan_by_address, subaccount_debank
Risk dashboard_loans, risk_discount_factors, risk_collateral_excess, risk_collateral_simulate
Triage tx_revert_reason
Decode decode_revert_data, simulate_call, read_token_state
OTC otc_positions_list, otc_margin_requirements
Curator curator_vault_subaccounts, curator_vault_whitelist
Governance timelock_requests_list, vault_performance_fees, vault_oracle_classification
Ops ops_health, ops_redemptions
LayerZero layerzero_deposits, layerzero_redeems
Docs docs_search, docs_fetch, docs_list
GitHub github_list_repos, github_get_file, github_search_code, github_list_prs, github_get_pr, github_list_issues
Jira jira_create_ticket, jira_list_projects

Activity answers flow questions — vault_activity returns a vault's deposit/withdrawal feed plus a computed summary (counts, volumes, net flow), and activity_ranking ranks vaults by activity over a window ("which vaults had the most deposits last week"). Most vault/user tools mirror an upshift … CLI command; subaccount_* and layerzero_* read the institutional and cross-chain surfaces respectively.

Triage / Decode work from an error rather than an address — tx_revert_reason traces a mined transaction hash; decode_revert_data decodes a raw revert blob or a whole ethers error string when no hash exists (estimateGas / eth_call failures); simulate_call replays a call to recover truncated revert data; read_token_state reads an ERC-20 holder's balance, allowance, and issuer compliance flags to separate user error from a freeze.

Docs / GitHub / Jira support the same triage loop: search and fetch the Upshift documentation, read source and pull requests from the Upshift GitHub organizations, and file the result as a Jira issue.

Every tool result:

{
  "schemaVersion": 1,
  "command": "vault.apy",
  "ok": true,
  "data": { "address": "0x…", "chainId": 8453, "currentApy": 0.1234 },
  "meta": { "chainId": 8453, "durationMs": 312, "generatedAt": "2026-05-17T…" }
}

Install

npm install -g @upshiftfinance/mcp

Or invoke without installing:

npx -y @upshiftfinance/mcp

Claude Desktop

Add to ~/Library/Application Support/Claude/claude_desktop_config.json:

{
  "mcpServers": {
    "upshift": {
      "command": "npx",
      "args": ["-y", "@upshiftfinance/mcp"],
      "env": {
        "UPSHIFT_PASSPHRASE": "${env:UPSHIFT_PASSPHRASE}",
        "UPSHIFT_CONFIG_DIR": "${env:HOME}/.upshift"
      }
    }
  }
}

Claude Code

claude mcp add upshift npx -y @upshiftfinance/mcp

Auth

API key resolution (first hit wins):

  1. UPSHIFT_API_KEY
  2. Active session — created by upshift login or auto-unlocked from UPSHIFT_PASSPHRASE at server startup.

When neither is present — or the backend rejects the key — authenticated tools return code: "API_KEY_MISSING" with a remediation hint. Public read methods still work.

Integrations

The GitHub and Jira groups talk to external services and are inert until their credentials are present in the environment:

Group Environment Without it
GitHub UPSHIFT_GITHUB_TOKEN — read access to the Upshift orgs Tools return an error envelope naming the variable
Jira JIRA_BASE_URL, JIRA_USER_EMAIL, JIRA_API_TOKEN, JIRA_PROJECT_KEY; plus an active Upshift session for jira_create_ticket Tools return an error envelope naming the variables

Telemetry

The server reuses the SDK's Sentry telemetry and follows the shared telemetry setting in ~/.upshift/config.json — off by default, on after upshift init (when you accept the prompt) or upshift config set telemetry true. When on, SDK errors and tool failures other than configuration problems are reported tagged sdk.surface: mcp and app.name: upshift-mcp, and every backend request carries x-august-app: upshift-mcp. UPSHIFT_SDK_DISABLE_ANALYTICS=1 forces it off regardless of config.

Programmatic use

import { buildServer, bootstrap } from '@upshiftfinance/mcp';

await bootstrap();
const server = buildServer();
// attach your own transport (e.g. an in-memory pair for testing)

Transports

Stdio is the default (shown in the quickstart). For a shared instance, run streamable HTTP:

UPSHIFT_MCP_TOKEN=<team-token> upshift-mcp --http --port 8787
  • Endpoint: POST/GET http://<host>:8787/mcp
  • Every request must send Authorization: Bearer <team-token>; anything else gets a 401.
  • The server binds 127.0.0.1 unless UPSHIFT_MCP_HOST says otherwise.
  • Stateless mode: no session affinity needed behind a load balancer.
  • The surface is identical to stdio (same tools, resources, prompts, and JSON envelopes). No keystore is read in HTTP mode — provide UPSHIFT_API_KEY via the environment if authenticated tools are needed.

Claude Code connection:

claude mcp add --transport http upshift http://<host>:8787/mcp \
  --header "Authorization: Bearer <team-token>"

Resources & prompts

  • Resources: upshift://chains, upshift://errors, upshift://vaults/{chainId} (use 0 for all chains).
  • Prompts: analyze-vault-health, compare-vaults, explain-user-position.