home / mcp / openfigi api mcp server

OpenFIGI API MCP Server

Exposes the OpenFIGI API as an MCP server for model-context driven operations.

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "ag2-mcp-servers-openfigi-api": {
      "command": "python",
      "args": [
        "mcp_server/main.py",
        "stdio"
      ],
      "env": {
        "CONFIG": "JSON string containing the configuration",
        "SECURITY": "YOUR_API_KEY",
        "CONFIG_PATH": "Path to a JSON configuration file (e.g., mcp_server/mcp_config.json)"
      }
    }
  }
}

You run an MCP server to expose a targeted API via the Model Context Protocol, enabling efficient, structured communication with MCP clients. This server is designed to work with a specific OpenAPI source and lets you connect locally or remotely using a standard MCP transport.

How to use

Start the server in a local, standard I/O mode so MCP clients can connect through the process’s standard input and output. You can also configure security and runtime options via environment variables before you launch.

To run the server and begin accepting MCP requests, use the Python runtime and target the main script in stdio mode. You can supply configuration through environment variables if needed.

How to install

Prerequisites include Python 3.9+ and a working Python package manager. You will also use a small runtime helper to start the server.

Clone the repository and navigate into the project directory.

git clone <repository-url>
cd mcp-server

Install the development dependencies so you can run and test the server locally.

pip install -e ".[dev]"
```
Alternatively, you can use the runtime helper to perform an editable install via a wrapper tool if you prefer.

If you prefer using the UVX runtime, you can install editable dependencies with the following alternative command.

uv pip install --editable ".[dev]"

Run the MCP server in stdio mode to start listening for MCP clients.

python mcp_server/main.py stdio

Additional configuration and notes

You can influence runtime behavior and security by providing environment variables before starting the server. The supported environment variables include CONFIG_PATH for a JSON configuration file, CONFIG for a JSON string containing the configuration, and SECURITY for security-related settings such as API keys.

Available tools

lint

Linting the codebase to catch syntax and stylistic issues.

format

Code formatting to enforce consistent style.

static-analysis

Static analysis checks including type checking and security analysis.

tests

Run automated tests to verify behavior and coverage.

pre-commit

Pre-commit hooks to run on commits for quality checks.