npm package: @hikari-systems/benzinga-finance-mcp
Description: MCP server for Benzinga stock quotes and historical price bars (Data API Proxy)
Latest version: 0.0.1

# Benzinga Finance MCP Server

A Model Context Protocol (MCP) server that exposes [Benzinga](https://www.benzinga.com/) market data APIs for **delayed stock quotes** and **historical OHLCV price bars**. It uses your Benzinga API key (Data API Proxy / subscription) for authentication.

## Features

- **`get_delayed_quotes`** — Get delayed (near real-time) quotes for one or more symbols. Returns last price, bid/ask, volume, change, 52-week range, market cap, P/E, and related fields. Supports lookup by symbols, ISIN, or CIK.
- **`get_historical_bars`** — Get historical OHLCV bars for specified symbols. Supports intervals: 1m, 5m, 15m, 30m, 1h, 1d, 1w, 1M, and flexible date ranges (absolute or relative like `1MONTH`, `YTD`).

All tools return markdown-formatted responses and use the same logging and error-handling patterns as the reference MCP implementation.

## Prerequisites

- A [Benzinga API key](https://www.benzinga.com/apis/licensing/register) with access to the **Data API Proxy** (Quotes and Bars).
- Node.js >= 18.

## Installation

```bash
npm install
```

## Build and run

```bash
npm run build
npm start
```

Development (run without building):

```bash
npm run dev
```

## Usage

The server reads configuration from `@hikari-systems/hs.utils` (e.g. env or config) and optional CLI args:

- **Config keys:** `benzinga:url` (optional, default `https://api.benzinga.com`), `benzinga:apiKey` (required).
- **CLI:** `benzinga-finance-mcp [base-url] <api-key>`
  - If you pass two arguments, the first is the base URL and the second is the API key.
  - If you pass one argument, it is used as the API key and the default base URL is used.

Examples:

```bash
# Using CLI (one arg = API key, default base URL)
node dist/index.js YOUR_BENZINGA_API_KEY

# Using CLI (base URL + API key)
node dist/index.js https://api.benzinga.com YOUR_BENZINGA_API_KEY
```

With `npx` (after publish):

```bash
npx @hikari-systems/benzinga-finance-mcp YOUR_BENZINGA_API_KEY
```

## Adding to Cursor

1. Open **Settings** → **Features** → **Model Context Protocol** → **Servers**.
2. Add a server entry, for example:

```json
{
  "mcpServers": {
    "benzinga-finance": {
      "command": "npx",
      "args": [
        "@hikari-systems/benzinga-finance-mcp",
        "YOUR_BENZINGA_API_KEY"
      ]
    }
  }
}
```

Or use config/env so the key is not in the JSON:

```json
{
  "mcpServers": {
    "benzinga-finance": {
      "command": "node",
      "args": ["/path/to/benzinga-mcp/dist/index.js"],
      "env": {
        "benzinga__apiKey": "YOUR_BENZINGA_API_KEY"
      }
    }
  }
}
```

Replace `YOUR_BENZINGA_API_KEY` with your actual key and, if needed, adjust `command`/`args` to your install path.

## API reference

- **Delayed quotes:** [Benzinga – Get delayed quotes](https://docs.benzinga.com/api-reference/data-api-proxy-api/quotedelayed/get-delayed-quotes).
- **Historical bars:** [Benzinga – Get bars](https://docs.benzinga.com/api-reference/data-api-proxy-api/bars/get-bars).
- **Authentication:** [Benzinga – Authentication](https://docs.benzinga.com/api-reference/authentication) (this server uses the recommended `Authorization: token <key>` header).

## License

Apache-2.0