Skip to content

Commit 57cdaca

Browse files
committed
added swagger path in readme
1 parent 5a0ae0c commit 57cdaca

File tree

4 files changed

+18
-34
lines changed

4 files changed

+18
-34
lines changed

src/mcp_foundry/__main__.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,16 @@
55
from typing import Literal
66
from dotenv import load_dotenv
77

8-
from mcp_foundry.logging_config import configure_utf8_logging
9-
configure_utf8_logging()
8+
from .mcp_server import mcp, auto_import_modules
109

11-
logger = logging.getLogger(__name__)
1210

13-
from .mcp_server import mcp, auto_import_modules
11+
# Configure logging
12+
logging.basicConfig(
13+
level=logging.INFO,
14+
format="%(asctime)s - %(name)s - %(levelname)s - %(message)s",
15+
stream=sys.stderr,
16+
)
17+
logger = logging.getLogger("__main__")
1418

1519
def main() -> None:
1620
"""Runs the MCP server"""

src/mcp_foundry/logging_config.py

Lines changed: 0 additions & 27 deletions
This file was deleted.

src/mcp_foundry/mcp_foundry_finetuning/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ Dynamic tools are generated automatically from the Swagger specification (`swagg
6262
- Define request/response schemas in the `components` section for better validation and documentation.
6363

6464
3. **Set the Swagger path:**
65-
- Ensure the `SWAGGER_PATH` environment variable is set to the path of your `swagger.yaml` file (usually in your `.env`).
65+
- Ensure the `SWAGGER_PATH` environment variable is set to the path of your `swagger.yaml` file (found in `.env`).
6666
- Example: `SWAGGER_PATH=./swagger.yaml`
6767

6868
4. **Restart the MCP server:**

src/mcp_foundry/mcp_server.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,13 @@
66

77
mcp = FastMCP("azure-ai-foundry-mcp-server")
88

9-
logger = logging.getLogger(__name__)
9+
# Configure logging
10+
logging.basicConfig(
11+
level=logging.INFO,
12+
format="%(asctime)s - %(name)s - %(levelname)s - %(message)s",
13+
stream=sys.stderr,
14+
)
15+
logger = logging.getLogger("mcp_server")
1016

1117
def auto_import_modules(base_package: str, targets: list[str]):
1218
"""
@@ -30,4 +36,5 @@ def auto_import_modules(base_package: str, targets: list[str]):
3036
except ModuleNotFoundError:
3137
logger.warning(f"⚠️ Skipping {module_name} (not found)")
3238
except Exception as e:
33-
logger.error(f"❌ Error importing {module_name}: {e}")
39+
logger.error(f"❌ Error importing {module_name}: {e}")
40+

0 commit comments

Comments
 (0)