MCP Server
Access the official remote MCP server for fcontext market data.Overview
Your AI assistant can use the fcontext MCP server to access authenticated, metered market data through your fcontext account. The first version exposes tools for realtime quotes, static instrument data, calculated quote indexes, candlesticks, market news, finance calendars, and top movers. The remote MCP endpoint is:Authentication
The MCP server uses OAuth 2.1. When an interactive MCP client connects for the first time, it redirects you to sign in and approve market-data access. No API key is needed for MCP clients. The authorization server is:market_data scope.
API keys are for the HTTP Market Data API at
https://openapi.fcontext.com/api/market-data. MCP clients should use OAuth unless you are building your own server-side integration.Getting Started
Choose a client that supports remote MCP servers and add the fcontext endpoint:- Codex Desktop
- Claude / Claude Code
- Cursor
Add a remote MCP server with this URL:Complete the OAuth sign-in flow when Codex prompts you, then enable the server for chats that need market data.
MCP Tools
Once connected, your AI assistant can call these tools:| Tool | Description |
|---|---|
fcontext_get | Call a permitted fcontext market-data GET endpoint by relative path after /api/market-data. |
fcontext_quote | Fetch realtime quotes for one or more symbols. |
fcontext_static_info | Fetch static instrument information. |
fcontext_calc_index | Fetch calculated quote indexes. |
fcontext_candlestick | Fetch historical candlestick data for a symbol. |
fcontext_news | Fetch market news. |
fcontext_finance_calendar | Fetch financial calendar events. |
fcontext_top_movers | Fetch top market movers. |
Example Usage
After connecting, try asking your AI assistant:- “What is Apple’s latest quote?”
- “Show me one month of daily candlesticks for Nvidia.”
- “What are today’s top US market movers?”
- “Find recent news for Tesla.”
- “Check upcoming finance calendar events for this week.”
- “Compare static information for AAPL.US and MSFT.US.”
Troubleshooting
| Problem | What to check |
|---|---|
| Client cannot discover authorization metadata | Confirm it can reach https://openapi.fcontext.com/api/auth/.well-known/oauth-authorization-server or https://openapi.fcontext.com/.well-known/oauth-authorization-server/api/auth. |
MCP request returns 401 | Reconnect the MCP server and complete OAuth again. The response includes WWW-Authenticate with the protected resource metadata URL. |
MCP request returns 403 | The token is valid but does not include the market_data scope. Re-authorize the client. |
| Tool call fails with a path error | Use relative paths with fcontext_get, such as quote or content/news; absolute URLs and path traversal are rejected. |