JC321 commited on
Commit
cd1f91e
·
verified ·
1 Parent(s): d0dfb5d

Upload 2 files

Browse files
Files changed (2) hide show
  1. README.md +5 -4
  2. app.py +44 -0
README.md CHANGED
@@ -100,17 +100,18 @@ pinned: false
100
 
101
  ```bash
102
  pip install -r requirements.txt
103
- python mcp_server_fastmcp.py
104
  ```
105
 
106
- 服务将启动在 `http://0.0.0.0:8000/sse`
107
 
108
  ## 📦 依赖
109
 
110
  - `mcp[cli]==1.2.0` - Anthropic 官方 MCP SDK
111
  - `sec-edgar-api==1.1.0` - SEC EDGAR API
112
- - `fastapi==0.109.0` - Web 框架(FastMCP 依赖)
113
- - `uvicorn[standard]==0.27.0` - ASGI 服务器
 
114
 
115
  ## 🔄 从旧版本迁移
116
 
 
100
 
101
  ```bash
102
  pip install -r requirements.txt
103
+ python app.py
104
  ```
105
 
106
+ 服务将启动在 `http://0.0.0.0:7860/sse`
107
 
108
  ## 📦 依赖
109
 
110
  - `mcp[cli]==1.2.0` - Anthropic 官方 MCP SDK
111
  - `sec-edgar-api==1.1.0` - SEC EDGAR API
112
+ - `fastapi==0.109.0` - Web 框架
113
+ - `uvicorn[standard]>=0.30` - ASGI 服务器(mcp 要求 >=0.30)
114
+ - `pydantic>=2.10.1` - 数据验证(mcp 要求 >=2.10.1)
115
 
116
  ## 🔄 从旧版本迁移
117
 
app.py CHANGED
@@ -299,6 +299,10 @@ HTML_CONTENT = """
299
  <ul>
300
  <li><code>company_name</code> (string): Company name (e.g., "Tesla", "Apple")</li>
301
  </ul>
 
 
 
 
302
  <strong>Returns:</strong> Company CIK, name, tickers, SIC code
303
  </div>
304
 
@@ -309,6 +313,10 @@ HTML_CONTENT = """
309
  <ul>
310
  <li><code>cik</code> (string): Company CIK code (10-digit format)</li>
311
  </ul>
 
 
 
 
312
  </div>
313
 
314
  <div class="tool">
@@ -319,6 +327,11 @@ HTML_CONTENT = """
319
  <li><code>cik</code> (string): Company CIK code</li>
320
  <li><code>form_types</code> (array, optional): Filter by form types</li>
321
  </ul>
 
 
 
 
 
322
  </div>
323
 
324
  <div class="tool">
@@ -329,6 +342,18 @@ HTML_CONTENT = """
329
  <li><code>cik</code> (string): Company CIK code</li>
330
  <li><code>period</code> (string): Period format "YYYY" or "YYYYQX"</li>
331
  </ul>
 
 
 
 
 
 
 
 
 
 
 
 
332
  </div>
333
 
334
  <div class="tool">
@@ -339,6 +364,11 @@ HTML_CONTENT = """
339
  <li><code>cik</code> (string): Company CIK code</li>
340
  <li><code>years</code> (integer): Number of years (1-10, default: 3)</li>
341
  </ul>
 
 
 
 
 
342
  <strong>Returns:</strong> Multi-year data sorted newest first (FY → Q4 → Q3 → Q2 → Q1)
343
  </div>
344
 
@@ -349,6 +379,10 @@ HTML_CONTENT = """
349
  <ul>
350
  <li><code>cik</code> (string): Company CIK code</li>
351
  </ul>
 
 
 
 
352
  </div>
353
 
354
  <div class="tool">
@@ -358,6 +392,16 @@ HTML_CONTENT = """
358
  <ul>
359
  <li><code>company_input</code> (string): Company name, ticker, or CIK</li>
360
  </ul>
 
 
 
 
 
 
 
 
 
 
361
  </div>
362
 
363
  <h2>📝 How to Use</h2>
 
299
  <ul>
300
  <li><code>company_name</code> (string): Company name (e.g., "Tesla", "Apple")</li>
301
  </ul>
302
+ <strong>Example:</strong>
303
+ <div class="code"><pre>{
304
+ "company_name": "Tesla"
305
+ }</pre></div>
306
  <strong>Returns:</strong> Company CIK, name, tickers, SIC code
307
  </div>
308
 
 
313
  <ul>
314
  <li><code>cik</code> (string): Company CIK code (10-digit format)</li>
315
  </ul>
316
+ <strong>Example:</strong>
317
+ <div class="code"><pre>{
318
+ "cik": "0001318605"
319
+ }</pre></div>
320
  </div>
321
 
322
  <div class="tool">
 
327
  <li><code>cik</code> (string): Company CIK code</li>
328
  <li><code>form_types</code> (array, optional): Filter by form types</li>
329
  </ul>
330
+ <strong>Example:</strong>
331
+ <div class="code"><pre>{
332
+ "cik": "0001318605",
333
+ "form_types": ["10-K", "10-Q"]
334
+ }</pre></div>
335
  </div>
336
 
337
  <div class="tool">
 
342
  <li><code>cik</code> (string): Company CIK code</li>
343
  <li><code>period</code> (string): Period format "YYYY" or "YYYYQX"</li>
344
  </ul>
345
+ <strong>Examples:</strong>
346
+ <div class="code"><pre>// Annual data
347
+ {
348
+ "cik": "0001318605",
349
+ "period": "2024"
350
+ }
351
+
352
+ // Quarterly data
353
+ {
354
+ "cik": "0001318605",
355
+ "period": "2024Q3"
356
+ }</pre></div>
357
  </div>
358
 
359
  <div class="tool">
 
364
  <li><code>cik</code> (string): Company CIK code</li>
365
  <li><code>years</code> (integer): Number of years (1-10, default: 3)</li>
366
  </ul>
367
+ <strong>Example:</strong>
368
+ <div class="code"><pre>{
369
+ "cik": "0001318605",
370
+ "years": 3
371
+ }</pre></div>
372
  <strong>Returns:</strong> Multi-year data sorted newest first (FY → Q4 → Q3 → Q2 → Q1)
373
  </div>
374
 
 
379
  <ul>
380
  <li><code>cik</code> (string): Company CIK code</li>
381
  </ul>
382
+ <strong>Example:</strong>
383
+ <div class="code"><pre>{
384
+ "cik": "0001318605"
385
+ }</pre></div>
386
  </div>
387
 
388
  <div class="tool">
 
392
  <ul>
393
  <li><code>company_input</code> (string): Company name, ticker, or CIK</li>
394
  </ul>
395
+ <strong>Examples:</strong>
396
+ <div class="code"><pre>// By company name
397
+ {
398
+ "company_input": "Tesla"
399
+ }
400
+
401
+ // By CIK
402
+ {
403
+ "company_input": "0001318605"
404
+ }</pre></div>
405
  </div>
406
 
407
  <h2>📝 How to Use</h2>