SEIGYO
Python SDK

MCP Trading Tools — Python SDK quick start

Install the SEIGYO Python SDK and add pre-trade discipline evaluation to mcp trading tools in 5 lines of code.

Who this page is for

AI developers using Model Context Protocol to build trading agents that need real-time discipline evaluation as a callable tool.

Core problem

MCP-compatible agents need tools they can call to evaluate trades. Without a discipline tool, the agent has no way to check whether a trade violates behavioral rules.

Why this matters

Why this page exists

The page should answer the exact query before asking the user to convert.

pip install seigyo — zero dependencies, works with any Python trading bot or framework.
Dataclass models for trades, rules, and session state mean your IDE gives you autocomplete and type safety.
The SDK handles authentication, serialization, and error handling so you write application logic, not HTTP plumbing.
What to do first

Start with the smallest useful workflow

A specific first step keeps the page practical and reduces decision fatigue.

Run pip install seigyo and set the SEIGYO_API_KEY environment variable.
Import SeigyoClient, Trade, RuleDefinition, and SessionState.
Call client.evaluate() before every order and check result.verdict.
What to measure

Look for signals that change behavior

Useful review starts with a small number of repeatable measurements.

tool call latency, blocked trades per session, and agent decision quality after warnings
Integration time from install to first successful evaluation
SDK error rate and retry behavior under load
How it helps

Where SEIGYO fits

Move from the query into a workflow users can try with demo data, CSV history, or a setup path.

The SDK returns typed EvaluateResponse objects with verdict, violations, discipline score, and budget remaining.
Works with Alpaca, IBKR, Tradovate, and any broker that gives you a Python order flow.
Session state tracking is your responsibility — the SDK stays stateless and predictable.