ForInvest MCP Server

Access real-time and historical financial data for BIST (Borsa İstanbul) and global markets directly from Claude, Cursor, and any MCP-compatible AI application. 60 tools covering market data, financials, technical analysis, news, broker data, and more.

ℹ️ A ForInvest account is required. Create a free account →

Capabilities

  • Real-time snapshots, historical OHLCV, tick data, order book depth, supply & demand
  • Balance sheets, income statements, cash flow, quarterly ratios, financial forecasts
  • Technical indicators (RSI, MACD, Bollinger, etc.), correlation, heatmaps, server-side charts
  • Company profiles, stock splits, sector/index composition, dividend data
  • Financial news, stock analysis, economic calendar, KAP disclosures
  • Broker settlement data, short sales, investor distribution, transaction volumes
  • Analyst consensus forecasts, portfolio tracking, public offerings
  • Fund details and portfolio composition (TEFAS)

Quick Start

Connect to ForInvest MCP Server using the following URL with any MCP-compatible client:

https://mcp.forinvest.com/mcp

Transport

PropertyValue
ProtocolMCP (Model Context Protocol)
TransportStreamableHTTP
Endpointhttps://mcp.forinvest.com/mcp
AuthenticationOAuth 2.0 + PKCE
HTTP MethodsPOST (tool calls), GET (SSE), DELETE (session close)
Session TTL30 minutes (auto-renewed)

Authentication

ForInvest MCP Server uses OAuth 2.0 Authorization Code flow with PKCE (RFC 7636). Most MCP clients handle this automatically — you just enter your ForInvest username and password when prompted.

OAuth 2.0 Flow

  1. Client discovers endpoints via /.well-known/oauth-authorization-server
  2. Client registers dynamically via /oauth/register (RFC 7591)
  3. Client redirects to /authorize with PKCE code challenge (S256)
  4. User authenticates with ForInvest credentials on the login page
  5. Authorization code returned to client redirect URI
  6. Client exchanges code + code_verifier at /oauth/token
  7. Server returns access token (Bearer) valid for 1 hour

Discovery Endpoints

EndpointDescription
/.well-known/oauth-authorization-serverOAuth 2.0 server metadata
/.well-known/oauth-protected-resourceProtected resource metadata
/oauth/registerDynamic client registration
/authorizeAuthorization endpoint (login UI)
/oauth/tokenToken exchange
💡 You don't need to implement OAuth manually. MCP clients like Claude Desktop and Cursor handle the entire flow — just click "Connect" and enter your credentials.

Claude Desktop Setup

Connect ForInvest MCP Server to Claude Desktop in a few steps:

  1. Open Claude Desktop → Settings
  2. Go to Connectors → click Add custom connector
  3. Enter name: ForInvest MCP and URL: https://mcp.forinvest.com/mcp
  4. Click Connect — a browser window opens for authentication
  5. Enter your ForInvest username and password
  6. Done! Ask Claude any financial question and it will use ForInvest tools
ℹ️ Claude may ask for permission the first time it uses a tool. Click "Allow" to proceed.

Claude Code Setup

Add ForInvest MCP Server with a single terminal command:

claude mcp add forinvest --transport http https://mcp.forinvest.com/mcp

After running the command, Claude Code will prompt you to authenticate via browser when you first use a ForInvest tool.

Cursor Setup

Add ForInvest MCP Server to Cursor:

  1. Open Cursor → SettingsMCP
  2. Click Add new MCP server
  3. Select type: StreamableHTTP
  4. Enter URL: https://mcp.forinvest.com/mcp
  5. Authenticate with your ForInvest credentials when prompted

JSON Configuration

For any MCP client that supports JSON configuration, add the following to your config file:

{ "mcpServers": { "forinvest": { "url": "https://mcp.forinvest.com/mcp" } } }

Tool Reference

ForInvest MCP Server provides 60 tools organized into the following categories. All tools are read-only and non-destructive.

📊 Market Data
📊Real-Time Market DatamarketData
📊Historical Data (Date Range)historicalFromTo
📊Historical Data (Last N)historicalLast
📈Intraday DataintradayFromTo
Latest Tick DatatickLast
🔔Tick Data at LasttickAtLast
📉Order Book Depthdepths
Supply & DemandsupplyDemandLastMinutes
💰Liquidity Dataliquidity
📊Change StatisticschangeStatisticsMulti
📊Market Statisticsstatistic
📈 Technical Analysis
📊Indicator (Date Range)indicatorFromTo
📊Indicator (Last N)indicatorLast
📈Price AnalysispriceAnalysis
🔥Heat MapheatMap
📈Price Chartchart
📊Technical CharttechnicalChart
📊Stock ScreenerstockScreener
🏦 Financial Statements
📈Balance SheetsbalanceSheets
📈Income StatementsincomeStatements
💰Cash Flow StatementscashFlows
📊Last Quarter RatioslastQuarterRatios
📊Quarter Ratio MultiquarterRatioMulti
🧮Fundamental AnalysisfundamentalAnalysisLast
📅Statement DatesfinancialStatementDates
🏢 Company & Symbol Data
🏢Company InformationcompanyInfos
🪪Search SymbolsearchSymbol
🔍Flexible Symbol SearchsymbolSearchFlex
🪪Symbols by IndexsymbolsByIndex
📈Stock Change DistributionstockChangeDistribution
📰 News & Research
📰Market Newsnews
📈Stock AnalysisstockAnalysis
📅Economic CalendareconomicCalendar
🏖️Market Holidaysholidays
🏦 Broker & Settlement Data
🏦Settlement at DatesettlementAt
🏦Latest SettlementsettlementLast
📊Settlement Ratio Top/BottomsettlementRatioTopBottom
📊Short Sales AggregateshortSalesAggregateVolume
📊Short Sales BulletinshortSalesBulletinAt
🏢Investor DistributionakdAt
📔Transaction Datatransaction
🔄Special TransactionsspecialTransaction
🏦Broker DefinitionsbrokerDefinitions
🎯 Forecasts & Portfolio
🎯Forecast AveragesforecastAverages
📑Forecast by Broker/SymbolforecastByBrokerOrSymbol
🕰️Forecast HistoryforecastHistory
📊Portfolio AveragesportfolioAverages
📋Portfolio by Broker/SymbolportfolioListByBrokerOrSymbol
🔄Portfolio UpdatesportfolioUpdates
📋 Corporate Actions & Disclosures
📅Future Stock SplitsfutureSplit
✂️Split by CodesplitByCode
📊Splits (Date Range)splitFromTo
🏆Dividend ChampionsdividendChamps
📊Non-Current Asset PurchasesnonCurrentAssetPurchase
📊Non-Current Asset SalesnonCurrentAssetSale
🤝New Business RelationsnewBusinessRelation
📊All Public OfferingspublicOfferingAll
📅Public Offering CalendarpublicOfferingCalendar
📊Public Offering DetailpublicOfferingDetail
📋KAP Fund DetailskapFundDetails

Data Formats

Symbol Codes

Use standard exchange codes for symbols:

MarketExamplesFormat
BISTTHYAO, AKBNK, GARANTurkish stock codes
US EquitiesAAPL, MSFT, GOOGLCBOE/EDGX codes
FXUSDTRY, EURUSDCurrency pairs
CryptoBTCUSDT, ETHUSDTCrypto pairs
IndicesXU100, XU030BIST index codes

Date & Time Formats

FormatPatternExample
TimestampyyyyMMddHHmmss20241231235959
DateyyyyMMdd20241231
QuarterYYYY-Q2024-3 (Q1), 2024-12 (Q4)

Periods

Used in historical and indicator tools:

ValueDescription
1, 5, 15, 30, 60Minutes
1440Daily
wWeekly
mMonthly
yYearly

Supported Languages

CodeLanguage
trTurkish
enEnglish
elGreek

Error Handling

All tools return standardized MCP responses. Errors include a descriptive message and context:

Response Types

TypeDescription
SuccessValid data returned with structured JSON content
No DataQuery was valid but no results found for the given parameters
ErrorAn error occurred — message includes context about what went wrong
💡 If you receive a "session not found" error, the session has expired. Simply retry your request — the client will automatically re-establish the session.

Privacy & Security

Data Handling

  • ForInvest MCP Server acts as a pass-through to ForInvest financial data APIs. No user queries or financial data are stored on the MCP server beyond the active session.
  • Authentication tokens are session-scoped and expire after 1 hour. Sessions are automatically cleaned up after 30 minutes of inactivity.
  • All communication is encrypted via HTTPS/TLS. No data is transmitted over unencrypted channels.
  • The server does not collect, store, or share personal information beyond what is required for authentication.

Third-Party Connections

  • Foreks Cloud APIs — Financial data retrieval (market data, financials, news, forecasts)
  • Foreks Pass — Authentication and token validation
  • Foreks PubSub WebSocket — Real-time symbol definitions and snapshots

Data Retention

No financial data or user queries are persisted. Session data (transport state) is held in memory only and discarded when the session ends or the server restarts.

Contact

For privacy-related inquiries: info@forinvest.com

Support

Need help? Reach out through the following channels: