@@ -442,7 +442,8 @@ The files for the dev container are located in `/.devcontainer/` folder.
442442 - Make sure to set APP_ENV to "**dev**" in `.env` file.
443443 - For local development, make sure to include below env variables in the `.env`
444444 - `BACKEND_API_URL=http://localhost:8000`
445- - `FRONTEND_SITE_NAME=http://127.0.0.1:3000` .
445+ - `FRONTEND_SITE_NAME=http://127.0.0.1:3000`
446+ - `MCP_SERVER_ENDPOINT=http://localhost:9000/mcp`.
446447
4474487. **(Optional) Set up a virtual environment:**
448449
@@ -474,7 +475,16 @@ The files for the dev container are located in `/.devcontainer/` folder.
474475 npm run build
475476 ```
476477
477- 10. **Run the application:**
478+ 10. **Install requirements - MCP server:**
479+
480+ - To install the requirement for mcp server -
481+ Open a terminal in the `src/mcp_server` folder and run:
482+ ```bash
483+ pip install uv
484+ uv sync
485+ ```
486+
487+ 11. **Run the application:**
478488
479489- From the `src/backend` directory activate the virtual environment created through step 8 and Run:
480490
@@ -494,14 +504,20 @@ or Run
494504 npm run dev
495505 ```
496506
507+ - From the `src/mcp_server` directory activate the virtual environment created through step 10 and Run:
508+
509+ ```bash
510+ python mcp_server.py --transport streamable-http --host 0.0.0.0 --port 9000
511+ ```
512+
49751311. Open a browser and navigate to `http://localhost:3000`
49851412. To see swagger API documentation, you can navigate to `http://localhost:8000/docs`
499515
500516## Deploy Your local changes
501517To Deploy your local changes rename the below files.
502518 1. Rename `azure.yaml` to `azure_custom2.yaml` and `azure_custom.yaml` to `azure.yaml`.
503519 2. Go to `infra` directory
504- - Remove `main.bicep` to `main_custom2.bicep` and `main_custom.bicep` to `main.bicep`.
520+ - Rename `main.bicep` to `main_custom2.bicep` and `main_custom.bicep` to `main.bicep`.
505521Continue with the [deploying steps](#deploying-with-azd).
506522
507523
@@ -510,15 +526,26 @@ Continue with the [deploying steps](#deploying-with-azd).
510526You can debug the API backend running locally with VSCode using the following launch.json entry:
511527
512528```
513- {
514- "name": "Python Debugger: Backend",
515- "type": "debugpy",
516- "request": "launch",
517- "cwd": "${workspaceFolder}/src/backend",
518- "module": "uvicorn",
519- "args": ["app:app", "--reload"],
520- "jinja": true
521- }
529+ {
530+ "name": "Debug Backend (FastAPI)",
531+ "type": "debugpy",
532+ "request": "launch",
533+ "program": "${workspaceFolder}/src/backend/app_kernel.py",
534+ "cwd": "${workspaceFolder}/src/backend",
535+ "console": "integratedTerminal",
536+ "justMyCode": false,
537+ "python": "${workspaceFolder}/src/backend/.venv/Scripts/python.exe",
538+ "env": {
539+ "PYTHONPATH": "${workspaceFolder}/src/backend",
540+ "UVICORN_LOG_LEVEL": "debug"
541+ },
542+ "args": [],
543+ "serverReadyAction": {
544+ "pattern": "Uvicorn running on (https?://[^\\s]+)",
545+ "uriFormat": "%s",
546+ "action": "openExternally"
547+ }
548+ }
522549```
523550
524551To debug the python server in the frontend directory (frontend_server.py) and related, add the following launch.json entry:
@@ -534,3 +561,26 @@ To debug the python server in the frontend directory (frontend_server.py) and re
534561 "jinja": true
535562 }
536563```
564+
565+ To debug the MCP server by adding the following launch.json entry:
566+
567+ ```
568+ {
569+ "name": "Debug MCP Server",
570+ "type": "debugpy",
571+ "request": "launch",
572+ "program": "${workspaceFolder}/src/mcp_server/mcp_server.py",
573+ "cwd": "${workspaceFolder}/src/mcp_server",
574+ "console": "integratedTerminal",
575+ "justMyCode": false,
576+ "python": "${workspaceFolder}/src/mcp_server/.venv/Scripts/python.exe",
577+ "env": {
578+ "PYTHONPATH": "${workspaceFolder}/src/mcp_server"
579+ },
580+ "args": [
581+ "--transport", "streamable-http",
582+ "--host", "0.0.0.0",
583+ "--port", "9000"
584+ ]
585+ }
586+ ```
0 commit comments