MyFA Demo is a demonstration iOS application showcasing AI-powered financial assistance capabilities. It features conversational AI, portfolio management, and simulated trading functionality.
⚠️ IMPORTANT: This is a DEMO/SIMULATION application for educational purposes only. No real money or actual financial transactions are involved.
This guide will walk you through:
- Setting up the server
- Starting the server
- Running the iOS app to connect to the server
Required:
- macOS with Xcode 15.0+ installed
- Node.js 20.0+ and pnpm package manager
- XcodeGen for iOS project generation
- iOS Simulator or physical iOS device (iOS 16.0+)
- DeepSeek API Key (for LLM functionality)
Install Prerequisites:
# Install Homebrew (if not installed)
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
# Install Node.js (if not installed)
brew install node
# Install pnpm
npm install -g pnpm
# Install XcodeGen
brew install xcodegencd server/wealth-mgrpnpm installThis will install dependencies for both servers:
- AG-UI Server (port 3000): LLM-powered agent
- MCP-UI Server (port 3100): UI tools and capabilities
Create or edit agui-server/.env:
PORT=3000
AGENT_MODE=llm
LLM_PROVIDER=deepseek
DEEPSEEK_API_KEY=your-deepseek-api-key-hereNote: You need a DeepSeek API key. Get one at platform.deepseek.com
pnpm buildThis compiles TypeScript code for both servers.
./start.shThis script will:
- Start the MCP-UI server on port 3100
- Wait for it to be ready
- Start the AG-UI server on port 3000
- Connect them together
pnpm devThis runs the same startup process via pnpm.
Open a new terminal and check:
# Check AG-UI server (main agent endpoint)
curl http://localhost:3000/health
# Check MCP-UI server (tools endpoint)
curl http://localhost:3100/healthBoth should respond with health status.
In separate terminals:
# AG-UI server logs
tail -f agui-server.log
# MCP-UI server logs
tail -f mcpui-server.logKeep the server running - you'll need it for the iOS app to connect.
# From the MyFA root directory
cd iOSmake generateThis creates MyFA.xcodeproj from project.yml using XcodeGen.
The iOS app is pre-configured to connect to http://127.0.0.1:3000/agent in Debug builds.
For iOS Simulator (default):
- No configuration needed - the app will automatically connect to
http://127.0.0.1:3000/agent - Make sure the server is running on your Mac
For Physical Device: You need to update the server URL to use your Mac's IP address:
-
Find your Mac's local IP address:
ipconfig getifaddr en0
Example output:
192.168.1.100 -
Set the
SERVER_URLenvironment variable:SERVER_URL=http://192.168.1.100:3000/agent make run
Or set it in Xcode:
- Edit Scheme → Run → Arguments → Environment Variables
- Add
SERVER_URL=http://YOUR_MAC_IP:3000/agent
Option A: Run from Command Line (Simulator)
make runThis will:
- Generate the Xcode project (if needed)
- Build the app
- Launch it on the default iOS simulator (iPhone 17)
Option B: Open in Xcode
make openThen press ⌘+R to build and run.
Customize Simulator Device:
# Use specific simulator
SIMULATOR_DEVICE="iPhone 15 Pro" make run
# List available simulators
xcrun simctl list devices available- Launch the app on the simulator
- Send a chat message (e.g., "Hello")
- Check server logs - you should see the request:
tail -f server/wealth-mgr/agui-server.log
- Check app - you should receive an AI response
curl -X POST http://localhost:3000/agent \
-H "Content-Type: application/json" \
-H "Accept: text/event-stream" \
-d '{
"threadId": "test",
"runId": "1",
"messages": [{"id":"1","role":"user","content":"Hello"}],
"tools": [],
"context": []
}'Port already in use:
# Change ports
MCPUI_PORT=3101 AGUI_PORT=3001 ./start.shMCP connection failed:
# Check MCP-UI server
curl http://localhost:3100/health
# Review logs
tail -f mcpui-server.logDependencies not installing:
cd server/wealth-mgr
pnpm clean
pnpm installXcodeGen not found:
brew install xcodegenSimulator not found:
# List available simulators
xcrun simctl list devices available
# Use specific simulator
SIMULATOR_DEVICE="iPhone 15" make runApp won't connect to server:
- Verify server is running:
curl http://localhost:3000/health - Check app logs in Xcode console
- For physical device, ensure both device and Mac are on same network
- Set
SERVER_URLenvironment variable with your Mac's IP
- iOS App Details: See
iOS/README.md - Server Details: See
server/wealth-mgr/README.md - App Store Compliance: See
COMPLIANCE_FIXES_APPLIED.md
MyFA/
├── server/ # Backend server
│ └── wealth-mgr/ # Wealth management agent server
│ ├── agui-server/ # AG-UI server (LLM agent) - Port 3000
│ ├── mcpui-server/ # MCP-UI server (UI tools) - Port 3100
│ └── start.sh # Server startup script
├── iOS/ # iOS application
│ ├── App/ # Source code
│ ├── project.yml # XcodeGen project configuration
│ ├── Makefile # Build automation
│ └── README.md # iOS-specific docs
└── README.md # This file
This is a demonstration application for educational purposes only.
- No real financial data or transactions
- Not intended for actual investment decisions
- No financial licenses or regulatory compliance
- Use at your own risk
For actual financial services, consult licensed financial advisors and use production-grade, regulated platforms.
Language: 🇨🇳 中文 | 🇺🇸 English
Version: 1.0.0
Last Updated: November 28, 2025