Skip to main content
Glama
Paper MCP Server

Paper MCP Server

by paperinvest

Paper MCP Server (@paperinvest/mcp-server)

npm version npm downloads license

Official Model Context Protocol (MCP) server for Paper's trading platform. Lets AI coding assistants (Cursor, Claude, etc.) interact with the Paper Trading API to fetch quotes, place paper orders, and inspect portfolios.

Install

# Global install (recommended for CLI usage)
npm i -g @paperinvest/mcp-server

# Or run with npx
npx @paperinvest/mcp-server --help

Node.js 16+ recommended.

Related MCP server: Alpaca MCP Server

Configure

Set your Paper API credentials via environment variables (shell or .env).

export PAPER_API_KEY=your_api_key
# Optional override
export PAPER_API_BASE_URL=https://api.paperinvest.io

IDE Integrations

Cursor

File: ~/.cursor/mcp.json

{
  "mcpServers": {
    "paper": {
      "command": "paper-mcp-server",
      "env": {
        "PAPER_API_KEY": "your_api_key"
      }
    }
  }
}

Claude Desktop

macOS: ~/Library/Application Support/Claude/claude_desktop_config.json

Windows: %APPDATA%\Claude\claude_desktop_config.json

{
  "mcpServers": {
    "paper": {
      "command": "paper-mcp-server",
      "env": {
        "PAPER_API_KEY": "your_api_key"
      }
    }
  }
}

Tools Reference

  • paper.quote(symbol) — Get real-time NBBO quote for a symbol

  • paper.quotesBatch(symbols[]) — Get quotes for multiple symbols in one request

  • paper.order({ ... }) — Place a simulated order (market/limit/stop, etc.)

  • paper.portfolio(id) — Retrieve portfolio positions and P&L

See more tools and examples in the repository and on the MCP landing: https://paperinvest.io/mcp

Examples

Configs and demo scripts are in examples/:

  • examples/.cursor/mcp.json — Cursor integration

  • examples/claude/claude_desktop_config.json — Claude integration

  • examples/scripts/get-quote.sh — Example prompt to fetch a quote

  • examples/scripts/place-order.sh — Example prompt to place an order

Getting Started

  1. Sign up at app.paperinvest.io

  2. Generate an API key from your account settings

  3. Add the configuration above with your API key

  4. Restart Claude Desktop or Cursor

Troubleshooting

  • Ensure paper-mcp-server is in your PATH (npm prefix -g may help).

  • Verify PAPER_API_KEY is set in the same environment as your client.

  • Restart Cursor/Claude after changing config.

  • Check connectivity to https://api.paperinvest.io.

Support

For support, visit paperinvest.io or email support@paperinvest.io

License

MIT © Paper Invest, Inc.

Available Tools

23 tools
cancel_all_account_ordersC

Cancel all orders for an account

Inputs: accountId (required).

cancel_orderC

Cancel an existing order

Inputs: orderId (required).

create_batch_ordersC

Create multiple orders at once

Inputs: orders (required).

create_orderC

Create a new trading order

Inputs: portfolioId (required), quantity (required), side (required), symbol (required), +6 more.

create_portfolioC

Create a new portfolio

Inputs: accountId (required), name (required), type (required).

freeze_accountC

Freeze a trading account

Inputs: accountId (required).

get_accountC

Get account details by ID

Inputs: accountId (required).

get_account_ordersC

Get orders for an account

Inputs: accountId (required), limit, page.

get_account_portfoliosC

Get all portfolios for an account

Inputs: accountId (required).

get_batch_quotesC

Get real-time quotes for multiple symbols

Inputs: symbols (required).

get_day_tradesC

Get day trade activity for a portfolio

Inputs: portfolioId (required), limit, page.

get_market_hoursC

Get market hours for an exchange

Inputs: exchange.

get_orderC

Get order details by ID

Inputs: orderId (required).

get_portfolioC

Get portfolio details

Inputs: portfolioId (required).

get_portfolio_activitiesC

Get activity log for a portfolio

Inputs: portfolioId (required), category, limit, page.

get_portfolio_equitiesC

Get all equity positions in a portfolio

Inputs: portfolioId (required).

get_portfolio_optionsC

Get all option positions in a portfolio

Inputs: portfolioId (required).

get_quoteC

Get real-time quote for a symbol

Inputs: symbol (required).

get_today_filled_ordersC

Get all orders filled today

Inputs: limit, page.

is_market_openC

Check if market is open for a symbol

Inputs: symbol (required).

reset_portfolioC

Reset portfolio to initial state

Inputs: portfolioId (required).

update_accountC

Update account details

Inputs: accountId (required), name.

upgrade_to_marginC

Upgrade portfolio to margin account

Inputs: marginAgreement (required), portfolioId (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.2/5.0

    Scored across 23 tools

    Disambiguation4/5

    Most tools have distinct purposes targeting specific resources like accounts, orders, portfolios, or market data, with clear action verbs. However, some potential overlap exists between 'get_account_orders' and 'get_today_filled_orders', as well as between portfolio-related 'get' tools, which could cause minor confusion in selection.

    Naming Consistency5/5

    Tool names follow a highly consistent verb_noun pattern throughout, using snake_case uniformly. Verbs like 'get', 'create', 'cancel', and 'update' are applied predictably to nouns such as 'account', 'order', 'portfolio', and 'quote', making the set easy to navigate and understand.

    Tool Count3/5

    With 23 tools, the count is borderline high for a trading server, potentially feeling heavy but still manageable. It covers a broad scope including accounts, orders, portfolios, and market data, which justifies many tools, but it might benefit from consolidation or more focused scoping to avoid complexity.

    Completeness5/5

    The tool set provides comprehensive coverage for trading operations, including full CRUD for accounts, orders, and portfolios, along with market data queries and specialized actions like freezing accounts or upgrading to margin. No obvious gaps are present; agents can handle end-to-end workflows without dead ends.

    Maintenance

    ActivityInactive
    ResponsivenessLimited data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables natural language trading operations through Alpaca's Trading API, supporting stocks, options, crypto, portfolio management, and real-time market data access through AI assistants like Claude.
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables natural language trading operations through AI assistants using Alpaca's Trading API. Supports stocks, options, crypto trading, portfolio management, and real-time market data access.
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables natural language trading operations for stocks, options, crypto, and portfolio management via Alpaca's Trading API through AI assistants.
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables AI assistants like Claude to run backtests, fetch market data, list strategies, and analyze trading algorithms via natural language.
      19 PyPI
      1,134
      GPL 3.0