schwab_mcp 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.claude/settings.json +14 -0
- data/CLAUDE.md +124 -0
- data/debug_env.rb +46 -0
- data/doc/DATA_OBJECTS_MIGRATION_TODO.md +80 -0
- data/doc/SCHWAB_CLIENT_FACTORY_REFACTOR_PLAN.md +187 -0
- data/exe/schwab_mcp +14 -3
- data/exe/schwab_token_refresh +10 -9
- data/lib/schwab_mcp/redactor.rb +4 -0
- data/lib/schwab_mcp/schwab_client_factory.rb +44 -0
- data/lib/schwab_mcp/tools/cancel_order_tool.rb +29 -50
- data/lib/schwab_mcp/tools/get_market_hours_tool.rb +27 -28
- data/lib/schwab_mcp/tools/get_order_tool.rb +51 -108
- data/lib/schwab_mcp/tools/get_price_history_tool.rb +23 -35
- data/lib/schwab_mcp/tools/help_tool.rb +1 -22
- data/lib/schwab_mcp/tools/list_account_orders_tool.rb +35 -63
- data/lib/schwab_mcp/tools/list_account_transactions_tool.rb +43 -72
- data/lib/schwab_mcp/tools/list_movers_tool.rb +21 -34
- data/lib/schwab_mcp/tools/list_schwab_accounts_tool.rb +18 -31
- data/lib/schwab_mcp/tools/option_chain_tool.rb +130 -82
- data/lib/schwab_mcp/tools/place_order_tool.rb +105 -117
- data/lib/schwab_mcp/tools/preview_order_tool.rb +100 -48
- data/lib/schwab_mcp/tools/quote_tool.rb +33 -26
- data/lib/schwab_mcp/tools/quotes_tool.rb +97 -45
- data/lib/schwab_mcp/tools/replace_order_tool.rb +104 -116
- data/lib/schwab_mcp/tools/schwab_account_details_tool.rb +56 -72
- data/lib/schwab_mcp/version.rb +1 -1
- data/lib/schwab_mcp.rb +1 -2
- data/orders_example.json +7084 -0
- data/spx_option_chain.json +25073 -0
- data/test_mcp.rb +16 -0
- data/test_server.rb +23 -0
- data/trading_brokerage_account_details.json +89 -0
- data/transactions_example.json +488 -0
- metadata +17 -7
- data/lib/schwab_mcp/option_chain_filter.rb +0 -213
- data/lib/schwab_mcp/orders/iron_condor_order.rb +0 -87
- data/lib/schwab_mcp/orders/order_factory.rb +0 -40
- data/lib/schwab_mcp/orders/vertical_order.rb +0 -62
- data/lib/schwab_mcp/tools/option_strategy_finder_tool.rb +0 -378
data/test_mcp.rb
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
require "mcp"
|
2
|
+
require "mcp/transports/stdio"
|
3
|
+
|
4
|
+
puts "Testing MCP Server and StdioTransport..."
|
5
|
+
|
6
|
+
server = MCP::Server.new(name: "my_server")
|
7
|
+
puts "✅ Server created successfully"
|
8
|
+
|
9
|
+
transport = MCP::Transports::StdioTransport.new(server)
|
10
|
+
puts "✅ StdioTransport created successfully"
|
11
|
+
|
12
|
+
# Test tool definition
|
13
|
+
server.define_tool(name: "test_tool") { |**args| { result: "Tool works!" } }
|
14
|
+
puts "✅ Tool defined successfully"
|
15
|
+
|
16
|
+
puts "🎉 All components working!"
|
data/test_server.rb
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# Test script to verify the Schwab MCP server works
|
3
|
+
|
4
|
+
require_relative 'lib/schwab_mcp'
|
5
|
+
|
6
|
+
begin
|
7
|
+
puts "🧪 Testing Schwab MCP Server..."
|
8
|
+
|
9
|
+
# Test server initialization
|
10
|
+
server = SchwabMCP::Server.new
|
11
|
+
puts "✅ Server initialized successfully"
|
12
|
+
|
13
|
+
# Test transport creation (without starting)
|
14
|
+
transport = MCP::Transports::StdioTransport.new(server.instance_variable_get(:@server))
|
15
|
+
puts "✅ Transport created successfully"
|
16
|
+
|
17
|
+
puts "All basic components working!"
|
18
|
+
puts "The server is ready to start with: server.start"
|
19
|
+
|
20
|
+
rescue => e
|
21
|
+
puts "Error: #{e.class.name} - #{e.message}"
|
22
|
+
puts e.backtrace.first(5).join("\n")
|
23
|
+
end
|
@@ -0,0 +1,89 @@
|
|
1
|
+
{
|
2
|
+
"securitiesAccount": {
|
3
|
+
"type": "MARGIN",
|
4
|
+
"accountNumber": "[REDACTED]",
|
5
|
+
"roundTrips": 0,
|
6
|
+
"isDayTrader": true,
|
7
|
+
"isClosingOnlyRestricted": false,
|
8
|
+
"pfcbFlag": false,
|
9
|
+
"initialBalances": {
|
10
|
+
"accruedInterest": 0.0,
|
11
|
+
"availableFundsNonMarginableTrade": 80375.0,
|
12
|
+
"bondValue": 321500.8,
|
13
|
+
"buyingPower": 196446.0,
|
14
|
+
"cashBalance": 70608.25,
|
15
|
+
"cashAvailableForTrading": 0.0,
|
16
|
+
"cashReceipts": 0.0,
|
17
|
+
"dayTradingBuyingPower": 343205.0,
|
18
|
+
"dayTradingBuyingPowerCall": 0.0,
|
19
|
+
"dayTradingEquityCall": 0.0,
|
20
|
+
"equity": 173039.88,
|
21
|
+
"equityPercentage": 100.0,
|
22
|
+
"liquidationValue": 173039.88,
|
23
|
+
"longMarginValue": 108524.21,
|
24
|
+
"longOptionMarketValue": 4697.14,
|
25
|
+
"longStockValue": 108524.21,
|
26
|
+
"maintenanceCall": 0.0,
|
27
|
+
"maintenanceRequirement": 98757.0,
|
28
|
+
"margin": 70608.25,
|
29
|
+
"marginEquity": 179132.46,
|
30
|
+
"moneyMarketFund": 0.0,
|
31
|
+
"mutualFundValue": 80375.0,
|
32
|
+
"regTCall": 0.0,
|
33
|
+
"shortMarginValue": 0.0,
|
34
|
+
"shortOptionMarketValue": -10789.72,
|
35
|
+
"shortStockValue": -10789.72,
|
36
|
+
"totalCash": 0.0,
|
37
|
+
"isInCall": false,
|
38
|
+
"pendingDeposits": 0.0,
|
39
|
+
"marginBalance": 0.0,
|
40
|
+
"shortBalance": 0.0,
|
41
|
+
"accountValue": 173039.88
|
42
|
+
},
|
43
|
+
"currentBalances": {
|
44
|
+
"accruedInterest": 0.0,
|
45
|
+
"cashBalance": 70608.25,
|
46
|
+
"cashReceipts": 0.0,
|
47
|
+
"longOptionMarketValue": 5482.0,
|
48
|
+
"liquidationValue": 173037.96,
|
49
|
+
"longMarketValue": 108524.21,
|
50
|
+
"moneyMarketFund": 0.0,
|
51
|
+
"savings": 0.0,
|
52
|
+
"shortMarketValue": 0.0,
|
53
|
+
"pendingDeposits": 0.0,
|
54
|
+
"mutualFundValue": 0.0,
|
55
|
+
"bondValue": 0.0,
|
56
|
+
"shortOptionMarketValue": -11576.5,
|
57
|
+
"availableFunds": 120600.2,
|
58
|
+
"availableFundsNonMarginableTrade": 120600.2,
|
59
|
+
"buyingPower": 276400.0,
|
60
|
+
"buyingPowerNonMarginableTrade": 120600.2,
|
61
|
+
"dayTradingBuyingPower": 343205.0,
|
62
|
+
"equity": 179132.46,
|
63
|
+
"equityPercentage": 100.0,
|
64
|
+
"longMarginValue": 108524.21,
|
65
|
+
"maintenanceCall": 0.0,
|
66
|
+
"maintenanceRequirement": 58532.26,
|
67
|
+
"marginBalance": 0.0,
|
68
|
+
"regTCall": 0.0,
|
69
|
+
"shortBalance": 0.0,
|
70
|
+
"shortMarginValue": 0.0,
|
71
|
+
"sma": 138200.0
|
72
|
+
},
|
73
|
+
"projectedBalances": {
|
74
|
+
"availableFunds": 120600.2,
|
75
|
+
"availableFundsNonMarginableTrade": 120600.2,
|
76
|
+
"buyingPower": 276400.0,
|
77
|
+
"dayTradingBuyingPower": 343205.0,
|
78
|
+
"dayTradingBuyingPowerCall": 0.0,
|
79
|
+
"maintenanceCall": 0.0,
|
80
|
+
"regTCall": 0.0,
|
81
|
+
"isInCall": false,
|
82
|
+
"stockBuyingPower": 276400.0
|
83
|
+
}
|
84
|
+
},
|
85
|
+
"aggregatedBalance": {
|
86
|
+
"currentLiquidationValue": 173037.96,
|
87
|
+
"liquidationValue": 173037.96
|
88
|
+
}
|
89
|
+
}
|
@@ -0,0 +1,488 @@
|
|
1
|
+
[
|
2
|
+
{
|
3
|
+
"activityId": 99500791463,
|
4
|
+
"time": "2025-07-14T14:44:27+0000",
|
5
|
+
"accountNumber": "[REDACTED_ACCOUNT]",
|
6
|
+
"type": "TRADE",
|
7
|
+
"status": "VALID",
|
8
|
+
"subAccount": "MARGIN",
|
9
|
+
"tradeDate": "2025-07-14T14:44:27+0000",
|
10
|
+
"positionId": 2916240255,
|
11
|
+
"orderId": 1003712251784,
|
12
|
+
"netAmount": 17.87,
|
13
|
+
"transferItems": [
|
14
|
+
{
|
15
|
+
"instrument": {
|
16
|
+
"assetType": "CURRENCY",
|
17
|
+
"status": "ACTIVE",
|
18
|
+
"symbol": "CURRENCY_USD",
|
19
|
+
"description": "USD currency",
|
20
|
+
"instrumentId": 1,
|
21
|
+
"closingPrice": 0.0
|
22
|
+
},
|
23
|
+
"amount": 0.65,
|
24
|
+
"cost": -0.65,
|
25
|
+
"feeType": "COMMISSION"
|
26
|
+
},
|
27
|
+
{
|
28
|
+
"instrument": {
|
29
|
+
"assetType": "CURRENCY",
|
30
|
+
"status": "ACTIVE",
|
31
|
+
"symbol": "CURRENCY_USD",
|
32
|
+
"description": "USD currency",
|
33
|
+
"instrumentId": 1,
|
34
|
+
"closingPrice": 0.0
|
35
|
+
},
|
36
|
+
"amount": 0.01,
|
37
|
+
"cost": -0.01,
|
38
|
+
"feeType": "OPT_REG_FEE"
|
39
|
+
},
|
40
|
+
{
|
41
|
+
"instrument": {
|
42
|
+
"assetType": "CURRENCY",
|
43
|
+
"status": "ACTIVE",
|
44
|
+
"symbol": "CURRENCY_USD",
|
45
|
+
"description": "USD currency",
|
46
|
+
"instrumentId": 1,
|
47
|
+
"closingPrice": 0.0
|
48
|
+
},
|
49
|
+
"amount": 0.47,
|
50
|
+
"cost": -0.47,
|
51
|
+
"feeType": "INDEX_OPTION_FEE"
|
52
|
+
},
|
53
|
+
{
|
54
|
+
"instrument": {
|
55
|
+
"assetType": "OPTION",
|
56
|
+
"status": "ACTIVE",
|
57
|
+
"symbol": "SPXW 250714P06155000",
|
58
|
+
"description": "S & P 500 INDEX 07/14/2025 $6155 Put",
|
59
|
+
"instrumentId": 236651316,
|
60
|
+
"closingPrice": 0.925,
|
61
|
+
"expirationDate": "2025-07-14T04:00:00+0000",
|
62
|
+
"optionDeliverables": [
|
63
|
+
{
|
64
|
+
"rootSymbol": "SPXW",
|
65
|
+
"strikePercent": 100,
|
66
|
+
"deliverableNumber": 1,
|
67
|
+
"deliverableUnits": 100.0
|
68
|
+
}
|
69
|
+
],
|
70
|
+
"optionPremiumMultiplier": 100,
|
71
|
+
"putCall": "PUT",
|
72
|
+
"strikePrice": 6155.0,
|
73
|
+
"type": "VANILLA",
|
74
|
+
"underlyingSymbol": "SPXW"
|
75
|
+
},
|
76
|
+
"amount": -1.0,
|
77
|
+
"cost": 19.0,
|
78
|
+
"price": 0.19,
|
79
|
+
"positionEffect": "CLOSING"
|
80
|
+
}
|
81
|
+
]
|
82
|
+
},
|
83
|
+
{
|
84
|
+
"activityId": 99500791464,
|
85
|
+
"time": "2025-07-14T14:44:27+0000",
|
86
|
+
"accountNumber": "[REDACTED_ACCOUNT]",
|
87
|
+
"type": "TRADE",
|
88
|
+
"status": "VALID",
|
89
|
+
"subAccount": "MARGIN",
|
90
|
+
"tradeDate": "2025-07-14T14:44:27+0000",
|
91
|
+
"positionId": 2916240256,
|
92
|
+
"orderId": 1003712251784,
|
93
|
+
"netAmount": -25.13,
|
94
|
+
"transferItems": [
|
95
|
+
{
|
96
|
+
"instrument": {
|
97
|
+
"assetType": "CURRENCY",
|
98
|
+
"status": "ACTIVE",
|
99
|
+
"symbol": "CURRENCY_USD",
|
100
|
+
"description": "USD currency",
|
101
|
+
"instrumentId": 1,
|
102
|
+
"closingPrice": 0.0
|
103
|
+
},
|
104
|
+
"amount": 0.65,
|
105
|
+
"cost": -0.65,
|
106
|
+
"feeType": "COMMISSION"
|
107
|
+
},
|
108
|
+
{
|
109
|
+
"instrument": {
|
110
|
+
"assetType": "CURRENCY",
|
111
|
+
"status": "ACTIVE",
|
112
|
+
"symbol": "CURRENCY_USD",
|
113
|
+
"description": "USD currency",
|
114
|
+
"instrumentId": 1,
|
115
|
+
"closingPrice": 0.0
|
116
|
+
},
|
117
|
+
"amount": 0.01,
|
118
|
+
"cost": -0.01,
|
119
|
+
"feeType": "OPT_REG_FEE"
|
120
|
+
},
|
121
|
+
{
|
122
|
+
"instrument": {
|
123
|
+
"assetType": "CURRENCY",
|
124
|
+
"status": "ACTIVE",
|
125
|
+
"symbol": "CURRENCY_USD",
|
126
|
+
"description": "USD currency",
|
127
|
+
"instrumentId": 1,
|
128
|
+
"closingPrice": 0.0
|
129
|
+
},
|
130
|
+
"amount": 0.47,
|
131
|
+
"cost": -0.47,
|
132
|
+
"feeType": "INDEX_OPTION_FEE"
|
133
|
+
},
|
134
|
+
{
|
135
|
+
"instrument": {
|
136
|
+
"assetType": "OPTION",
|
137
|
+
"status": "ACTIVE",
|
138
|
+
"symbol": "SPXW 250714P06165000",
|
139
|
+
"description": "S & P 500 INDEX 07/14/2025 $6165 Put",
|
140
|
+
"instrumentId": 236791336,
|
141
|
+
"closingPrice": 1.2,
|
142
|
+
"expirationDate": "2025-07-14T04:00:00+0000",
|
143
|
+
"optionDeliverables": [
|
144
|
+
{
|
145
|
+
"rootSymbol": "SPXW",
|
146
|
+
"strikePercent": 100,
|
147
|
+
"deliverableNumber": 1,
|
148
|
+
"deliverableUnits": 100.0
|
149
|
+
}
|
150
|
+
],
|
151
|
+
"optionPremiumMultiplier": 100,
|
152
|
+
"putCall": "PUT",
|
153
|
+
"strikePrice": 6165.0,
|
154
|
+
"type": "VANILLA",
|
155
|
+
"underlyingSymbol": "SPXW"
|
156
|
+
},
|
157
|
+
"amount": 1.0,
|
158
|
+
"cost": -24.0,
|
159
|
+
"price": 0.24,
|
160
|
+
"positionEffect": "CLOSING"
|
161
|
+
}
|
162
|
+
]
|
163
|
+
},
|
164
|
+
{
|
165
|
+
"activityId": 99500791215,
|
166
|
+
"time": "2025-07-14T14:43:55+0000",
|
167
|
+
"accountNumber": "[REDACTED_ACCOUNT]",
|
168
|
+
"type": "TRADE",
|
169
|
+
"status": "VALID",
|
170
|
+
"subAccount": "MARGIN",
|
171
|
+
"tradeDate": "2025-07-14T14:43:55+0000",
|
172
|
+
"positionId": 2916240255,
|
173
|
+
"orderId": 1003712251784,
|
174
|
+
"netAmount": 18.87,
|
175
|
+
"transferItems": [
|
176
|
+
{
|
177
|
+
"instrument": {
|
178
|
+
"assetType": "CURRENCY",
|
179
|
+
"status": "ACTIVE",
|
180
|
+
"symbol": "CURRENCY_USD",
|
181
|
+
"description": "USD currency",
|
182
|
+
"instrumentId": 1,
|
183
|
+
"closingPrice": 0.0
|
184
|
+
},
|
185
|
+
"amount": 0.65,
|
186
|
+
"cost": -0.65,
|
187
|
+
"feeType": "COMMISSION"
|
188
|
+
},
|
189
|
+
{
|
190
|
+
"instrument": {
|
191
|
+
"assetType": "CURRENCY",
|
192
|
+
"status": "ACTIVE",
|
193
|
+
"symbol": "CURRENCY_USD",
|
194
|
+
"description": "USD currency",
|
195
|
+
"instrumentId": 1,
|
196
|
+
"closingPrice": 0.0
|
197
|
+
},
|
198
|
+
"amount": 0.01,
|
199
|
+
"cost": -0.01,
|
200
|
+
"feeType": "OPT_REG_FEE"
|
201
|
+
},
|
202
|
+
{
|
203
|
+
"instrument": {
|
204
|
+
"assetType": "CURRENCY",
|
205
|
+
"status": "ACTIVE",
|
206
|
+
"symbol": "CURRENCY_USD",
|
207
|
+
"description": "USD currency",
|
208
|
+
"instrumentId": 1,
|
209
|
+
"closingPrice": 0.0
|
210
|
+
},
|
211
|
+
"amount": 0.47,
|
212
|
+
"cost": -0.47,
|
213
|
+
"feeType": "INDEX_OPTION_FEE"
|
214
|
+
},
|
215
|
+
{
|
216
|
+
"instrument": {
|
217
|
+
"assetType": "OPTION",
|
218
|
+
"status": "ACTIVE",
|
219
|
+
"symbol": "SPXW 250714P06155000",
|
220
|
+
"description": "S & P 500 INDEX 07/14/2025 $6155 Put",
|
221
|
+
"instrumentId": 236651316,
|
222
|
+
"closingPrice": 0.925,
|
223
|
+
"expirationDate": "2025-07-14T04:00:00+0000",
|
224
|
+
"optionDeliverables": [
|
225
|
+
{
|
226
|
+
"rootSymbol": "SPXW",
|
227
|
+
"strikePercent": 100,
|
228
|
+
"deliverableNumber": 1,
|
229
|
+
"deliverableUnits": 100.0
|
230
|
+
}
|
231
|
+
],
|
232
|
+
"optionPremiumMultiplier": 100,
|
233
|
+
"putCall": "PUT",
|
234
|
+
"strikePrice": 6155.0,
|
235
|
+
"type": "VANILLA",
|
236
|
+
"underlyingSymbol": "SPXW"
|
237
|
+
},
|
238
|
+
"amount": -1.0,
|
239
|
+
"cost": 20.0,
|
240
|
+
"price": 0.2,
|
241
|
+
"positionEffect": "CLOSING"
|
242
|
+
}
|
243
|
+
]
|
244
|
+
},
|
245
|
+
{
|
246
|
+
"activityId": 99500791216,
|
247
|
+
"time": "2025-07-14T14:43:55+0000",
|
248
|
+
"accountNumber": "[REDACTED_ACCOUNT]",
|
249
|
+
"type": "TRADE",
|
250
|
+
"status": "VALID",
|
251
|
+
"subAccount": "MARGIN",
|
252
|
+
"tradeDate": "2025-07-14T14:43:55+0000",
|
253
|
+
"positionId": 2916240256,
|
254
|
+
"orderId": 1003712251784,
|
255
|
+
"netAmount": -26.13,
|
256
|
+
"transferItems": [
|
257
|
+
{
|
258
|
+
"instrument": {
|
259
|
+
"assetType": "CURRENCY",
|
260
|
+
"status": "ACTIVE",
|
261
|
+
"symbol": "CURRENCY_USD",
|
262
|
+
"description": "USD currency",
|
263
|
+
"instrumentId": 1,
|
264
|
+
"closingPrice": 0.0
|
265
|
+
},
|
266
|
+
"amount": 0.65,
|
267
|
+
"cost": -0.65,
|
268
|
+
"feeType": "COMMISSION"
|
269
|
+
},
|
270
|
+
{
|
271
|
+
"instrument": {
|
272
|
+
"assetType": "CURRENCY",
|
273
|
+
"status": "ACTIVE",
|
274
|
+
"symbol": "CURRENCY_USD",
|
275
|
+
"description": "USD currency",
|
276
|
+
"instrumentId": 1,
|
277
|
+
"closingPrice": 0.0
|
278
|
+
},
|
279
|
+
"amount": 0.01,
|
280
|
+
"cost": -0.01,
|
281
|
+
"feeType": "OPT_REG_FEE"
|
282
|
+
},
|
283
|
+
{
|
284
|
+
"instrument": {
|
285
|
+
"assetType": "CURRENCY",
|
286
|
+
"status": "ACTIVE",
|
287
|
+
"symbol": "CURRENCY_USD",
|
288
|
+
"description": "USD currency",
|
289
|
+
"instrumentId": 1,
|
290
|
+
"closingPrice": 0.0
|
291
|
+
},
|
292
|
+
"amount": 0.47,
|
293
|
+
"cost": -0.47,
|
294
|
+
"feeType": "INDEX_OPTION_FEE"
|
295
|
+
},
|
296
|
+
{
|
297
|
+
"instrument": {
|
298
|
+
"assetType": "OPTION",
|
299
|
+
"status": "ACTIVE",
|
300
|
+
"symbol": "SPXW 250714P06165000",
|
301
|
+
"description": "S & P 500 INDEX 07/14/2025 $6165 Put",
|
302
|
+
"instrumentId": 236791336,
|
303
|
+
"closingPrice": 1.2,
|
304
|
+
"expirationDate": "2025-07-14T04:00:00+0000",
|
305
|
+
"optionDeliverables": [
|
306
|
+
{
|
307
|
+
"rootSymbol": "SPXW",
|
308
|
+
"strikePercent": 100,
|
309
|
+
"deliverableNumber": 1,
|
310
|
+
"deliverableUnits": 100.0
|
311
|
+
}
|
312
|
+
],
|
313
|
+
"optionPremiumMultiplier": 100,
|
314
|
+
"putCall": "PUT",
|
315
|
+
"strikePrice": 6165.0,
|
316
|
+
"type": "VANILLA",
|
317
|
+
"underlyingSymbol": "SPXW"
|
318
|
+
},
|
319
|
+
"amount": 1.0,
|
320
|
+
"cost": -25.0,
|
321
|
+
"price": 0.25,
|
322
|
+
"positionEffect": "CLOSING"
|
323
|
+
}
|
324
|
+
]
|
325
|
+
},
|
326
|
+
{
|
327
|
+
"activityId": 99498794027,
|
328
|
+
"time": "2025-07-14T14:26:40+0000",
|
329
|
+
"accountNumber": "[REDACTED_ACCOUNT]",
|
330
|
+
"type": "TRADE",
|
331
|
+
"status": "VALID",
|
332
|
+
"subAccount": "MARGIN",
|
333
|
+
"tradeDate": "2025-07-14T14:26:40+0000",
|
334
|
+
"positionId": 2916240256,
|
335
|
+
"orderId": 1003712251784,
|
336
|
+
"netAmount": -26.13,
|
337
|
+
"transferItems": [
|
338
|
+
{
|
339
|
+
"instrument": {
|
340
|
+
"assetType": "CURRENCY",
|
341
|
+
"status": "ACTIVE",
|
342
|
+
"symbol": "CURRENCY_USD",
|
343
|
+
"description": "USD currency",
|
344
|
+
"instrumentId": 1,
|
345
|
+
"closingPrice": 0.0
|
346
|
+
},
|
347
|
+
"amount": 0.65,
|
348
|
+
"cost": -0.65,
|
349
|
+
"feeType": "COMMISSION"
|
350
|
+
},
|
351
|
+
{
|
352
|
+
"instrument": {
|
353
|
+
"assetType": "CURRENCY",
|
354
|
+
"status": "ACTIVE",
|
355
|
+
"symbol": "CURRENCY_USD",
|
356
|
+
"description": "USD currency",
|
357
|
+
"instrumentId": 1,
|
358
|
+
"closingPrice": 0.0
|
359
|
+
},
|
360
|
+
"amount": 0.01,
|
361
|
+
"cost": -0.01,
|
362
|
+
"feeType": "OPT_REG_FEE"
|
363
|
+
},
|
364
|
+
{
|
365
|
+
"instrument": {
|
366
|
+
"assetType": "CURRENCY",
|
367
|
+
"status": "ACTIVE",
|
368
|
+
"symbol": "CURRENCY_USD",
|
369
|
+
"description": "USD currency",
|
370
|
+
"instrumentId": 1,
|
371
|
+
"closingPrice": 0.0
|
372
|
+
},
|
373
|
+
"amount": 0.47,
|
374
|
+
"cost": -0.47,
|
375
|
+
"feeType": "INDEX_OPTION_FEE"
|
376
|
+
},
|
377
|
+
{
|
378
|
+
"instrument": {
|
379
|
+
"assetType": "OPTION",
|
380
|
+
"status": "ACTIVE",
|
381
|
+
"symbol": "SPXW 250714P06165000",
|
382
|
+
"description": "S & P 500 INDEX 07/14/2025 $6165 Put",
|
383
|
+
"instrumentId": 236791336,
|
384
|
+
"closingPrice": 1.2,
|
385
|
+
"expirationDate": "2025-07-14T04:00:00+0000",
|
386
|
+
"optionDeliverables": [
|
387
|
+
{
|
388
|
+
"rootSymbol": "SPXW",
|
389
|
+
"strikePercent": 100,
|
390
|
+
"deliverableNumber": 1,
|
391
|
+
"deliverableUnits": 100.0
|
392
|
+
}
|
393
|
+
],
|
394
|
+
"optionPremiumMultiplier": 100,
|
395
|
+
"putCall": "PUT",
|
396
|
+
"strikePrice": 6165.0,
|
397
|
+
"type": "VANILLA",
|
398
|
+
"underlyingSymbol": "SPXW"
|
399
|
+
},
|
400
|
+
"amount": 1.0,
|
401
|
+
"cost": -25.0,
|
402
|
+
"price": 0.25,
|
403
|
+
"positionEffect": "CLOSING"
|
404
|
+
}
|
405
|
+
]
|
406
|
+
},
|
407
|
+
{
|
408
|
+
"activityId": 99498794026,
|
409
|
+
"time": "2025-07-14T14:26:40+0000",
|
410
|
+
"accountNumber": "[REDACTED_ACCOUNT]",
|
411
|
+
"type": "TRADE",
|
412
|
+
"status": "VALID",
|
413
|
+
"subAccount": "MARGIN",
|
414
|
+
"tradeDate": "2025-07-14T14:26:40+0000",
|
415
|
+
"positionId": 2916240255,
|
416
|
+
"orderId": 1003712251784,
|
417
|
+
"netAmount": 18.87,
|
418
|
+
"transferItems": [
|
419
|
+
{
|
420
|
+
"instrument": {
|
421
|
+
"assetType": "CURRENCY",
|
422
|
+
"status": "ACTIVE",
|
423
|
+
"symbol": "CURRENCY_USD",
|
424
|
+
"description": "USD currency",
|
425
|
+
"instrumentId": 1,
|
426
|
+
"closingPrice": 0.0
|
427
|
+
},
|
428
|
+
"amount": 0.65,
|
429
|
+
"cost": -0.65,
|
430
|
+
"feeType": "COMMISSION"
|
431
|
+
},
|
432
|
+
{
|
433
|
+
"instrument": {
|
434
|
+
"assetType": "CURRENCY",
|
435
|
+
"status": "ACTIVE",
|
436
|
+
"symbol": "CURRENCY_USD",
|
437
|
+
"description": "USD currency",
|
438
|
+
"instrumentId": 1,
|
439
|
+
"closingPrice": 0.0
|
440
|
+
},
|
441
|
+
"amount": 0.01,
|
442
|
+
"cost": -0.01,
|
443
|
+
"feeType": "OPT_REG_FEE"
|
444
|
+
},
|
445
|
+
{
|
446
|
+
"instrument": {
|
447
|
+
"assetType": "CURRENCY",
|
448
|
+
"status": "ACTIVE",
|
449
|
+
"symbol": "CURRENCY_USD",
|
450
|
+
"description": "USD currency",
|
451
|
+
"instrumentId": 1,
|
452
|
+
"closingPrice": 0.0
|
453
|
+
},
|
454
|
+
"amount": 0.47,
|
455
|
+
"cost": -0.47,
|
456
|
+
"feeType": "INDEX_OPTION_FEE"
|
457
|
+
},
|
458
|
+
{
|
459
|
+
"instrument": {
|
460
|
+
"assetType": "OPTION",
|
461
|
+
"status": "ACTIVE",
|
462
|
+
"symbol": "SPXW 250714P06155000",
|
463
|
+
"description": "S & P 500 INDEX 07/14/2025 $6155 Put",
|
464
|
+
"instrumentId": 236651316,
|
465
|
+
"closingPrice": 0.925,
|
466
|
+
"expirationDate": "2025-07-14T04:00:00+0000",
|
467
|
+
"optionDeliverables": [
|
468
|
+
{
|
469
|
+
"rootSymbol": "SPXW",
|
470
|
+
"strikePercent": 100,
|
471
|
+
"deliverableNumber": 1,
|
472
|
+
"deliverableUnits": 100.0
|
473
|
+
}
|
474
|
+
],
|
475
|
+
"optionPremiumMultiplier": 100,
|
476
|
+
"putCall": "PUT",
|
477
|
+
"strikePrice": 6155.0,
|
478
|
+
"type": "VANILLA",
|
479
|
+
"underlyingSymbol": "SPXW"
|
480
|
+
},
|
481
|
+
"amount": -1.0,
|
482
|
+
"cost": 20.0,
|
483
|
+
"price": 0.2,
|
484
|
+
"positionEffect": "CLOSING"
|
485
|
+
}
|
486
|
+
]
|
487
|
+
}
|
488
|
+
]
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: schwab_mcp
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Joseph Platta
|
8
8
|
bindir: exe
|
9
9
|
cert_chain: []
|
10
|
-
date: 2025-
|
10
|
+
date: 2025-08-13 00:00:00.000000000 Z
|
11
11
|
dependencies:
|
12
12
|
- !ruby/object:Gem::Dependency
|
13
13
|
name: mcp
|
@@ -48,26 +48,28 @@ executables:
|
|
48
48
|
extensions: []
|
49
49
|
extra_rdoc_files: []
|
50
50
|
files:
|
51
|
+
- ".claude/settings.json"
|
51
52
|
- ".copilotignore"
|
52
53
|
- ".rspec"
|
53
54
|
- ".rubocop.yml"
|
54
55
|
- CHANGELOG.md
|
56
|
+
- CLAUDE.md
|
55
57
|
- CODE_OF_CONDUCT.md
|
56
58
|
- LICENSE.txt
|
57
59
|
- README.md
|
58
60
|
- Rakefile
|
61
|
+
- debug_env.rb
|
62
|
+
- doc/DATA_OBJECTS_MIGRATION_TODO.md
|
63
|
+
- doc/SCHWAB_CLIENT_FACTORY_REFACTOR_PLAN.md
|
59
64
|
- exe/schwab_mcp
|
60
65
|
- exe/schwab_token_refresh
|
61
66
|
- exe/schwab_token_reset
|
62
67
|
- lib/schwab_mcp.rb
|
63
68
|
- lib/schwab_mcp/loggable.rb
|
64
69
|
- lib/schwab_mcp/logger.rb
|
65
|
-
- lib/schwab_mcp/option_chain_filter.rb
|
66
|
-
- lib/schwab_mcp/orders/iron_condor_order.rb
|
67
|
-
- lib/schwab_mcp/orders/order_factory.rb
|
68
|
-
- lib/schwab_mcp/orders/vertical_order.rb
|
69
70
|
- lib/schwab_mcp/redactor.rb
|
70
71
|
- lib/schwab_mcp/resources/.keep
|
72
|
+
- lib/schwab_mcp/schwab_client_factory.rb
|
71
73
|
- lib/schwab_mcp/tools/cancel_order_tool.rb
|
72
74
|
- lib/schwab_mcp/tools/get_market_hours_tool.rb
|
73
75
|
- lib/schwab_mcp/tools/get_order_tool.rb
|
@@ -78,7 +80,6 @@ files:
|
|
78
80
|
- lib/schwab_mcp/tools/list_movers_tool.rb
|
79
81
|
- lib/schwab_mcp/tools/list_schwab_accounts_tool.rb
|
80
82
|
- lib/schwab_mcp/tools/option_chain_tool.rb
|
81
|
-
- lib/schwab_mcp/tools/option_strategy_finder_tool.rb
|
82
83
|
- lib/schwab_mcp/tools/place_order_tool.rb
|
83
84
|
- lib/schwab_mcp/tools/preview_order_tool.rb
|
84
85
|
- lib/schwab_mcp/tools/quote_tool.rb
|
@@ -86,8 +87,14 @@ files:
|
|
86
87
|
- lib/schwab_mcp/tools/replace_order_tool.rb
|
87
88
|
- lib/schwab_mcp/tools/schwab_account_details_tool.rb
|
88
89
|
- lib/schwab_mcp/version.rb
|
90
|
+
- orders_example.json
|
89
91
|
- sig/schwab_mcp.rbs
|
92
|
+
- spx_option_chain.json
|
90
93
|
- start_mcp_server.sh
|
94
|
+
- test_mcp.rb
|
95
|
+
- test_server.rb
|
96
|
+
- trading_brokerage_account_details.json
|
97
|
+
- transactions_example.json
|
91
98
|
homepage: https://github.com/jwplatta/schwab_mcp
|
92
99
|
licenses:
|
93
100
|
- MIT
|
@@ -95,6 +102,9 @@ metadata:
|
|
95
102
|
homepage_uri: https://github.com/jwplatta/schwab_mcp
|
96
103
|
source_code_uri: https://github.com/jwplatta/schwab_mcp
|
97
104
|
changelog_uri: https://github.com/jwplatta/schwab_mcp/blob/main/CHANGELOG.md
|
105
|
+
rubygems_uri: https://rubygems.org/gems/schwab_mcp
|
106
|
+
documentation_uri: https://rubydoc.info/gems/schwab_mcp
|
107
|
+
bug_tracker_uri: https://github.com/jwplatta/schwab_mcp/issues
|
98
108
|
rdoc_options: []
|
99
109
|
require_paths:
|
100
110
|
- lib
|