ppi-mcp
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
ppi-mcp
An unofficial Model Context Protocol (MCP) server for the Portfolio Personal Inversiones (PPI) REST API, so AI agents such as Claude Code can read your portfolio, quotes and order history and, if you opt in, place orders.
Disclaimer. This project is not affiliated with, endorsed by, or supported by PPI. It is provided as-is, use it at your own risk. Trading involves financial risk, and an AI agent can make mistakes. Tools that move money or change state at the broker are disabled by default and only exist when you set
ENABLE_TRADING=true. Read the code and try it against the PPI sandbox before pointing it at a real account.
Transport: Streamable HTTP, listening on http://0.0.0.0:7575/mcp inside the container. The examples publish it on 127.0.0.1 only, because the server has no authentication of its own.
Features
38 tools covering accounts, balances and positions, movements, market data, order history, pre-trade budgets, and reference data (instrument types, markets, settlements, holidays).
Safe by default: 8 state-changing tools (orders, transfers, bank accounts, investor profile) are not registered unless
ENABLE_TRADING=true.Automatic authentication: login and token refresh are handled for you.
ppi_confirm_orderre-reads the order after placing it and returns{ confirmation, outcome }, because PPI can acknowledge an order and then cancel it server-side without it ever reaching the market.ppi_get_current_priceandppi_get_order_bookattach asettlementWarningwhen PPI answers anA-48HS/A-72HSrequest with theA-24HSdata (a settlement the instrument does not actually trade).Ships a catalog of 148 ETF/FCI-EXTERIOR instruments in
src/data/etf-catalog.json.
Related MCP server: ibkr-mcp
Quick start
Create an env file first (see Configuration):
cp .env.example .env
# edit .env and fill in your PPI credentialsa) Docker, prebuilt image
docker run -d --name ppi-mcp --restart unless-stopped \
--env-file .env -p 127.0.0.1:7575:7575 ghcr.io/ejgonzalez90/ppi-mcp:latestb) Docker Compose, build locally
docker compose up -dThis builds the image from the Dockerfile, reads .env, restarts automatically, and publishes port 7575.
c) Node.js (development)
Requires Node.js 22+.
npm ci
npm run dev # tsx --env-file=.env src/index.tsOr build and run: npm run build && npm start (export the variables from .env yourself in this case).
Configuration
Variable | Required | Description |
| Yes | PPI API key |
| Yes | PPI API secret |
| Yes | Authorized client identifier |
| Yes | Client key |
| No | API base URL. Defaults to the PPI sandbox ( |
| No | API version (default |
| No | Set to exactly |
| No | Listen port (default |
Getting PPI API credentials
The four PPI_* credentials come from PPI: the .env.example says to obtain them from your PPI client portal or through an API access request with PPI. This repository cannot tell you more than that; consult PPI's own documentation and support. Out of the box the server talks to the PPI sandbox; set PPI_BASE_URL to the base URL PPI gives you for your account to use real data.
Debug endpoint
When NODE_ENV is not production, GET /debug reports uptime, active sessions and whether each credential is set (never the values).
Connecting an MCP client
Claude Code
claude mcp add --transport http ppi-mcp http://localhost:7575/mcpOther MCP clients
Any client that supports Streamable HTTP can point at the same URL. For clients configured with JSON, the shape is typically:
{
"mcpServers": {
"ppi-mcp": {
"type": "http",
"url": "http://localhost:7575/mcp"
}
}
}The server has no authentication of its own: anyone who can reach port 7575 can use your PPI credentials. Keep it bound to localhost or a trusted network, never expose it to the internet.
Tools
Tools marked trading are only registered when ENABLE_TRADING=true. The budget/estimate tools execute nothing and are always available.
Account
Tool | Description | Trading |
| Force re-authentication (normally automatic) | |
| List trading accounts for the authenticated user | |
| Registered bank accounts for an account | |
| Available cash balance | |
| Balances and open positions | |
| Transaction history within a date range | |
| Investor profile for an account | |
| Investor profile questionnaire | |
| Permitted instrument types | |
| Create/update the investor profile | yes |
| Register a domestic (CBU) bank account | yes |
| Remove a registered bank account | yes |
| Register an international bank account | yes |
Market data
Tool | Description | Trading |
| Search by ticker, name, market, or type | |
| Historical OHLCV data | |
| Current quote (with settlement alias warning) | |
| Intraday data | |
| Estimated yield/return for a bond | |
| Live bids and asks (with settlement alias warning) |
Orders and transfers
Tool | Description | Trading |
| Open orders for an account | |
| Historical orders within a date range | |
| Full detail for a single order | |
| Pre-trade cost estimate and required disclaimers | |
| Cost estimate for a funds transfer | |
| Place an order (call | yes |
| Cancel a specific order | yes |
| Cancel all active orders for an account | yes |
| Execute a funds transfer | yes |
Configuration (reference data)
Tool | Description | Trading |
| Available security types | |
| Available markets | |
| Settlement options | |
| Order quantity types | |
| Order validity terms | |
| Order types | |
| Operation directions | |
| Holiday calendar | |
| Whether today is an Argentine holiday | |
| Whether today is a US holiday |
At startup the server logs one line saying whether trading is enabled and how many trading tools were registered or skipped.
Development
npm ci
npm run dev # run from source with .env
npm run build # tsc -> dist/
npm run typecheck # tsc --noEmit
npm run lint # eslint
npm test # vitest, fully offline (fetch is mocked)
npm run prettier:fix # format src/**/*.tsDocker targets: dev (hot reload with a mounted src/), builder, and runtime (the default final image). See CLAUDE.md for architecture notes and how to add a tool.
License
MIT © 2026 ejgonzalez90
This server cannot be deployed
Maintenance
Related MCP Connectors
Read-only access to your MetaTrader 4 and 5 accounts for AI agents: balances, open positions, trade history with win rate, live quotes, symbol specs and candles. It cannot place, modify or close orders.
Connect brokerage accounts to AI assistants: holdings, orders, asset lookup, and approved trading.
Agentic brokerage access to a US brokerage account: quotes, orders, positions, cash and documents.
Connect AI agents to bank accounts, transactions, balances, and investments.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceEnables read-only access to Interactive Brokers data including contracts, market data, news, fundamentals, and portfolio/account information for LLM workflows and autonomous agents.40 PyPI19BSD 3-Clause
- AlicenseBqualityDmaintenanceGives AI assistants real-time access to Interactive Brokers accounts via the Client Portal Web API, with 26 read-only tools for portfolio, market data, options, and scanner.3213 npm2MIT
- AlicenseNot gradedqualityDmaintenanceProvides read-only access to Trading 212 accounts, enabling AI assistants to retrieve portfolio positions, account summaries, instrument data, and transaction history.25 npm5MIT
- AlicenseAqualityAmaintenanceEnables AI agents to access 37 read-only market-research tools for querying quotes, news, SEC filings, financial statements, ownership and insider activity, earnings, corporate calendars, options, and crypto data.4922 PyPI20AGPL 3.0