mcp
Official MCP server for Paper's trading platform - enables AI assistants to interact with Paper's API
claude mcp add --transport stdio paperinvest-mcp-server npx -y @paperinvest/mcp-server \ --env PAPER_API_KEY="your_api_key" \ --env PAPER_API_BASE_URL="https://api.paperinvest.io"
How to use
The Paper MCP Server (@paperinvest/mcp-server) provides an MCP endpoint that lets AI coding assistants interact with the Paper Trading API. It exposes tools to fetch real-time quotes, batch quotes for multiple symbols, place simulated/paper orders, and inspect portfolio positions and P&L. Typical usage involves starting the server in your environment and wiring it into your MCP-enabled assistants (e.g., Cursor or Claude Desktop) using the provided integration configurations. Once running, you can request quotes, place trades in a simulated environment, and query portfolios to power AI trading prompts with live, paper-trade data.
The server expects your Paper API credentials to be available via environment variables. The key capabilities include: paper.quote(symbol) for a real-time NBBO quote, paper.quotesBatch(symbols[]) for multiple quotes in one request, paper.order({ ... }) to place a simulated order (market/limit/stop, etc.), and paper.portfolio(id) to retrieve positions and P&L. See the repository examples for concrete scripts and configurations that demonstrate how to call these tools from common MCP clients.
How to install
Prerequisites:
- Node.js 16+ (recommended)
- npm (comes with Node.js) or npm/yarn
Install the MCP server (global CLI) and run it via npx or a global install:
Option A: Use npx (no global install required)
# Start the MCP server via npx (will fetch the package on demand)
npx -y @paperinvest/mcp-server
Option B: Global installation (preferred for CLI usage, as recommended in the README)
npm i -g @paperinvest/mcp-server
# Then run the server directly (the CLI name is typically paper-mcp-server)
paper-mcp-server
Configuration (environment variables):
export PAPER_API_KEY=your_api_key
export PAPER_API_BASE_URL=https://api.paperinvest.io # optional, defaults if omitted
If you choose to use npx without a global install, you can also preconfigure the environment when launching the command:
PAPER_API_KEY=your_api_key PAPER_API_BASE_URL=https://api.paperinvest.io npx -y @paperinvest/mcp-server
Once configured, the MCP server will expose its endpoints for the MCP clients and integrations (Cursor, Claude Desktop, etc.).
Additional notes
Tips and common considerations:
- Ensure PAPER_API_KEY is set in the same environment as your MCP client to avoid credential errors.
- If you update your API URL, set PAPER_API_BASE_URL to point to the correct Paper API endpoint.
- When integrating with Cursor or Claude Desktop, place the provided mcpServers.paper block into your respective config files (e.g., .cursor/mcp.json or Claude config) so the client can locate and connect to the server.
- If the server cannot connect, verify network access to https://api.paperinvest.io and that the API key is valid.
- For troubleshooting, restart the client (Cursor/Claude) after changing environment variables or the server configuration, and ensure paper-mcp-server is discoverable in PATH when using a global install.
Related MCP Servers
Remote
A type-safe solution to remote MCP communication, enabling effortless integration for centralized management of Model Context.
agentql
Model Context Protocol server that integrates AgentQL's data extraction capabilities.
pluggedin-app
The Crossroads for AI Data Exchanges. A unified, self-hostable web interface for discovering, configuring, and managing Model Context Protocol (MCP) servers—bringing together AI tools, workspaces, prompts, and logs from multiple MCP sources (Claude, Cursor, etc.) under one roof.
unity
A Unity MCP server that allows MCP clients like Claude Desktop or Cursor to perform Unity Editor actions.
Email MCP server with full IMAP + SMTP support — read, search, send, manage, and organize email from any AI assistant via the Model Context Protocol
RLM-Memory
A Model Context Protocol (MCP) server that provides AI agents with persistent memory and semantic file discovery.