Skip to content

Commit 5977785

Browse files
committed
Use configurable MCP server settings
MCP server name and description now default to 'MCPGreetingServer' and a descriptive string if not set in environment. MCPConfig now reads endpoint, name, and description from app config for improved flexibility.
1 parent c09db80 commit 5977785

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/backend/common/config/app_config.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,8 @@ def __init__(self):
7474
# Optional MCP server endpoint (for local MCP server or remote)
7575
# Example: http://127.0.0.1:8000/mcp
7676
self.MCP_SERVER_ENDPOINT = self._get_optional("MCP_SERVER_ENDPOINT")
77-
self.MCP_SERVER_NAME = self._get_optional("MCP_SERVER_NAME")
78-
self.MCP_SERVER_DESCRIPTION = self._get_optional("MCP_SERVER_DESCRIPTION")
77+
self.MCP_SERVER_NAME = self._get_optional("MCP_SERVER_NAME", "MCPGreetingServer")
78+
self.MCP_SERVER_DESCRIPTION = self._get_optional("MCP_SERVER_DESCRIPTION", "MCP server with greeting and planning tools")
7979
self.TENANT_ID = self._get_optional("TENANT_ID")
8080
self.CLIENT_ID = self._get_optional("CLIENT_ID")
8181
self.AZURE_AI_SEARCH_CONNECTION_NAME = self._get_optional("AZURE_AI_SEARCH_CONNECTION_NAME")

src/backend/v3/config/settings.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,9 @@ class MCPConfig:
5555
"""MCP server configuration."""
5656

5757
def __init__(self):
58-
self.url = "http://127.0.0.1:8000/mcp/"
59-
self.name = "MCPGreetingServer"
60-
self.description = "MCP server with greeting and planning tools"
58+
self.url = config.MCP_SERVER_ENDPOINT
59+
self.name = config.MCP_SERVER_NAME
60+
self.description = config.MCP_SERVER_DESCRIPTION
6161

6262
def get_headers(self, token: str):
6363
"""Get MCP headers with authentication token."""

0 commit comments

Comments
 (0)