MCP Server: Developer Integration
This guide shows how to call the finlight MCP server from your own code. Use it to build AI applications, automate news retrieval or connect financial news to your own systems.
The MCP tools use API v3. search_articles takes the same fields as POST /v3/articles/search, and every tool returns v3 JSON, for example the article object. The URL, the login and the headers stay the same, so existing connections keep working.
Server Information
| Environment | URL |
|---|---|
| Production | https://mcp.finlight.me |
The server implements MCP (Model Context Protocol) with JSON-RPC 2.0 over HTTP.
Authentication
Every request to the MCP endpoint needs your API key, also initialize and tools/list. Send it as a Bearer token:
Authorization: Bearer YOUR_API_KEY
You can also send it in the x-api-key header, for example from a server or a container without a browser:
x-api-key: YOUR_API_KEY
For clients that use OAuth (like Claude Desktop), the server implements OAuth 2.0 with PKCE. See OAuth Flow.
Quick Start
Using cURL
List the available tools:
curl -X POST https://mcp.finlight.me \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/list"
}'
Search for NVIDIA earnings news:
curl -X POST https://mcp.finlight.me \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "search_articles",
"arguments": {
"tickers": ["NVDA"],
"eventTypes": ["earnings"],
"limit": 10
}
}
}'
Using TypeScript
import { Client } from '@modelcontextprotocol/sdk/client/index.js'
import { StreamableHTTPClientTransport } from '@modelcontextprotocol/sdk/client/streamableHttp.js'
const transport = new StreamableHTTPClientTransport(new URL('https://mcp.finlight.me'), {
requestInit: {
headers: {
Authorization: `Bearer ${process.env.FINLIGHT_API_KEY}`,
},
},
})
const client = new Client({
name: 'my-app',
version: '1.0.0',
})
await client.connect(transport)
// List the available tools
const tools = await client.listTools()
console.log('Available tools:', tools)
// Search articles
const result = await client.callTool({
name: 'search_articles',
arguments: {
query: 'Federal Reserve interest rates',
from: '2026-11-01',
limit: 5,
},
})
// The tool answers with one text item that holds JSON
const [item] = result.content as { type: 'text'; text: string }[]
const page = JSON.parse(item.text)
console.log('Articles:', page.articles)
Using Python
import json
import os
import requests
API_KEY = os.environ["FINLIGHT_API_KEY"]
MCP_URL = "https://mcp.finlight.me"
def mcp_request(method: str, params: dict | None = None):
response = requests.post(
MCP_URL,
headers={
"Content-Type": "application/json",
"Authorization": f"Bearer {API_KEY}",
},
json={
"jsonrpc": "2.0",
"id": 1,
"method": method,
"params": params or {},
},
)
return response.json()
# List the available tools
tools = mcp_request("tools/list")
print("Available tools:", json.dumps(tools, indent=2))
# Search articles
answer = mcp_request("tools/call", {
"name": "search_articles",
"arguments": {
"tickers": ["TSLA"],
"from": "2026-11-01",
"include": ["companies", "events"],
"limit": 10,
},
})
page = json.loads(answer["result"]["content"][0]["text"])
for article in page["articles"]:
print(article["publishedAt"], article["title"])
Available Tools
The server has five tools. Each one makes one request to the finlight API with your key.
| Tool | What it does | API request |
|---|---|---|
search_articles | Search articles with a query and filters | POST /v3/articles/search |
get_article | Get one article by its finlight id | GET /v3/articles/{id} |
get_article_by_link | Get one article by its URL | GET /v3/articles/by-link |
search_companies | Look up companies by ticker, name or ISIN | GET /v3/companies |
list_sources | List all news sources | GET /v3/sources |
Every tool answers with one text item. The text is JSON with the data of the API request. The sections below show the shape for each tool.
search_articles
Search financial news articles. The fields are the same as in Search articles, which also explains how the filters combine. Every field is optional.
Parameters:
| Parameter | Type | Description |
|---|---|---|
query | string | Query in the query language: AND, OR, NOT, brackets, phrases and fields such as {ticker:NVDA AND eventType:earnings}. Curly braces tie conditions to the same company or event, for example {ticker:TSLA AND role:defendant}. |
tickers | string[] | Articles about these companies, for example ["AAPL", "NVDA"]. Vendor notations like 000660.KS work. See Tickers & exchanges. |
sources | string[] | Only these source domains, for example ["www.reuters.com"] |
optInSources | string[] | Add these sources to your default sources |
excludeSources | string[] | Leave out these sources |
sourceTypes | string[] | Only these source types, for example newswire or press_release |
excludeSourceTypes | string[] | Leave out these source types |
from | string | Start of the date range (YYYY-MM-DD or ISO 8601). Applies to the orderBy timestamp. |
to | string | End of the date range (YYYY-MM-DD or ISO 8601) |
languages | string[] | ISO 639-1 codes. Default ["en"]. |
countries | string[] | Countries the story is about, ISO 3166-1 alpha-2 in upper case (US) |
categories | string[] | Article categories, for example markets or technology |
roles | string[] | Role of a tagged company, for example acquirer, target or defendant |
minRelevance | number | Minimum relevance of a tagged company, from 0 to 1 |
eventTypes | string[] | Event types, for example earnings, mna or guidance |
eventDirections | string[] | positive, negative, neutral, unclear |
minImportance | string | low, medium, high or critical |
sectors | string[] | Sector of a tagged company, for example Technology |
companyCountries | string[] | Country where a tagged company is based, ISO 3166-1 alpha-2 |
exchanges | string[] | Exchange of a tagged company's primary listing, as MIC (XNAS) |
orderBy | string | publishedAt (default), firstSeenAt, revisedAt or availableAt |
order | string | desc (default, newest first) or asc |
limit | number | Articles per page, 1 to 100. Default 20. |
cursor | string | pagination.nextCursor of the previous result, for the next page |
include | string[] | Extra blocks per article: companies, events |
Example Request: M&A news where AMD is the buyer.
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "search_articles",
"arguments": {
"tickers": ["AMD"],
"roles": ["acquirer"],
"eventTypes": ["mna"],
"from": "2026-09-01",
"include": ["companies", "events"],
"limit": 5
}
}
}
Example Response: the tool returns one text item with JSON:
{
"jsonrpc": "2.0",
"result": {
"content": [{
"type": "text",
"text": "{\"articles\":[{\"id\":\"pXhK9f2aQ1mZ0bT7cY3rLw\",\"title\":\"AMD to buy ZT Systems\", ...}],\"pagination\":{...}}"
}]
},
"id": 1
}
The text, formatted and shortened:
{
"articles": [
{
"id": "pXhK9f2aQ1mZ0bT7cY3rLw",
"link": "https://www.reuters.com/markets/amd-zt-systems",
"source": { "domain": "www.reuters.com", "type": "newswire" },
"title": "AMD to buy ZT Systems",
"summary": "AMD agreed to buy server maker ZT Systems ...",
"language": "en",
"publishedAt": "2026-09-18T12:01:03.000Z",
"firstSeenAt": "2026-09-18T12:01:41.000Z",
"availableAt": "2026-09-18T12:03:05.000Z",
"countries": ["US"],
"categories": ["markets"],
"sentiment": { "label": "positive", "confidence": 0.98 },
"companies": [
{
"companyId": 13,
"name": "Advanced Micro Devices, Inc.",
"primaryListing": { "ticker": "AMD", "mic": "XNAS", "country": "US" },
"role": "acquirer",
"relevance": 0.95
},
{
"companyId": 90412,
"name": "ZT Systems",
"primaryListing": null,
"role": "target",
"relevance": 0.9
}
],
"events": [
{ "type": "mna", "direction": "positive", "importance": "high", "confidence": 0.9, "companyIds": [13, 90412] }
]
}
],
"pagination": { "limit": 5, "returned": 1, "hasMore": false, "nextCursor": null }
}
Every field of an article is described on The Article Object. sentiment, companies and events depend on your plan, see Plans & entitlements.
Next page: call search_articles again with the same arguments and cursor set to pagination.nextCursor. On the last page nextCursor is null. See Pagination.
get_article
Get one article by its finlight id, the id field of a search result. Use it to load more blocks for a search hit.
For an older article, the id lookup can answer not_found. Then call get_article_by_link with the link of the search hit. The link lookup reaches every article.
Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | Yes | The article id, 22 characters |
include | string[] | No | Extra blocks: companies, events |
Example Request:
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "get_article",
"arguments": {
"id": "pXhK9f2aQ1mZ0bT7cY3rLw",
"include": ["events", "companies"]
}
}
}
The text of the answer is the article object.
get_article_by_link
Get one article by its URL.
Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
link | string | Yes | The full URL of the article |
include | string[] | No | Extra blocks: companies, events |
Example Request:
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "get_article_by_link",
"arguments": {
"link": "https://www.reuters.com/technology/example-article",
"include": ["companies"]
}
}
}
The text of the answer is the article object.
search_companies
Look up companies in finlight's company data by ticker, name, ISIN or vendor notation, for example NVDA, Samsung Electronics, US0079031078, 000660.KS or XNAS:AMD. The assistant can then search articles with companyId:<id> in the query. Needs a plan with company data.
Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
q | string | Yes | Ticker, name, ISIN or vendor notation, at most 200 characters |
mic | string | No | Keep only companies listed on this exchange, as MIC (XNAS) or alias (NASDAQ) |
Example Request:
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "search_companies",
"arguments": {
"q": "000660.KS"
}
}
}
The text of the answer is {"companies": [...]} with up to 10 companies, best match first. Each company has companyId, name, country, sector, industry, isins, primaryListing, listings and updatedAt. See The company record.
list_sources
Get all news sources you can use.
Parameters: none
Example Request:
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "list_sources",
"arguments": {}
}
}
The text of the answer is a JSON array of sources. Each source has:
domain: the source's domain, the value forsources,optInSourcesandexcludeSourcesname: the display nametype: the source type, the value forsourceTypesandexcludeSourceTypesisDefault: whether the source is searched without naming itisCustom: whether it is a custom source granted to youcountryandlanguages
Sources with isDefault: false are added to a search with optInSources. See Sources.
MCP Protocol Methods
The server implements these MCP methods:
| Method | Description |
|---|---|
initialize | Start the MCP session |
notifications/initialized | Confirm that initialization is complete |
tools/list | List the available tools and their schemas |
tools/call | Run a tool with arguments |
ping | Health check |
Initialize Example:
{
"jsonrpc": "2.0",
"id": 1,
"method": "initialize",
"params": {
"protocolVersion": "2024-11-05",
"capabilities": {},
"clientInfo": {
"name": "my-client",
"version": "1.0.0"
}
}
}
Response:
{
"jsonrpc": "2.0",
"result": {
"protocolVersion": "2024-11-05",
"capabilities": {
"tools": {}
},
"serverInfo": {
"name": "finlight-news-api",
"version": "2.0.0"
}
},
"id": 1
}
OAuth Flow
For clients that support OAuth (like Claude Desktop), the server implements OAuth 2.0 with PKCE.
Endpoints
| Endpoint | Method | Description |
|---|---|---|
/.well-known/oauth-protected-resource | GET | Protected resource metadata |
/.well-known/oauth-authorization-server | GET | Authorization server metadata |
/register | POST | Dynamic client registration |
/authorize | GET | Authorization page |
/authorize/submit | POST | Process the authorization |
/token | POST | Exchange the code for a token |
Flow Overview
1. The client finds the OAuth endpoints through .well-known
2. The client can register through /register
3. The client sends the user to /authorize with a PKCE challenge
4. The user enters an API key and submits
5. The server redirects back with an authorization code
6. The client exchanges code + verifier for an access token
7. The client uses the access token as Bearer token for tool calls
Security Features
- PKCE required: prevents interception of the authorization code
- Encrypted codes: authorization codes are encrypted (AES-256-GCM), so the server keeps no state
- Short-lived codes: a code expires after 120 seconds
- Redirect URI check: a code only works with the redirect URI it was issued for
Error Handling
Tool Errors
When a tool call fails for a reason the assistant can fix, the answer is a normal tool result with isError: true. Its text is JSON and always has error. Errors from the API add status and message, and issues when single fields are wrong. The assistant reads the reason and can change its call, for example fix a parameter or leave out a filter.
{
"jsonrpc": "2.0",
"result": {
"isError": true,
"content": [{
"type": "text",
"text": "{\"error\":\"forbidden\",\"status\":403,\"message\":\"Company master data requires the entityAccess entitlement.\"}"
}]
},
"id": 1
}
error | status | When |
|---|---|---|
invalid_arguments | none | An argument the tool does not know, a value of the wrong type, or a value out of range (limit 1 to 100, minRelevance 0 to 1, an empty id, link or q, a q over 200 characters). Has only error and issues; issues names the argument. The server answers before it calls the API, so this costs no credit. |
validation | none | A value that is checked before the request is sent, for example an empty languages list, an empty cursor or more than 3 include values. Answered before the API is called. |
validation_failed | 400 | The API rejected a value, for example an unknown field in query. issues names the field. |
cursor_invalid | 400 | The cursor is not a cursor from this API |
cursor_mismatch | 400 | The sort or the filters changed between pages. limit and include may change. |
unauthorized | 401 | The API key is wrong or was deleted |
forbidden | 403 | Your plan does not include this, for example search_companies without company data |
not_found | 404 | No article with this id or link, or the article is outside your plan's date range. For an older article, use get_article_by_link. |
rate_limited | 429 | Burst limit or monthly credits reached |
internal_error | 500 | Something went wrong on our side |
timeout, network | none | The API did not answer in time. Call again. |
The status values and their causes are the same as in the REST API, see Errors.
A block your plan does not include (such as companies or events) is left out of the article, without an error. See Plans & entitlements.
JSON-RPC Error Codes
| Code | When |
|---|---|
| -32700 | The request body is not valid JSON |
| -32600 | jsonrpc is not "2.0", or method is missing |
| -32601 | Unknown method |
| -32602 | tools/call without a tool name, or with an unknown tool name |
| -32001 | No API key. Without a key the server answers with HTTP 401 and points to the OAuth metadata. |
| -32603 | An unexpected failure. The message says why. |
An empty request body is answered with HTTP 400 and {"error":"Request body is required"}, not with a JSON-RPC error.
{
"jsonrpc": "2.0",
"error": {
"code": -32602,
"message": "Unknown tool: search_news"
},
"id": 1
}
Rate Limits
Every tool call is one API request with your key, so the same limits apply as in the API. Each call of search_articles, get_article, get_article_by_link, search_companies and list_sources costs 1 credit. Each further page of a search costs 1 credit too. An assistant that looks up a company before it searches uses 2 credits for that question.
Calls that end in an API error cost 1 credit as well, as in the API. The exceptions, such as a wrong key, are listed on Rate limits & credits. When a limit is reached, the tool answers with rate_limited and status 429.
Check your usage and limits at app.finlight.me.
Support
- Documentation: docs.finlight.me
- Dashboard: app.finlight.me
- Support: Contact us