JC321 commited on
Commit
90006f9
·
verified ·
1 Parent(s): a83fef2

Upload 7 files

Browse files
Files changed (4) hide show
  1. Dockerfile +3 -2
  2. README.md +1 -0
  3. app.py +12 -0
  4. requirements.txt +3 -3
Dockerfile CHANGED
@@ -1,4 +1,4 @@
1
- FROM python:3.10-slim
2
 
3
  WORKDIR /app
4
 
@@ -15,6 +15,7 @@ RUN pip install --no-cache-dir -r requirements.txt
15
  COPY edgar_client.py .
16
  COPY financial_analyzer.py .
17
  COPY mcp_server_fastmcp.py .
 
18
 
19
  # Expose port
20
  EXPOSE 7860
@@ -28,4 +29,4 @@ HEALTHCHECK --interval=30s --timeout=10s --start-period=40s --retries=3 \
28
  CMD curl -f http://localhost:7860/ || exit 1
29
 
30
  # Run MCP Server with FastMCP (SSE transport)
31
- CMD ["python", "-m", "mcp.server.fastmcp", "mcp_server_fastmcp:mcp"]
 
1
+ FROM python:3.10-slim
2
 
3
  WORKDIR /app
4
 
 
15
  COPY edgar_client.py .
16
  COPY financial_analyzer.py .
17
  COPY mcp_server_fastmcp.py .
18
+ COPY app.py .
19
 
20
  # Expose port
21
  EXPOSE 7860
 
29
  CMD curl -f http://localhost:7860/ || exit 1
30
 
31
  # Run MCP Server with FastMCP (SSE transport)
32
+ CMD ["python", "app.py"]
README.md CHANGED
@@ -5,6 +5,7 @@ colorFrom: blue
5
  colorTo: green
6
  sdk: docker
7
  app_port: 7860
 
8
  pinned: false
9
  ---
10
 
 
5
  colorTo: green
6
  sdk: docker
7
  app_port: 7860
8
+ app_file: app.py
9
  pinned: false
10
  ---
11
 
app.py ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """
2
+ MCP Server Entry Point for Hugging Face Space
3
+ This file is required by HF Space as the main application entry point.
4
+ """
5
+
6
+ from mcp_server_fastmcp import mcp
7
+
8
+ # Entry point for Hugging Face Space
9
+ if __name__ == "__main__":
10
+ # Run with SSE transport
11
+ # HF Space will expose this at port 7860
12
+ mcp.run(transport="sse")
requirements.txt CHANGED
@@ -1,11 +1,11 @@
1
- # MCP SDK (Anthropic Official)
2
  mcp[cli]==1.2.0
3
 
4
  # FastAPI and Server (kept for compatibility)
5
  fastapi==0.109.0
6
  uvicorn[standard]==0.27.0
7
- pydantic==2.5.3
8
 
9
  # SEC EDGAR API
10
  sec-edgar-api==1.1.0
11
- requests==2.31.0
 
1
+ # MCP SDK (Anthropic Official)
2
  mcp[cli]==1.2.0
3
 
4
  # FastAPI and Server (kept for compatibility)
5
  fastapi==0.109.0
6
  uvicorn[standard]==0.27.0
7
+ pydantic>=2.10.1
8
 
9
  # SEC EDGAR API
10
  sec-edgar-api==1.1.0
11
+ requests==2.31.0