midas-mcp
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., "@midas-mcpshow me 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.
midas-mcp
An MCP server for the Midas brokerage (atlas.getmidas.com), so an AI assistant can read your portfolio and place orders on BIST and US markets.
Midas has no public API. This server drives the Atlas web app with Playwright: it keeps one authenticated browser session alive and issues the same GraphQL calls the web app itself makes, from inside the page so the session cookies are attached automatically.
This places real orders with real money. Read the safety section before using it.
Tools
Tool | Arguments | What you get |
| – | Total value in TRY, today's P/L, cash and buying power per account |
| – | Every open position: quantity, average cost, price, market value, P/L |
|
| Last price, previous close, % change, session status |
|
| Instrument name, market and description, plus current price |
|
| Places a buy order, returns the order id and status |
|
| Places a sell order, returns the order id and status |
|
| Orders still waiting to execute, with their ids |
|
| Cancels a pending order |
Omitting limit_price places a market order. Symbols are resolved by search, so both
tickers (TUCLK) and names work; BIST and US instruments are both supported.
Related MCP server: alpaca-mcp-server
Safety
Every order is checked before it reaches Midas:
Value cap — the order's estimated value is converted to TRY (Midas will quote any instrument in TRY) and refused if it exceeds
MAX_ORDER_VALUE_TRY, which defaults toOne cap therefore covers both the TRY and USD accounts.
Price band — limit prices outside the instrument's daily band are refused locally rather than bounced by the exchange.
Position check — sells larger than your sellable quantity are refused.
Fractional check — fractional quantities are refused for instruments that don't support them.
cancel_order exists so a mistake can be undone immediately. Note that BIST trades
10:00–18:00 Turkey time; orders placed outside the session queue for the next one, which
means they can be cancelled before they ever reach the exchange.
Setup
Requires Node.js 20+.
git clone https://github.com/<you>/midas-mcp.git
cd midas-mcp
npm install
npx playwright install chromium
cp .env.example .env # then fill in your credentials
npm run build.env:
MIDAS_PHONE=5XXXXXXXXX # Turkish mobile number, no country code
MIDAS_PASSWORD=your-password
MAX_ORDER_VALUE_TRY=5000 # refuse any order estimated above this, in TRY
HEADLESS=true.env and the browser profile in .midas-session/ are both gitignored — they hold your
credentials and session cookies, so keep them out of version control.
First login
Midas requires approving a push notification in the Midas mobile app, so the first login has to be interactive:
npm run login # opens a visible browser, then approve the prompt on your phoneThe session is saved to .midas-session/ and reused afterwards, so this is a one-off
until the session expires. Only one process can use that profile at a time — stop the
MCP server before running npm run login.
Verify it works:
npm run smoke # prints your portfolio, positions and a quoteRegister with Claude Code
claude mcp add midas -- node /absolute/path/to/midas-mcp/dist/index.jsOr, for any MCP client that reads a JSON config:
{
"mcpServers": {
"midas": {
"command": "node",
"args": ["/absolute/path/to/midas-mcp/dist/index.js"]
}
}
}How it works
src/session.ts launches a persistent Chromium profile and handles login. Auth is
entirely cookie-based, so src/api.ts runs each GraphQL request via page.evaluate
inside the authenticated page rather than reimplementing the token flow.
Two details are easy to miss when working on this:
The API gateway requires an
x-midas-ridheader. It is a stable per-profile request id generated by the web app, so the session observes it on the app's own requests instead of trying to recompute it.The gateway routes on
x-apollo-operation-name, which must be the root field name, not the operation name. When a document's first selection is an alias (as inOverviewAllPositions), the real field name has to be passed explicitly.
Headless Chromium is rejected with a 403 unless it presents a normal user agent and
client hints; session.ts sets these.
scripts/ holds the tooling used to map the API, kept for when Midas changes it:
browser-daemon.ts (logging browser with a CDP port), analyze.ts (summarise captured
GraphQL traffic), dump-panel-bundles.ts (download lazy-loaded chunks), and
extract-ops.ts / extract-document.ts (recover GraphQL documents from the minified
bundle's embedded AST — introspection is disabled server-side).
Verifying trading end-to-end
src/order-test.ts places one real single-share order and cancels it immediately. It
also checks that the value cap rejects an oversized order. It refuses to run without an
explicit confirmation:
CONFIRM_REAL_ORDER=yes node dist/order-test.js CANTE 1.08 BUY
CONFIRM_REAL_ORDER=yes node dist/order-test.js TUCLK 4.04 SELLPick a limit price at the far end of the daily band so the order cannot fill, and run it while the market is closed for extra margin.
Disclaimer
Unofficial, not affiliated with or endorsed by Midas. It depends on undocumented internal endpoints that can change without notice. You are responsible for every order it places. Use at your own risk.
License
MIT
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseBqualityCmaintenanceEnables AI assistants to interact with Interactive Brokers trading accounts to retrieve market data, check positions, and place trades. Includes pre-configured IB Gateway and handles OAuth authentication automatically.Last updated14269202MIT
- Alicense-qualityDmaintenanceEnables natural language trading operations for stocks, options, crypto, and portfolio management via Alpaca's Trading API through AI assistants.Last updatedMIT
- AlicenseAqualityBmaintenanceEnables AI assistants to interact with BCS brokerage accounts for portfolio viewing, quotes, order book, candles, position analysis, and rebalancing planning using natural language, with read-only mode by default and optional trade execution with confirmation.Last updated15351Apache 2.0
- Alicense-qualityCmaintenanceEnables AI assistants to read a Trading 212 portfolio (balances, positions, orders, history) and place trades via the public API, supporting both demo and live environments.Last updatedMIT
Related MCP Connectors
Connect AI agents to bank accounts, transactions, balances, and investments.
Connect your Necton account to AI via Brazil's Open Finance: balances, statements, cards, investment
Provide AI assistants with real-time access to official SEC EDGAR filings and financial data. Enab…
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/ahmetdenizyilmaz/midas-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server