@t2000/mcp 0.16.30 → 0.17.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  MCP server for AI agent bank accounts on Sui. Connect Claude Desktop, Cursor, or any MCP client to your t2000 agent.
4
4
 
5
- **21 tools · 6 prompts · stdio transport · safeguard enforced**
5
+ **21 tools · 12 prompts · stdio transport · safeguard enforced**
6
6
 
7
7
  ## Quick Start
8
8
 
@@ -41,7 +41,7 @@ For other platforms, paste manually:
41
41
  | `t2000_repay` | write | Repay debt |
42
42
  | `t2000_exchange` | write | Swap assets |
43
43
  | `t2000_rebalance` | write | Optimize yield |
44
- | `t2000_invest` | write | Buy/sell investment assets; earn/unearn yield on SUI, ETH, BTC |
44
+ | `t2000_invest` | write | Buy/sell investment assets; earn/unearn yield on SUI, ETH, BTC, GOLD |
45
45
  | `t2000_contacts` | read | List saved contacts (name → address) |
46
46
  | `t2000_portfolio` | read | Investment portfolio + P&L |
47
47
  | `t2000_strategy` | write | Investment strategies — list, buy (PTB), sell, status, rebalance, create, delete |
package/dist/bin.js CHANGED
@@ -486,7 +486,7 @@ function registerWriteTools(server, agent) {
486
486
  action: z.enum(["list", "buy", "sell", "status", "rebalance", "create", "delete"]).describe("Strategy action to perform"),
487
487
  name: z.string().optional().describe("Strategy name (required for all actions except 'list')"),
488
488
  amount: z.number().optional().describe("USD amount (required for 'buy')"),
489
- allocations: z.record(z.number()).optional().describe("Allocation map e.g. {SUI: 60, BTC: 20, ETH: 20} (for 'create')"),
489
+ allocations: z.record(z.number()).optional().describe("Allocation map e.g. {SUI: 40, BTC: 20, ETH: 20, GOLD: 20} (for 'create')"),
490
490
  description: z.string().optional().describe("Strategy description (for 'create')"),
491
491
  dryRun: z.boolean().optional().describe("Preview without signing (for 'buy')")
492
492
  },
@@ -856,6 +856,346 @@ ${context}
856
856
  }]
857
857
  })
858
858
  );
859
+ server.prompt(
860
+ "morning-briefing",
861
+ "Daily financial snapshot \u2014 balance changes, yield earned, portfolio movement, pending DCA, health warnings.",
862
+ async () => ({
863
+ messages: [{
864
+ role: "user",
865
+ content: {
866
+ type: "text",
867
+ text: [
868
+ "You are a personal financial briefing assistant for a t2000 AI agent bank account.",
869
+ "",
870
+ "Deliver a concise morning briefing. Gather all data first, then present a single unified report.",
871
+ "",
872
+ "Data to collect:",
873
+ "1. Current balance breakdown (t2000_balance)",
874
+ "2. Yield earnings \u2014 daily rate, total earned (t2000_earnings)",
875
+ "3. Investment portfolio \u2014 positions, P&L movement (t2000_portfolio)",
876
+ "4. Health factor \u2014 any borrow risk (t2000_health)",
877
+ '5. Pending DCA runs (t2000_auto_invest action: "status")',
878
+ "6. Recent transactions since yesterday (t2000_history with limit: 10)",
879
+ "",
880
+ "Present the briefing in this structure:",
881
+ "",
882
+ "\u2600\uFE0F MORNING BRIEFING",
883
+ "\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500",
884
+ "",
885
+ "\u{1F4B0} Accounts",
886
+ " Checking / Savings / Credit / Investment totals",
887
+ " Net worth and change from yesterday if estimable",
888
+ "",
889
+ "\u{1F4C8} Portfolio",
890
+ " Each position: asset, amount, current price, unrealized P&L",
891
+ " Overall portfolio performance",
892
+ "",
893
+ "\u{1F4B8} Yield",
894
+ " What you earned overnight (daily rate \xD7 time)",
895
+ " Current APY across savings and investment lending",
896
+ "",
897
+ "\u26A0\uFE0F Alerts (only if applicable)",
898
+ " Low health factor, pending DCA runs, strategy drift, large unrealized losses",
899
+ "",
900
+ "\u{1F4CB} Action Items",
901
+ " Specific, actionable next steps (max 3)",
902
+ ' e.g. "Run pending DCA", "Rebalance savings for +0.5% APY", "Health factor dropping \u2014 consider repaying"',
903
+ "",
904
+ "Keep it scannable. No fluff. Numbers first, narrative second."
905
+ ].join("\n")
906
+ }
907
+ }]
908
+ })
909
+ );
910
+ server.prompt(
911
+ "what-if",
912
+ 'Scenario planning \u2014 "What if I invest $X in Y?" Shows projected impact on portfolio, yield, and risk.',
913
+ {
914
+ scenario: z.string().optional().describe('Scenario to evaluate, e.g. "invest $500 in bluechip" or "withdraw all savings"')
915
+ },
916
+ async ({ scenario }) => ({
917
+ messages: [{
918
+ role: "user",
919
+ content: {
920
+ type: "text",
921
+ text: [
922
+ "You are a financial scenario planner for a t2000 AI agent bank account.",
923
+ "",
924
+ scenario ? `The user wants to evaluate this scenario: "${scenario}"` : "The user wants to explore a hypothetical financial scenario. Ask them what they're considering.",
925
+ "",
926
+ "Gather current state first:",
927
+ "1. Current balance (t2000_balance)",
928
+ "2. Current portfolio (t2000_portfolio)",
929
+ "3. Current positions and rates (t2000_positions, t2000_rates)",
930
+ "4. Health factor if they have borrows (t2000_health)",
931
+ "",
932
+ "Then model the scenario. For each scenario type:",
933
+ "",
934
+ 'INVESTMENT scenario ("invest $X in Y"):',
935
+ " - Preview the trade (t2000_invest or t2000_strategy with dryRun: true)",
936
+ " - Show: checking balance after, new portfolio allocation %, concentration risk",
937
+ " - If the asset can earn yield, show projected annual yield",
938
+ ' - Compare: "keeping $X in savings at Y% vs investing at historical volatility"',
939
+ "",
940
+ 'SAVINGS scenario ("save $X" or "withdraw $X"):',
941
+ " - Show: new savings balance, new yield rate, impact on available spending",
942
+ " - If withdrawing: impact on health factor if they have borrows",
943
+ "",
944
+ 'BORROW scenario ("borrow $X"):',
945
+ " - Show: new health factor, liquidation price, interest cost",
946
+ " - Compare: cost of borrowing vs withdrawing from savings",
947
+ "",
948
+ 'EXCHANGE scenario ("swap $X of A to B"):',
949
+ " - Preview the swap (t2000_exchange with dryRun: true)",
950
+ " - Show: expected output, price impact, slippage",
951
+ "",
952
+ "Present results as:",
953
+ " BEFORE \u2192 AFTER comparison table",
954
+ " Risk assessment (better/worse/neutral)",
955
+ " Clear recommendation with reasoning",
956
+ "",
957
+ 'Always end with: "Want me to execute this?" and the exact command that would run.'
958
+ ].join("\n")
959
+ }
960
+ }]
961
+ })
962
+ );
963
+ server.prompt(
964
+ "sweep",
965
+ "Find idle funds in checking and optimally distribute across savings and investments for maximum yield.",
966
+ {
967
+ keepBuffer: z.number().optional().describe("Dollar amount to keep in checking as spending buffer (default: $20)")
968
+ },
969
+ async ({ keepBuffer }) => {
970
+ const buffer = keepBuffer ?? 20;
971
+ return {
972
+ messages: [{
973
+ role: "user",
974
+ content: {
975
+ type: "text",
976
+ text: [
977
+ "You are a smart money routing assistant for a t2000 AI agent bank account.",
978
+ "",
979
+ `Sweep idle checking funds into optimal earning positions. Keep $${buffer} in checking as a spending buffer.`,
980
+ "",
981
+ "Step 1 \u2014 Assess current state:",
982
+ " - Check balance (t2000_balance) \u2014 how much is idle in checking?",
983
+ " - Check positions (t2000_positions) \u2014 what's already earning?",
984
+ " - Check rates (t2000_rates) \u2014 where are the best yields?",
985
+ " - Check portfolio (t2000_portfolio) \u2014 any uninvested assets not earning yield?",
986
+ "",
987
+ `Step 2 \u2014 Calculate sweep amount: available checking minus $${buffer} buffer.`,
988
+ " If sweep amount is < $1, tell the user their funds are already optimized.",
989
+ "",
990
+ "Step 3 \u2014 Recommend allocation of the sweep amount:",
991
+ " - Savings: stable yield, no price risk \u2014 good for majority of idle funds",
992
+ " - Pick the highest-rate stablecoin protocol",
993
+ " - If they have investment assets not earning yield, recommend t2000_invest earn",
994
+ " - Check if rebalancing existing savings would help (t2000_rebalance dryRun: true)",
995
+ "",
996
+ "Step 4 \u2014 Present the sweep plan:",
997
+ "",
998
+ " \u{1F9F9} SWEEP PLAN",
999
+ " \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500",
1000
+ ` Available to sweep: $X (keeping $${buffer} buffer)`,
1001
+ "",
1002
+ " Action 1: Save $X USDC \u2192 Protocol (Y% APY)",
1003
+ " Expected: ~$X.XX/month",
1004
+ " Action 2: Earn yield on X SUI \u2192 Protocol (Y% APY) [if applicable]",
1005
+ " Action 3: Rebalance savings \u2192 +Y% APY [if applicable]",
1006
+ "",
1007
+ " Projected monthly yield: $X.XX (before) \u2192 $X.XX (after)",
1008
+ "",
1009
+ 'Ask: "Want me to execute this sweep?" Then run each action sequentially.',
1010
+ "Use dryRun: true first for any action over $50."
1011
+ ].join("\n")
1012
+ }
1013
+ }]
1014
+ };
1015
+ }
1016
+ );
1017
+ server.prompt(
1018
+ "risk-check",
1019
+ "Full risk analysis \u2014 health factor, concentration, lending exposure, unrealized losses, liquidation proximity.",
1020
+ async () => ({
1021
+ messages: [{
1022
+ role: "user",
1023
+ content: {
1024
+ type: "text",
1025
+ text: [
1026
+ "You are a risk assessment specialist for a t2000 AI agent bank account.",
1027
+ "",
1028
+ "Perform a comprehensive risk analysis. Gather all data first:",
1029
+ "1. Balance breakdown (t2000_balance)",
1030
+ "2. Health factor (t2000_health)",
1031
+ "3. All lending positions (t2000_positions)",
1032
+ "4. Investment portfolio (t2000_portfolio)",
1033
+ "5. Current rates (t2000_rates)",
1034
+ "",
1035
+ "Analyze and report on each risk dimension:",
1036
+ "",
1037
+ "\u{1F6E1}\uFE0F RISK REPORT",
1038
+ "\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500",
1039
+ "",
1040
+ "1. LIQUIDATION RISK",
1041
+ " Health factor value and status (safe / moderate / warning / critical)",
1042
+ " How much the collateral can drop before liquidation",
1043
+ " If HF < 2.0: specific repayment recommendation to reach safe zone",
1044
+ "",
1045
+ "2. CONCENTRATION RISK",
1046
+ " % of total net worth in each account type (checking, savings, investment)",
1047
+ " % of investments in each asset (SUI, BTC, ETH, GOLD)",
1048
+ " Flag if any single position is >50% of portfolio",
1049
+ "",
1050
+ "3. PROTOCOL EXPOSURE",
1051
+ " Which protocols hold funds (NAVI, Suilend)",
1052
+ " Total exposure per protocol",
1053
+ " Flag if >80% of savings is in one protocol",
1054
+ "",
1055
+ "4. UNREALIZED LOSSES",
1056
+ " Any investment positions currently at a loss",
1057
+ " Total unrealized P&L",
1058
+ " Cost basis vs current price per position",
1059
+ "",
1060
+ "5. YIELD EFFICIENCY",
1061
+ " Any assets sitting idle (not earning yield)",
1062
+ " Checking balance vs recommended buffer",
1063
+ " Investment assets not in lending (could earn via invest earn)",
1064
+ "",
1065
+ "OVERALL RISK SCORE: Low / Medium / High / Critical",
1066
+ "Based on weighted combination of all factors above.",
1067
+ "",
1068
+ "End with max 3 specific, prioritized actions to reduce risk.",
1069
+ "If overall risk is Low, say so clearly \u2014 don't invent problems."
1070
+ ].join("\n")
1071
+ }
1072
+ }]
1073
+ })
1074
+ );
1075
+ server.prompt(
1076
+ "weekly-recap",
1077
+ "Week in review \u2014 transactions, yield earned, portfolio P&L changes, strategy performance, highlights.",
1078
+ async () => ({
1079
+ messages: [{
1080
+ role: "user",
1081
+ content: {
1082
+ type: "text",
1083
+ text: [
1084
+ "You are a personal finance newsletter writer for a t2000 AI agent bank account.",
1085
+ "",
1086
+ "Compile a weekly financial recap. Gather all data:",
1087
+ "1. Current balance (t2000_balance)",
1088
+ "2. Recent transactions (t2000_history with limit: 50)",
1089
+ "3. Yield earnings (t2000_earnings)",
1090
+ "4. Investment portfolio with P&L (t2000_portfolio)",
1091
+ '5. Strategy statuses (t2000_strategy action: "list")',
1092
+ '6. DCA schedule status (t2000_auto_invest action: "status")',
1093
+ "",
1094
+ "Present as a weekly newsletter:",
1095
+ "",
1096
+ "\u{1F4CA} WEEKLY RECAP",
1097
+ "\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500",
1098
+ "",
1099
+ "\u{1F4B0} Net Worth: $X.XX",
1100
+ " Checking: $X | Savings: $X | Investment: $X | Credit: -$X",
1101
+ "",
1102
+ "\u{1F4C8} This Week's Activity",
1103
+ " Summarize transactions by type:",
1104
+ " - X sends totaling $X",
1105
+ " - X saves/withdrawals",
1106
+ " - X investment trades",
1107
+ " - X exchanges",
1108
+ " Highlight the largest transaction",
1109
+ "",
1110
+ "\u{1F4B8} Yield Earned",
1111
+ " Total yield this week (daily rate \xD7 7)",
1112
+ " Breakdown by position",
1113
+ " Annualized projection",
1114
+ "",
1115
+ "\u{1F4CA} Portfolio Performance",
1116
+ " Each position: asset, P&L this week, total unrealized P&L",
1117
+ " Best performer and worst performer",
1118
+ " Strategy performance if applicable",
1119
+ "",
1120
+ "\u{1F504} DCA Status",
1121
+ " Runs completed this week",
1122
+ " Next scheduled run",
1123
+ " Total invested via DCA to date",
1124
+ "",
1125
+ "\u{1F3C6} Highlight of the Week",
1126
+ " One standout metric (best trade, highest yield day, milestone reached)",
1127
+ "",
1128
+ "\u{1F449} Next Week's Focus",
1129
+ " 1-2 actionable suggestions based on trends",
1130
+ "",
1131
+ "Tone: confident, concise, data-driven. Like a Bloomberg brief, not a blog post."
1132
+ ].join("\n")
1133
+ }
1134
+ }]
1135
+ })
1136
+ );
1137
+ server.prompt(
1138
+ "dca-advisor",
1139
+ 'Personalized DCA setup \u2014 "I have $X/month" \u2192 recommends strategy, frequency, asset split, projected growth.',
1140
+ {
1141
+ budget: z.number().optional().describe("Monthly budget in dollars to invest")
1142
+ },
1143
+ async ({ budget }) => ({
1144
+ messages: [{
1145
+ role: "user",
1146
+ content: {
1147
+ type: "text",
1148
+ text: [
1149
+ "You are a dollar-cost averaging advisor for a t2000 AI agent bank account.",
1150
+ "",
1151
+ budget ? `The user has $${budget}/month to invest via DCA.` : "The user wants to set up a DCA (dollar-cost averaging) schedule. Ask them their monthly budget.",
1152
+ "",
1153
+ "Gather context:",
1154
+ "1. Current balance (t2000_balance) \u2014 can they afford this monthly commitment?",
1155
+ "2. Current portfolio (t2000_portfolio) \u2014 what do they already hold?",
1156
+ '3. Existing DCA schedules (t2000_auto_invest action: "status")',
1157
+ '4. Available strategies (t2000_strategy action: "list")',
1158
+ "",
1159
+ "Recommend a DCA plan:",
1160
+ "",
1161
+ "\u{1F4C5} DCA PLAN",
1162
+ "\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500",
1163
+ "",
1164
+ "STRATEGY SELECTION:",
1165
+ " Based on their existing portfolio, recommend one of:",
1166
+ " - bluechip (50% BTC, 30% ETH, 20% SUI) \u2014 large-cap crypto index",
1167
+ " - all-weather (30% BTC, 20% ETH, 20% SUI, 30% GOLD) \u2014 crypto + commodities",
1168
+ " - safe-haven (50% BTC, 50% GOLD) \u2014 store-of-value assets",
1169
+ " - layer1 (50% ETH, 50% SUI) \u2014 smart contract platforms",
1170
+ " - sui-heavy (60% SUI, 20% BTC, 20% ETH) \u2014 Sui-weighted portfolio",
1171
+ " - single asset (100% SUI/BTC/ETH/GOLD) \u2014 concentrated conviction play",
1172
+ " Explain WHY this strategy fits their situation.",
1173
+ "",
1174
+ "FREQUENCY:",
1175
+ " - Weekly ($X/week) \u2014 smoothest averaging, best for volatile markets",
1176
+ " - Monthly ($X/month) \u2014 simpler, lower gas costs",
1177
+ " Recommend weekly for budgets > $50/month, monthly for smaller amounts.",
1178
+ "",
1179
+ "PROJECTION (12 months):",
1180
+ " Total invested: $X",
1181
+ " If prices stay flat: $X (just accumulation)",
1182
+ " Note: past performance doesn't predict future results",
1183
+ " Key benefit: removes emotion and timing risk from investing",
1184
+ "",
1185
+ "AFFORDABILITY CHECK:",
1186
+ " Monthly income vs this commitment",
1187
+ " Remaining checking buffer after DCA",
1188
+ " Flag if DCA would eat into emergency buffer",
1189
+ "",
1190
+ "If they want to proceed:",
1191
+ " Show the exact setup command:",
1192
+ ' t2000_auto_invest action: "setup", amount: X, frequency: "weekly", strategy: "name"',
1193
+ " Preview first, then confirm."
1194
+ ].join("\n")
1195
+ }
1196
+ }]
1197
+ })
1198
+ );
859
1199
  }
860
1200
 
861
1201
  // src/index.ts
@@ -867,7 +1207,7 @@ async function startMcpServer(opts) {
867
1207
  );
868
1208
  process.exit(1);
869
1209
  }
870
- const server = new McpServer({ name: "t2000", version: "0.13.0" });
1210
+ const server = new McpServer({ name: "t2000", version: "0.16.30" });
871
1211
  registerReadTools(server, agent);
872
1212
  registerWriteTools(server, agent);
873
1213
  registerSafetyTools(server, agent);