Fabits MCP Server
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 "Deploy 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 Server show 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
Available Tools
26 toolsfabits_cancel_sipC
Cancel an active SIP.
Inputs: user_id (required), sip_registration_number (required).
fabits_check_payment_statusC
Check payment status for an order.
Inputs: user_id (required), order_number (required), max_attempts, interval_seconds.
fabits_complete_lumpsum_upiC
Complete UPI lumpsum investment after OTP verification.
Inputs: user_id (required), scheme_code (required), amount (required), upi_id (required), +1 more.
fabits_get_action_plansC
Get user action plans.
Inputs: user_id (required).
fabits_get_basket_holdingsC
Get basket holdings.
Inputs: user_id (required).
fabits_get_fund_detailsC
Get comprehensive deep-dive details about a specific mutual fund.
Inputs: user_id (required), fund_id (required).
fabits_get_portfolioC
Get complete portfolio overview.
Inputs: user_id (required).
fabits_get_sipsC
Get all active and inactive SIPs.
Inputs: user_id (required).
fabits_get_star_fundsC
Get Fabits curated top recommended mutual funds.
Inputs: user_id (required).
fabits_get_transactionsC
Get transaction history.
Inputs: user_id (required), limit.
fabits_invest_basketC
Invest in a basket of funds.
Inputs: user_id (required), basket_id (required), amount (required).
fabits_invest_basket_onetimeC
Invest in action plan via one-time lumpsum.
Inputs: user_id (required), plan_id (required), amount (required), upi_id (required), +1 more.
fabits_invest_basket_sipC
Invest in action plan via SIP.
Inputs: user_id (required), plan_id (required), sip_amount (required), sip_date (required), +2 more.
fabits_invest_lumpsumC
Place a one-time lumpsum investment order.
Inputs: user_id (required), fund_id (required), amount (required).
fabits_invest_lumpsum_upiC
Initiate UPI lumpsum investment.
Inputs: user_id (required), scheme_code (required), amount (required), upi_id (required), +2 more.
fabits_logoutA
Logout and clear all stored authentication tokens. User will need to login again to use the service.
Inputs: user_id (required).
fabits_redeemC
Redeem (sell) mutual fund units.
Inputs: user_id (required), fund_id (required), units, amount, +1 more.
fabits_refresh_tokenA
Refresh expired access token using the stored refresh token. Use this when you get 401/403 errors due to token expiration.
Inputs: user_id (required).
fabits_request_otpA
Step 1 of login: Request OTP to be sent to phone number. User must call this first before verifying OTP.
Inputs: user_id (required), phone_number (required).
fabits_search_fundsB
Search for mutual funds by name, category, or keywords. Returns top matching funds with key metrics.
Inputs: user_id (required), query (required), limit.
fabits_send_transactional_otpC
Send transactional OTP for investment.
Inputs: user_id (required), phone_number (required), email (required).
fabits_setup_basket_mandateC
Setup e-mandate for action plan SIP.
Inputs: user_id (required), plan_id (required), phone_number (required), email (required), +5 more.
fabits_start_sipC
Start a Systematic Investment Plan (SIP).
Inputs: user_id (required), fund_id (required), monthly_amount (required), sip_date (required), +1 more.
fabits_statusC
Check current authentication status and account details including KYC status.
Inputs: user_id (required).
fabits_verify_otpA
Step 2 of login: Verify OTP and complete login. Stores authentication token for subsequent requests. Must call fabits_request_otp first.
Inputs: user_id (required), phone_number (required), otp (required).
fabits_verify_transactional_otpC
Verify transactional OTP.
Inputs: user_id (required), phone_number (required), otp (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogā¦
TDQS
Scored across 26 tools
Most tools have distinct purposes targeting specific actions like login, investment, portfolio management, and SIP handling, with clear boundaries. However, some potential overlap exists between fabits_invest_lumpsum and fabits_invest_lumpsum_upi, as both handle lumpsum investments but differ in payment method, which could cause minor confusion if not carefully read.
All tool names follow a consistent fabits_verb_noun pattern with snake_case, such as fabits_get_portfolio and fabits_invest_lumpsum. This uniformity makes the tool set predictable and easy to navigate, with no deviations in naming conventions.
With 26 tools, the count is on the higher side for a mutual fund investment server, potentially feeling heavy. While it covers many operations, some tools like fabits_invest_basket and fabits_invest_basket_onetime might be consolidated, suggesting a borderline appropriateness for the scope.
The tool set provides comprehensive coverage for mutual fund investment, including authentication (login/logout/token refresh), fund search and details, portfolio and SIP management, investment orders (lumpsum and SIP), redemption, and transaction handling. No obvious gaps are present, ensuring agents can handle full workflows without dead ends.
Related MCP Connectors
Research Indian mutual funds and manage consent-based portfolio tracking records.
India's financial MCP ā cards, loans, FDs, insurance, MFs; EMI/SIP/tax calcs; NAV lookup; RAG.
Connect brokerage accounts to AI assistants: holdings, orders, asset lookup, and approved trading.
Personal finance by conversation: expenses, receipts, statement import, budgets, net worth.