Skip to main content
Glama
amahpour

Income Screener MCP Server

by amahpour

Income Screener MCP 서버

Claude를 pyetrade를 통해 E*Trade에 연결하여 수익 중심의 트레이딩 조사를 수행하는 Python MCP 서버입니다:

  • 실시간 시세 (주식, 우선주, 베이비 본드)

  • 옵션 체인 조회

  • 연간 수익률 필터를 적용한 풋 매도 후보 스크리닝

  • 포트폴리오 포지션 모니터링

아키텍처

Claude (Claude Code / Claude Desktop)
    ↓ MCP protocol (stdio)
server.py  (FastMCP + pyetrade)
    ↓ OAuth1 REST
E*Trade API (api.etrade.com)

사전 요구 사항

  1. 활성화된 E*Trade 증권 계좌.

  2. developer.etrade.com에서 발급받은 개발자 API 키. 프로덕션 키 승인에는 영업일 기준 3~5일이 소요됩니다.

  3. Python 3.10 이상.

설정

pip install -r requirements.txt
cp .env.example .env
# edit .env and set ETRADE_CONSUMER_KEY / ETRADE_CONSUMER_SECRET
python auth.py

auth.py는 OAuth1 흐름을 진행합니다: URL을 출력하고(브라우저를 열려고 시도함), 사용자가 E*Trade 사이트에서 앱을 승인한 후, 인증 코드를 터미널에 붙여넣으면 결과 액세스 토큰이 .env 파일에 기록됩니다.

참고: E*Trade 액세스 토큰은 ET 기준 자정에 만료됩니다. 서버를 사용하기 전에 매일 아침 python auth.py를 다시 실행하십시오.

서버 실행

python server.py

이 서버는 stdio를 통해 MCP를 통신하며, 대화형으로 실행하는 대신 MCP 클라이언트(Claude Desktop, Claude Code 등)에 의해 실행되도록 설계되었습니다.

Claude Desktop 설정

claude_desktop_config.json에 다음을 추가하십시오:

{
  "mcpServers": {
    "income-screener": {
      "command": "python",
      "args": ["server.py"],
      "cwd": "/home/amahpour/code/pyetrade-mcp"
    }
  }
}

도구

도구

설명

get_quote(symbols)

최대 25개 심볼에 대한 실시간 시세.

get_option_expire_dates(symbol)

심볼에 대한 사용 가능한 옵션 만기일.

get_option_chain(symbol, chain_type, expiry_date, strike_price_near, num_strikes)

옵션 체인 창을 가져옵니다.

screen_put_candidates(symbols, max_strike_pct, min_annual_yield, min_open_interest, months_out)

연간 수익률별로 풋 매도 수익 후보를 순위 지정합니다.

get_portfolio()

인증된 프로필의 첫 번째 계좌에 대한 포지션.

연간 수익률

screen_put_candidates(bid / strike) * (365 / DTE)를 계산하고 min_annual_yield로 필터링합니다. 결과는 수익률이 높은 순서대로 정렬됩니다.

기본 관심 종목(Watchlist)

symbols 없이 screen_put_candidates를 호출하면 내장된 주식 목록(HPQ, HPE, PFE, T, VZ, F, INTC, DOW, KHC, WBA)을 사용합니다. 우선주/베이비 본드 관심 종목은 get_quote와 함께 사용하기 위해 server.py에 정의되어 있습니다.

참고 사항

  • server.pydev=False(프로덕션 API)를 사용합니다. E*Trade 샌드박스는 실제 옵션 체인 데이터를 반환하지 않습니다.

  • 우선주 심볼 형식(예: JPM-CJPMpC)은 다를 수 있으므로, 특정 티커에 대해 테스트하십시오.

  • screen_put_candidates의 호출은 E*Trade의 속도 제한을 준수하기 위해 0.5초 지연과 함께 직렬화됩니다.

파일

.
├── README.md
├── LICENSE
├── requirements.txt    # pyetrade, mcp[cli], python-dotenv
├── .env.example        # template — copy to .env and fill in
├── auth.py             # one-shot OAuth token refresh
└── server.py           # FastMCP server + all 5 tools
A
license - permissive license
Not graded
quality - not tested
Not graded
maintenance - not tested

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

  • Global stock research, ML forecasts, valuation signals, screeners & portfolio tracking in Claude

  • Trade Robinhood through natural language in Claude Code.

  • Options analytics for AI assistants: chains, IV rank, VRP, Greeks, GEX, expected moves, screeners.

View all MCP Connectors

Appeared in Searches

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/amahpour/pyetrade-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server