UNPKG

octagon-mcp

Version:

MCP server for Octagon API. Provides specialized AI agents for investment research of public and private markets.

19 lines (18 loc) 609 B
import dotenv from "dotenv"; import OpenAI from "openai"; // Load environment variables dotenv.config(); const OCTAGON_API_KEY = process.env.OCTAGON_API_KEY; const OCTAGON_API_BASE_URL = process.env.OCTAGON_API_BASE_URL || "https://api.octagonai.co/v1"; // Initialize OpenAI client with Octagon API const createClient = (options) => { if (!OCTAGON_API_KEY) { throw new Error("OCTAGON_API_KEY is not set in the environment variables"); } return new OpenAI({ apiKey: OCTAGON_API_KEY, baseURL: OCTAGON_API_BASE_URL, ...options, }); }; export default createClient;