LinqAlpha MCP
curl --request POST \
--url https://api.eu.linqalpha.com/v1/mcp \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '
{
"jsonrpc": "2.0",
"id": 123,
"params": {}
}
'import requests
url = "https://api.eu.linqalpha.com/v1/mcp"
payload = {
"jsonrpc": "2.0",
"id": 123,
"params": {}
}
headers = {
"X-API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({jsonrpc: '2.0', id: 123, params: {}})
};
fetch('https://api.eu.linqalpha.com/v1/mcp', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.eu.linqalpha.com/v1/mcp",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'jsonrpc' => '2.0',
'id' => 123,
'params' => [
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-KEY: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.eu.linqalpha.com/v1/mcp"
payload := strings.NewReader("{\n \"jsonrpc\": \"2.0\",\n \"id\": 123,\n \"params\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-KEY", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.eu.linqalpha.com/v1/mcp")
.header("X-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"jsonrpc\": \"2.0\",\n \"id\": 123,\n \"params\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.eu.linqalpha.com/v1/mcp")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"jsonrpc\": \"2.0\",\n \"id\": 123,\n \"params\": {}\n}"
response = http.request(request)
puts response.read_body{
"jsonrpc": "2.0",
"id": 123,
"result": {},
"error": {
"code": 123,
"message": "<string>"
}
}MCP
LinqAlpha MCP
LinqAlpha MCP gives AI assistants direct access to institutional-grade financial data for fundamental research. Through the Model Context Protocol (MCP), your AI can query company fundamentals, earnings estimates, stock prices, economic indicators, SEC filings, and earnings transcripts — all from a single endpoint.
Supports JSON-RPC 2.0 protocol.
Available methods:
initialize— Initialize MCP sessionping— Health checktools/list— List available financial data toolstools/call— Execute a financial data tool
Setup (Claude Desktop):
{
"mcpServers": {
"linqalpha": {
"url": "https://api.eu.linqalpha.com/v1/mcp",
"headers": { "x-api-key": "<your-api-key>" }
}
}
}
POST
/
v1
/
mcp
LinqAlpha MCP
curl --request POST \
--url https://api.eu.linqalpha.com/v1/mcp \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '
{
"jsonrpc": "2.0",
"id": 123,
"params": {}
}
'import requests
url = "https://api.eu.linqalpha.com/v1/mcp"
payload = {
"jsonrpc": "2.0",
"id": 123,
"params": {}
}
headers = {
"X-API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({jsonrpc: '2.0', id: 123, params: {}})
};
fetch('https://api.eu.linqalpha.com/v1/mcp', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.eu.linqalpha.com/v1/mcp",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'jsonrpc' => '2.0',
'id' => 123,
'params' => [
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-KEY: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.eu.linqalpha.com/v1/mcp"
payload := strings.NewReader("{\n \"jsonrpc\": \"2.0\",\n \"id\": 123,\n \"params\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-KEY", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.eu.linqalpha.com/v1/mcp")
.header("X-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"jsonrpc\": \"2.0\",\n \"id\": 123,\n \"params\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.eu.linqalpha.com/v1/mcp")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"jsonrpc\": \"2.0\",\n \"id\": 123,\n \"params\": {}\n}"
response = http.request(request)
puts response.read_body{
"jsonrpc": "2.0",
"id": 123,
"result": {},
"error": {
"code": 123,
"message": "<string>"
}
}Overview
LinqAlpha MCP gives AI assistants direct access to institutional-grade financial data for fundamental research. Through the Model Context Protocol, your AI (Claude, Cursor, etc.) can query company fundamentals, earnings estimates, stock prices, economic indicators, SEC filings, and earnings transcripts — all from a single endpoint.Quick Start
If you already have an existing API key, you must request a new key with MCP permissions enabled. Existing keys issued before the MCP endpoint release do not have MCP access. Contact support@linqalpha.com to request a new key.
{
"mcpServers": {
"linqalpha": {
"url": "https://api.eu.linqalpha.com/v1/mcp",
"headers": { "x-api-key": "<your-api-key>" }
}
}
}
claude mcp add linqalpha \
--transport http \
--url https://api.eu.linqalpha.com/v1/mcp \
--header "x-api-key: <your-api-key>"
{
"mcpServers": {
"linqalpha": {
"url": "https://api.eu.linqalpha.com/v1/mcp",
"headers": { "x-api-key": "<your-api-key>" }
}
}
}
Use via Completion API
You can use LinqAlpha MCP tools directly from any LLM completion API (OpenAI, Anthropic, etc.) by making standard HTTP requests to our MCP endpoint. This lets you integrate LinqAlpha’s financial data tools into your own AI workflows and applications.Step 1: List Available Tools
First, fetch the tool definitions to get their names and input schemas:Python
import requests
MCP_URL = "https://api.eu.linqalpha.com/v1/mcp"
HEADERS = {
"Content-Type": "application/json",
"x-api-key": "<your-api-key>"
}
# List all available tools
response = requests.post(MCP_URL, headers=HEADERS, json={
"jsonrpc": "2.0",
"id": 1,
"method": "tools/list",
"params": {}
})
tools = response.json()["result"]["tools"]
Step 2: Convert to OpenAI Tool Format
Transform MCP tool definitions into the format expected by OpenAI’s API:Python
def mcp_to_openai_tools(mcp_tools):
"""Convert MCP tool definitions to OpenAI function calling format."""
openai_tools = []
for tool in mcp_tools:
openai_tools.append({
"type": "function",
"function": {
"name": tool["name"],
"description": tool["description"],
"parameters": tool["inputSchema"]
}
})
return openai_tools
openai_tools = mcp_to_openai_tools(tools)
Step 3: Chat with Tool Calling
Use the converted tools in your OpenAI completion request, then execute any tool calls against LinqAlpha MCP:Python
from openai import OpenAI
import json
client = OpenAI()
messages = [
{"role": "user", "content": "What was NVIDIA's revenue for the last 4 quarters?"}
]
# 1. Send request with tools
response = client.chat.completions.create(
model="gpt-4o",
messages=messages,
tools=openai_tools,
)
message = response.choices[0].message
# 2. If the model calls a tool, execute it via LinqAlpha MCP
if message.tool_calls:
messages.append(message)
for tool_call in message.tool_calls:
# Execute tool call against LinqAlpha MCP
mcp_response = requests.post(MCP_URL, headers=HEADERS, json={
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": tool_call.function.name,
"arguments": json.loads(tool_call.function.arguments)
}
})
tool_result = mcp_response.json()["result"]["content"][0]["text"]
messages.append({
"role": "tool",
"tool_call_id": tool_call.id,
"content": tool_result
})
# 3. Get final response with tool results
final_response = client.chat.completions.create(
model="gpt-4o",
messages=messages,
tools=openai_tools,
)
print(final_response.choices[0].message.content)
This pattern works with any LLM that supports function/tool calling — including Anthropic Claude API, Google Gemini, and open-source models. Just adapt the tool format conversion for your provider.
Available Tools
LinqAlpha exposes 20 financial data tools organized by category.Fundamentals & Estimates
| Tool | Description |
|---|---|
fundamentals_data_query | Query financial datasets including fundamentals, estimates, and ownership data |
fundamentals_data_docs | Browse financial data schema documentation and available fields |
stock_prices | Get historical and real-time stock price data |
Economic Data
| Tool | Description |
|---|---|
economic_data_query | Query macroeconomic data (GDP, CPI, employment, Treasury yields, VIX, and more) |
economic_indicators | List available economic indicators grouped by category |
economic_indicator_data | Get economic indicator time series data (GDP, CPI, unemployment) |
economic_calendar | Get upcoming economic data release schedule |
Market Data
| Tool | Description |
|---|---|
forex_rates | Get foreign exchange currency pair rates and history |
commodity_prices | Get commodity market data (energy, metals, grains, softs) |
treasury_rates | Get US Treasury yield curve data across all maturities (1M-30Y) |
market_symbols | List available market symbols for forex, commodities, and economic indicators |
market_risk_premium | Get country-level market risk premium for CAPM calculations |
Equity & Search
| Tool | Description |
|---|---|
equity_database_query | Query equity market database (stocks, events, documents) |
transcript_search | Full-text search across earnings call transcripts and SEC filings. Requires a Manticore SQL query in the sql parameter (not natural language). Call read_guide('data/manticore') for the SQL dialect and schema |
Research & Citations
| Tool | Description |
|---|---|
cite_filing_source | Create a citation for a filing/transcript excerpt found via transcript_search. Requires chat_session_id (from create_research_session) and chunk_id (the id field of a transcript_search result). This tool does not search — run transcript_search first |
cite_web_source | Create a web-based research citation |
create_research_session | Create a new research session for citation tracking |
get_citations | Retrieve all citations created in the current research session |
web_search | Search the web with date range filtering for recent financial news and analysis |
Platform
| Tool | Description |
|---|---|
my_platform_data | Query your organization’s LinqAlpha platform data |
list_guides | List available financial data guides and documentation |
read_guide | Read a specific financial data guide |
Protocol
This endpoint implements JSON-RPC 2.0 over HTTP, following the MCP specification.Supported Methods
| Method | Description |
|---|---|
initialize | Initialize MCP session and receive server capabilities |
ping | Health check |
notifications/initialized | Client notification after initialization |
tools/list | List all available tools with their input schemas |
tools/call | Execute a tool with the given arguments |
Example: List Tools
Request
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/list",
"params": {}
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"tools": [
{
"name": "stock_prices",
"description": "Get historical and real-time stock price data",
"inputSchema": { ... }
}
]
}
}
Example: Call a Tool
Request
{
"jsonrpc": "2.0",
"id": 2,
"method": "tools/call",
"params": {
"name": "fundamentals_data_query",
"arguments": {
"sql": "SELECT ticker, revenue, net_income FROM financials WHERE ticker = 'AAPL' ORDER BY date DESC LIMIT 4"
}
}
}
Response
{
"jsonrpc": "2.0",
"id": 2,
"result": {
"content": [
{
"type": "text",
"text": "Query returned 4 rows..."
}
]
}
}
Rate Limits
- 60 requests per minute per user
- Exceeding the limit returns a JSON-RPC error with code
-32000
Error Codes
| Code | Meaning |
|---|---|
-32600 | Invalid JSON-RPC request |
-32601 | Method not found |
-32602 | Invalid params (e.g., unknown tool name) |
-32603 | Internal server error |
-32000 | Rate limit exceeded |
Authorizations
Body
application/json
JSON-RPC version
Available options:
2.0 MCP method to invoke
Available options:
initialize, ping, notifications/initialized, tools/list, tools/call Request identifier
Method-specific parameters. For tools/call: { name: string, arguments: object }