- Explore MCP Servers
- ibkr-mcp-ts
Ibkr Mcp Ts
What is Ibkr Mcp Ts
ibkr-mcp-ts is an example MCP server implemented in TypeScript that retrieves account positions from Interactive Brokers (IBKR).
Use cases
Use cases include automated trading systems, portfolio management tools, and applications that require real-time access to IBKR account data.
How to use
To use ibkr-mcp-ts, clone the repository, install dependencies, configure your IBKR connection in the server.ts file, set up MCPHost, and run the server with the appropriate configuration.
Key features
Key features include integration with IBKR for account position retrieval, TypeScript implementation for better type safety, and compatibility with MCPHost and Ollama for enhanced functionality.
Where to use
ibkr-mcp-ts can be used in financial applications, trading platforms, and any environment where integration with IBKR’s API is required for account management and data retrieval.
Clients Supporting MCP
The following are the main client software that supports the Model Context Protocol. Click the link to visit the official website for more information.
Overview
What is Ibkr Mcp Ts
ibkr-mcp-ts is an example MCP server implemented in TypeScript that retrieves account positions from Interactive Brokers (IBKR).
Use cases
Use cases include automated trading systems, portfolio management tools, and applications that require real-time access to IBKR account data.
How to use
To use ibkr-mcp-ts, clone the repository, install dependencies, configure your IBKR connection in the server.ts file, set up MCPHost, and run the server with the appropriate configuration.
Key features
Key features include integration with IBKR for account position retrieval, TypeScript implementation for better type safety, and compatibility with MCPHost and Ollama for enhanced functionality.
Where to use
ibkr-mcp-ts can be used in financial applications, trading platforms, and any environment where integration with IBKR’s API is required for account management and data retrieval.
Clients Supporting MCP
The following are the main client software that supports the Model Context Protocol. Click the link to visit the official website for more information.
Content
IBKR MCP Server
This is an example MCP server that retrieves account positions from IBKR.
Screenshot

Prerequisites
- Node.js
- An IBKR account with API access enabled, a desktop running either IBKR Gateway or TWS
- MCPHost (https://github.com/mark3labs/mcphost)
- Ollama (https://ollama.com/)
Installation
-
Clone this repository and install dependencies:
git clone https://github.com/ciri/ibkr-mcp-ts.git cd ibkr-mcp-ts npm install -
Configure your IBKR connection:
- Edit the
server.tsfile to set the correct port for your IBKR TWS (7496) or IB Gateway (4001, default).
- Edit the
-
Set up MCPHost:
go install github.com/mark3labs/mcphost@latest -
Configure Ollama:
ollama pull qwen2.5 ollama serve
Running the Server
First, make sure that you are logged into IBKR TWS or IB Gateway.
Then, start MCPHost with the configuration file:
mcphost -m ollama:qwen2.5 --config ./config.json
MCP Configuration
Add the following to your MCP configuration file (config.json):
Note: Replace /path/to/ibkr-mcp-ts/dist/server.js with the actual path to the server.js file.
Disclaimer
This is an example implementation and may require further configuration and adjustments to work correctly in your environment. You probably want to try this with your paper trading account first or ensure you only allow read access to the API.
Dev Tools Supporting MCP
The following are the main code editors that support the Model Context Protocol. Click the link to visit the official website for more information.










