- Home
- MCP servers
- Opinion
Opinion
- typescript
0
GitHub Stars
typescript
Language
6 months ago
First Indexed
3 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"solenyaresearch0000-opinion-mcp": {
"command": "python",
"args": [
"-m",
"mcp_opinion"
],
"env": {
"OPINION_API_KEY": "your_api_key_here",
"OPINION_PRIVATE_KEY": "0x..."
}
}
}
}You run an MCP server for Opinion.trade to access market data in read-only mode or trade programmatically with private-key signing. This guide shows practical steps to install, configure, and use the server so you can query markets, fetch prices, and place or manage trades securely.
How to use
You operate in two modes. In read-only mode, you fetch market data using your API key. In trading mode, you enable full trading capabilities by providing your private key for EIP712 signing. Use the 6 public tools to explore markets and prices, and switch to the 7 trading tools when you have a funded account and a private key.
Public data tools include listing markets, getting market details, token/outcome prices, orderbooks, price history, and market search. When you supply a private key, you gain access to placing and canceling orders, viewing open orders, checking positions and P&L, viewing trade history, and inspecting balances. Ensure your API key is valid for read-only access, and your private key is kept secure for trading.
To operate programmatically, use the MCP client to call the available tools. In read-only mode you will only be able to invoke the public tools. In trading mode you can invoke all tools including those that require signing with EIP712.
How to install
# Prerequisites
python3 --version
# Expect Python 3.10+
# Install from source
cd mcp-opinion-trade
pip install -e .
Additional configuration and usage notes
Prerequisites include Python 3.10 or higher and an Opinion.trade API key. You can install in development mode to enable live changes while you work on your MCP server.
Create a .env file by duplicating the example and then customize your environment variables. In read-only mode only the API key is required. For trading mode, also provide your private key and the appropriate network ID.
Configuration and security
Minimum configuration for read-only mode: OPINION_API_KEY=your_api_key_here Full configuration for trading mode: OPINION_API_KEY=your_api_key_here OPINION_PRIVATE_KEY=0x... # Your Ethereum private key OPINION_CHAIN_ID=56 # 56 for BNB mainnet, 97 for testnet
Store sensitive values in a local .env file and reference them via environment variables. Do not commit .env files to version control. Use hardware wallets or restricted trading wallets for production access.
Troubleshooting
If you encounter an API key requirement error, verify that OPINION_API_KEY is set in your environment. If trading tools are unavailable, ensure OPINION_PRIVATE_KEY is defined and starts with 0x, and that the key corresponds to a funded BNB Chain wallet.
If you see sdk-not-found errors, install the required SDK and ensure it is listed in your project dependencies.
Notes on architecture
The server supports dual-mode operation. When a private key is absent, you only expose 6 public API tools. When a private key is present, all 13 tools are available, enabling full trading capabilities.
Available tools
get_markets
List prediction markets with filtering options to discover active and upcoming markets.
get_market_details
Fetch detailed information about a specific market, including outcomes and metadata.
get_token_price
Query current token/outcome prices for quick price checks.
get_orderbook
Retrieve the order book depth with current bids and asks for an asset.
get_price_history
Obtain historical OHLCV data for price analysis.
search_markets
Search markets by keywords to quickly locate relevant markets.
place_order
Place limit or market orders using EIP712 signing (requires private key).
cancel_order
Cancel a specific open order.
cancel_all_orders
Cancel all open orders for the user.
get_open_orders
List the user’s current open orders.
get_positions
Retrieve user positions and P&L details.
get_trade_history
Show executed trade history for the user.
get_balances
Display account balances including available and locked funds.