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.
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
| Property | Value |
|---|---|
| Protocol | MCP (Model Context Protocol) |
| Transport | StreamableHTTP |
| Endpoint | https://mcp.forinvest.com/mcp |
| Authentication | OAuth 2.0 + PKCE |
| HTTP Methods | POST (tool calls), GET (SSE), DELETE (session close) |
| Session TTL | 30 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
- Client discovers endpoints via
/.well-known/oauth-authorization-server - Client registers dynamically via
/oauth/register(RFC 7591) - Client redirects to
/authorizewith PKCE code challenge (S256) - User authenticates with ForInvest credentials on the login page
- Authorization code returned to client redirect URI
- Client exchanges code + code_verifier at
/oauth/token - Server returns access token (Bearer) valid for 1 hour
Discovery Endpoints
| Endpoint | Description |
|---|---|
/.well-known/oauth-authorization-server | OAuth 2.0 server metadata |
/.well-known/oauth-protected-resource | Protected resource metadata |
/oauth/register | Dynamic client registration |
/authorize | Authorization endpoint (login UI) |
/oauth/token | Token exchange |
Claude Desktop Setup
Connect ForInvest MCP Server to Claude Desktop in a few steps:
- Open Claude Desktop → Settings
- Go to Connectors → click Add custom connector
- Enter name:
ForInvest MCPand URL:https://mcp.forinvest.com/mcp - Click Connect — a browser window opens for authentication
- Enter your ForInvest username and password
- Done! Ask Claude any financial question and it will use ForInvest tools
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:
- Open Cursor → Settings → MCP
- Click Add new MCP server
- Select type: StreamableHTTP
- Enter URL:
https://mcp.forinvest.com/mcp - 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.
Data Formats
Symbol Codes
Use standard exchange codes for symbols:
| Market | Examples | Format |
|---|---|---|
| BIST | THYAO, AKBNK, GARAN | Turkish stock codes |
| US Equities | AAPL, MSFT, GOOGL | CBOE/EDGX codes |
| FX | USDTRY, EURUSD | Currency pairs |
| Crypto | BTCUSDT, ETHUSDT | Crypto pairs |
| Indices | XU100, XU030 | BIST index codes |
Date & Time Formats
| Format | Pattern | Example |
|---|---|---|
| Timestamp | yyyyMMddHHmmss | 20241231235959 |
| Date | yyyyMMdd | 20241231 |
| Quarter | YYYY-Q | 2024-3 (Q1), 2024-12 (Q4) |
Periods
Used in historical and indicator tools:
| Value | Description |
|---|---|
1, 5, 15, 30, 60 | Minutes |
1440 | Daily |
w | Weekly |
m | Monthly |
y | Yearly |
Supported Languages
| Code | Language |
|---|---|
tr | Turkish |
en | English |
el | Greek |
Error Handling
All tools return standardized MCP responses. Errors include a descriptive message and context:
Response Types
| Type | Description |
|---|---|
| Success | Valid data returned with structured JSON content |
| No Data | Query was valid but no results found for the given parameters |
| Error | An error occurred — message includes context about what went wrong |
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:
- Email: info@forinvest.com
- Website: www.forinvest.com
- Account registration: Create a ForInvest account