Uses Fabits API Collection from Postman to integrate with the Fabits MyWealth platform, enabling mutual fund search, investment operations (lumpsum, SIP, redemption), portfolio tracking, and basket investments through natural language.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Fabits MCP Servershow my portfolio"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Fabits MCP Server
A Model Context Protocol (MCP) server for Fabits MyWealth platform. Invest in mutual funds through natural conversation with AI assistants like Claude.
Features
π Authentication - Secure login with phone + OTP, automatic token management π Fund Discovery - Search funds, get details, view recommendations π° Investments - Lumpsum, SIP, basket investments π Portfolio Tracking - View holdings, SIPs, transaction history π― Production Ready - Direct integration with Fabits production API
Available Tools
Authentication
fabits_request_otp- Step 1: Request OTP to be sent to phonefabits_verify_otp- Step 2: Verify OTP and complete loginfabits_status- Check authentication and KYC statusfabits_refresh_token- Refresh expired access token using refresh tokenfabits_logout- Logout and clear stored tokens
Fund Discovery
fabits_search_funds- Search mutual funds by name/categoryfabits_get_fund_details- Get comprehensive fund informationfabits_get_star_funds- Get Fabits recommended funds
Investments
fabits_invest_lumpsum- One-time investmentfabits_start_sip- Start monthly SIPfabits_redeem- Sell mutual fund unitsfabits_get_baskets- View investment basketsfabits_invest_basket- Invest in diversified baskets
Portfolio
fabits_get_portfolio- View complete portfoliofabits_get_basket_holdings- View basket holdings organized by basketsfabits_get_sips- List active SIPsfabits_get_transactions- View transaction historyfabits_cancel_sip- Cancel SIP
Installation
Option 1: NPM Package (Recommended)
npm install -g fabits-mcpOption 2: From Source
# Clone repository
git clone <repository-url>
cd fabits-mcp
# Install dependencies
npm install
# Build
npm run buildConfiguration
Claude Desktop
Add to your Claude Desktop configuration file:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"fabits": {
"command": "fabits-mcp"
}
}
}Or if running from source:
{
"mcpServers": {
"fabits": {
"command": "node",
"args": ["/path/to/fabits-mcp/build/index.js"]
}
}
}Other MCP Clients
Use the built executable:
node /path/to/fabits-mcp/build/index.jsUsage Examples
1. Login Flow
User: Login to Fabits
Assistant: *calls fabits_status* You're not logged in.
What's your phone number?
User: +917378666101
Assistant: *calls fabits_request_otp with phone*
π± OTP sent to your phone! Please provide the OTP.
User: The OTP is 123456
Assistant: *calls fabits_verify_otp with phone and OTP*
β
Login successful! Your KYC is completed. You can start investing.2. Search and Invest
User: Find good tax-saving funds
Assistant: *calls fabits_search_funds with query="tax saving ELSS"*
Found 15 tax-saving funds. Top picks:
1. HDFC Tax Saver - 1Y: +12.5%, 3Y: +18.2%
2. Axis Long Term Equity - 1Y: +14.1%, 3Y: +17.9%
...
User: Tell me more about fund 1
Assistant: *calls fabits_get_fund_details*
HDFC Tax Saver (Fund ID: ABC123)
- Category: ELSS
- Risk: Moderately High
- Min SIP: βΉ500
- Returns: 1Y: +12.5%, 3Y: +18.2%, 5Y: +15.6%
- Expense Ratio: 1.2%
User: Start a SIP of 5000 per month on the 5th
Assistant: *calls fabits_start_sip with fund_id, amount=5000, date=5*
β
SIP Started!
Monthly: βΉ5,000 on 5th of every month
Please complete e-mandate setup: [link]3. Portfolio Tracking
User: Show my portfolio
Assistant: *calls fabits_get_portfolio*
π Your Portfolio
Total Invested: βΉ1,50,000
Current Value: βΉ1,65,250
Total Returns: βΉ15,250 (+10.17%)
Holdings:
1. HDFC Tax Saver: βΉ55,400 (+10.8%)
2. Axis Bluechip: βΉ48,650 (+8.5%)
...Security
Token Storage: Encrypted tokens stored in
~/.config/fabits-mcp/auth.jsonProduction API: Direct connection to
https://apimywealth.fabits.comNo Data Logging: No transaction or personal data is logged by the MCP server
Session Management: Tokens auto-expire and require re-authentication
Development
# Install dependencies
npm install
# Build
npm run build
# Watch mode (auto-rebuild on changes)
npm run watch
# Test locally
node build/index.jsProject Structure
fabits-mcp/
βββ src/
β βββ index.ts # MCP server entry point
β βββ config.ts # Configuration & API endpoints
β βββ types.ts # TypeScript type definitions
β βββ auth.ts # Authentication & token management
β βββ funds.ts # Fund search & discovery
β βββ invest.ts # Investment operations
β βββ portfolio.ts # Portfolio & tracking
βββ build/ # Compiled JavaScript
βββ package.json
βββ tsconfig.json
βββ README.mdAPI Coverage
Based on Fabits API Collection:
β Authentication (Login, KYC Status)
β Mutual Funds (Search, Details, Star Funds)
β Orders (Lumpsum, SIP, Redemption)
β Baskets (List, Invest)
β Portfolio (Holdings, SIPs, Transactions)
β³ Risk Assessment (Planned)
β³ Plans & Goals (Planned)
β³ Mandates & Payments (Partial)
Troubleshooting
"Not authenticated" error
Re-login using fabits_request_otp followed by fabits_verify_otp. Tokens may expire after 24 hours.
"KYC not completed" error
Complete KYC on the Fabits app before investing through MCP.
Build errors
rm -rf build node_modules
npm install
npm run buildConnection issues
Verify internet connection. The server connects to production Fabits API.
Contributing
Contributions welcome! Please:
Fork the repository
Create a feature branch
Add tests if applicable
Submit a pull request
License
MIT
Disclaimer
β οΈ Investment Warning
This tool connects to PRODUCTION Fabits API
All investments are REAL and use LIVE MONEY
Mutual fund investments are subject to market risks
Past performance does not guarantee future returns
Please read all scheme documents carefully before investing
The developers are not responsible for investment decisions or losses
Support
π§ Issues: GitHub Issues
π Fabits API Docs: See
POSTMAN_COLLECTION_README.md㪠MCP Protocol: MCP Documentation
Built with β€οΈ for the MCP ecosystem