Kalshi MCP Server

io.github.joinQuantishPublished by GitHub account joinQuantishv0.3.0Updated Oct 24, 2026

Self-hosted MCP server for Kalshi prediction market trading via DFlow on Solana

The publisher's own server: Kalshi MCP

VerifiedSTDIODesktop onlyFinanceDeveloper Tools

Overview

AI-generated overview

A self-hosted MCP server that lets an assistant trade Kalshi prediction markets through DFlow on Solana, including wallet, swap and transfer tools.

What you can do
Create and manage accounts and Solana wallets, check balances, deposit addresses, and import or export private keys, plus manage API keys for the server itself. Search and browse Kalshi markets, events and live pricing data. Get quotes, buy YES or NO outcome tokens, sell positions, and review positions and order history. Get Jupiter swap quotes and swap between SOL and USDC. Send SOL, USDC or other SPL tokens to another wallet. Initialize markets on-chain, check redemption status, and redeem winning positions individually or all at once.
When to use it
For people who want an AI assistant to research and trade Kalshi prediction markets from their own self-hosted instance, and who are comfortable running Node.js and PostgreSQL and holding funds in a Solana wallet. Not for anyone wanting a hosted, maintained service: the project is no longer maintained.
Requirements
A local Node.js runtime with the package installed from source, a PostgreSQL database via DATABASE_URL, and a 64-character hex ENCRYPTION_KEY for wallet encryption. Optional DFLOW_API_KEY, JUPITER_API_KEY (needed for swaps), SOLANA_RPC_URL, ADMIN_API_KEY and PORT. Database tables must be created with the provided Prisma commands. Network access to Solana and the trading services.
Before you install
The server holds a Solana wallet and can move real funds: it buys and sells positions, swaps tokens, sends SOL, USDC and SPL tokens, and pays SOL fees to initialize markets. The private key can be exported and imported through tools, and wallet secrets are protected only by ENCRYPTION_KEY, so guard that value and the database. Trading and transfers are irreversible and involve financial risk. The project is unmaintained and its public servers are gone, so you run and secure your own instance.

Installation

In SourceWeft

  1. Open Kalshi MCP Server in the dashboard and add it to a workspace.
  2. Enable the server for the chats that should use its tools.

Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.

Other MCP clients

Follow the launch instructions in the repository.

README

@quantish/kalshi-server

⚠️ Notice: Quantish is winding down. The Quantish platform (quantish.live) is shutting down. This MCP server is self-hosted and will continue to work independently, but the Quantish team will no longer be maintaining or updating this project. If you're building in the prediction market space and need real-time data infrastructure, check out polynode.dev.

Self-hosted Kalshi MCP server for trading on Kalshi markets via DFlow on Solana.

Overview

This package provides an MCP (Model Context Protocol) server that enables AI agents to trade on Kalshi prediction markets through the DFlow protocol on Solana.

Features

  • Full Kalshi Trading - Buy/sell on any Kalshi market
  • Solana Wallet Management - Generate and manage Solana wallets
  • DFlow Integration - Trade via DFlow's Solana infrastructure
  • Jupiter Swaps - Swap SOL/USDC via Jupiter Aggregator
  • MCP Compatible - Works with Claude, Quantish Agent, and any MCP client
  • Self-Hostable - Run on Railway, Fly.io, or any Node.js host

Quick Start

bash
git clone https://github.com/joinQuantish/kalshi-mcpcd kalshi-mcpnpm install

Environment Variables

VariableRequiredDescription
DATABASE_URLYesPostgreSQL connection string
ENCRYPTION_KEYYes64-character hex string for wallet encryption
DFLOW_API_KEYNoDFlow API key (optional, for authenticated endpoints)
JUPITER_API_KEYNoJupiter API key from portal.jup.ag for swap tools
SOLANA_RPC_URLNoSolana RPC endpoint (defaults to mainnet)
ADMIN_API_KEYNoAdmin API key for administrative endpoints
PORTNoServer port (defaults to 3002)

Obtaining API Keys

DFlow API Key:

DFlow access may require approval. Contact the DFlow team at dflow.net for API access.

Jupiter API Key:

Get a free API key from portal.jup.ag (Basic tier, 1 RPS). Required for swap functionality.

Using Quantish's public servers? Quantish's public servers are no longer available as the platform is winding down. You must self-host this MCP server to use it. Follow the setup instructions above to run your own instance.

Generate Encryption Key

bash
node -e "console.log(require('crypto').randomBytes(32).toString('hex'))"

Database Setup

Any PostgreSQL database works. Options:

ProviderNotes
RailwayAdd PostgreSQL service, copy DATABASE_URL from variables
SupabaseFree tier at supabase.com, copy connection string from Settings > Database
NeonServerless Postgres at neon.tech, free tier available
Local Dockerdocker run -e POSTGRES_PASSWORD=pass -p 5432:5432 postgres

Set your DATABASE_URL then run:

bash
# Generate Prisma clientnpm run db:generate
# Create tablesnpm run db:push

Available Tools

Account Management

  • kalshi_signup - Create account with Solana wallet
  • kalshi_request_api_key - Request API key with access code
  • kalshi_get_wallet_info - Get wallet address and type
  • kalshi_get_wallet_status - Full wallet status including balances
  • kalshi_get_balances - Get SOL and USDC balances
  • kalshi_get_deposit_address - Get address for deposits
  • kalshi_export_private_key - Export wallet private key
  • kalshi_import_private_key - Import existing Solana wallet

Market Discovery

  • kalshi_search_markets - Search Kalshi markets by keyword
  • kalshi_get_market - Get market details by ticker
  • kalshi_get_event - Get event with all nested markets
  • kalshi_get_events - Browse events with filters
  • kalshi_get_live_data - Get live pricing data

Trading

  • kalshi_get_quote - Get quote for prediction market trade
  • kalshi_buy_yes - Buy YES outcome tokens
  • kalshi_buy_no - Buy NO outcome tokens
  • kalshi_sell_position - Sell outcome tokens back to USDC
  • kalshi_get_positions - View current positions
  • kalshi_get_orders - View order history

Swaps (SOL/USDC)

  • kalshi_get_swap_quote - Get Jupiter swap quote
  • kalshi_execute_swap - Execute token swap
  • kalshi_swap_sol_to_usdc - Swap SOL to USDC
  • kalshi_swap_usdc_to_sol - Swap USDC to SOL

Transfers

  • kalshi_send_sol - Send SOL to another wallet
  • kalshi_send_usdc - Send USDC to another wallet
  • kalshi_send_token - Send any SPL token

Market Operations

  • kalshi_check_market_initialization - Check if market is tokenized on-chain
  • kalshi_initialize_market - Initialize market on-chain (pays SOL fee)
  • kalshi_check_redemption_status - Check if market is settled
  • kalshi_get_market_by_mint - Look up market by token mint

Redemption

  • kalshi_get_redeemable_positions - Find positions ready to claim
  • kalshi_redeem_winnings - Redeem specific winning position
  • kalshi_redeem_all_positions - Redeem all winning positions at once

API Key Management

  • kalshi_list_api_keys - List your API keys
  • kalshi_create_additional_api_key - Create new API key
  • kalshi_revoke_api_key - Revoke an API key

API Format

The server exposes a JSON-RPC 2.0 endpoint at /mcp:

bash
curl -X POST https://your-server.com/mcp \  -H "Content-Type: application/json" \  -H "x-api-key: YOUR_API_KEY" \  -d '{    "jsonrpc": "2.0",    "method": "tools/call",    "params": {      "name": "kalshi_get_positions",      "arguments": {}    },    "id": 1  }'

Connecting to Quantish Agent

Configure the CLI to use your server:

bash
export KALSHI_MCP_URL=https://your-server.com/mcpexport KALSHI_API_KEY=your-api-keyquantish

Or add to ~/.quantish/config.json:

json
{  "kalshiMcpUrl": "https://your-server.com/mcp",  "kalshiApiKey": "your-api-key"}

Development

bash
# Install dependenciesnpm install
# Generate Prisma clientnpm run db:generate
# Run migrationsnpm run db:push
# Start development servernpm run dev

Resources

License

This project is licensed under the PolyForm Noncommercial License 1.0.0.

Free for personal use, research, and non-commercial purposes. Commercial use requires explicit permission from Quantish Inc. Contact [email protected] for commercial licensing.


Built by Quantish Inc.

Source: README.md at commit 661eaa6

Tools

0
SourceWeft has not started this package in its sandbox yet, so its tools are not known.

Version history

1
  1. v0.3.0LatestSep 16, 2026

Score

40% of the applicable checks met

How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.

  • Reached in the last 30 days25 pts

    Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.

  • Auth declared10 pts

    Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.

  • Tools listed15 pts

    Answer tools/list without a credential, or ship a package that starts in a sandbox without one.

  • DescriptionRequired15 pts
  • Logo10 pts
  • Documentation15 pts
  • License10 pts

    Declare a license in the repository or the registry entry.

Other Kalshi-Mcp integrations