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.


INFOEndpoints

Server Information

EnvironmentURL
Productionhttps://mcp.finlight.me

The server implements MCP (Model Context Protocol) with JSON-RPC 2.0 over HTTP.


AUTHAPI Key

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.


QUICKSTARTExamples

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"])

TOOLSReference

Available Tools

The server has five tools. Each one makes one request to the finlight API with your key.

ToolWhat it doesAPI request
search_articlesSearch articles with a query and filtersPOST /v3/articles/search
get_articleGet one article by its finlight idGET /v3/articles/{id}
get_article_by_linkGet one article by its URLGET /v3/articles/by-link
search_companiesLook up companies by ticker, name or ISINGET /v3/companies
list_sourcesList all news sourcesGET /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:

ParameterTypeDescription
querystringQuery 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}.
tickersstring[]Articles about these companies, for example ["AAPL", "NVDA"]. Vendor notations like 000660.KS work. See Tickers & exchanges.
sourcesstring[]Only these source domains, for example ["www.reuters.com"]
optInSourcesstring[]Add these sources to your default sources
excludeSourcesstring[]Leave out these sources
sourceTypesstring[]Only these source types, for example newswire or press_release
excludeSourceTypesstring[]Leave out these source types
fromstringStart of the date range (YYYY-MM-DD or ISO 8601). Applies to the orderBy timestamp.
tostringEnd of the date range (YYYY-MM-DD or ISO 8601)
languagesstring[]ISO 639-1 codes. Default ["en"].
countriesstring[]Countries the story is about, ISO 3166-1 alpha-2 in upper case (US)
categoriesstring[]Article categories, for example markets or technology
rolesstring[]Role of a tagged company, for example acquirer, target or defendant
minRelevancenumberMinimum relevance of a tagged company, from 0 to 1
eventTypesstring[]Event types, for example earnings, mna or guidance
eventDirectionsstring[]positive, negative, neutral, unclear
minImportancestringlow, medium, high or critical
sectorsstring[]Sector of a tagged company, for example Technology
companyCountriesstring[]Country where a tagged company is based, ISO 3166-1 alpha-2
exchangesstring[]Exchange of a tagged company's primary listing, as MIC (XNAS)
orderBystringpublishedAt (default), firstSeenAt, revisedAt or availableAt
orderstringdesc (default, newest first) or asc
limitnumberArticles per page, 1 to 100. Default 20.
cursorstringpagination.nextCursor of the previous result, for the next page
includestring[]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:

ParameterTypeRequiredDescription
idstringYesThe article id, 22 characters
includestring[]NoExtra 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:

ParameterTypeRequiredDescription
linkstringYesThe full URL of the article
includestring[]NoExtra 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:

ParameterTypeRequiredDescription
qstringYesTicker, name, ISIN or vendor notation, at most 200 characters
micstringNoKeep 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 for sources, optInSources and excludeSources
  • name: the display name
  • type: the source type, the value for sourceTypes and excludeSourceTypes
  • isDefault: whether the source is searched without naming it
  • isCustom: whether it is a custom source granted to you
  • country and languages

Sources with isDefault: false are added to a search with optInSources. See Sources.


PROTOCOLJSON-RPC

MCP Protocol Methods

The server implements these MCP methods:

MethodDescription
initializeStart the MCP session
notifications/initializedConfirm that initialization is complete
tools/listList the available tools and their schemas
tools/callRun a tool with arguments
pingHealth 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
}

OAUTHAuthentication

OAuth Flow

For clients that support OAuth (like Claude Desktop), the server implements OAuth 2.0 with PKCE.

Endpoints

EndpointMethodDescription
/.well-known/oauth-protected-resourceGETProtected resource metadata
/.well-known/oauth-authorization-serverGETAuthorization server metadata
/registerPOSTDynamic client registration
/authorizeGETAuthorization page
/authorize/submitPOSTProcess the authorization
/tokenPOSTExchange 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

ERRORSTroubleshooting

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
}
errorstatusWhen
invalid_argumentsnoneAn 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.
validationnoneA 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_failed400The API rejected a value, for example an unknown field in query. issues names the field.
cursor_invalid400The cursor is not a cursor from this API
cursor_mismatch400The sort or the filters changed between pages. limit and include may change.
unauthorized401The API key is wrong or was deleted
forbidden403Your plan does not include this, for example search_companies without company data
not_found404No 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_limited429Burst limit or monthly credits reached
internal_error500Something went wrong on our side
timeout, networknoneThe 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

CodeWhen
-32700The request body is not valid JSON
-32600jsonrpc is not "2.0", or method is missing
-32601Unknown method
-32602tools/call without a tool name, or with an unknown tool name
-32001No API key. Without a key the server answers with HTTP 401 and points to the OAuth metadata.
-32603An 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
}

LIMITSQuotas

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.


SUPPORTHelp

Support