fix: read Caldera host, port, and API key from conf/default.yml#6
Open
ChenFryd wants to merge 1 commit into
Open
fix: read Caldera host, port, and API key from conf/default.yml#6ChenFryd wants to merge 1 commit into
ChenFryd wants to merge 1 commit into
Conversation
mcp_server.py hardcoded localhost:8888 and ADMIN123 as the Caldera API connection details, ignoring the values configured in conf/default.yml. The fix reads host, port, and api_key_red from the Caldera config in get_env() in both mcp_planner_client.py and mcp_factory_client.py, and passes them to the mcp_server.py subprocess as CALDERA_URL and CALDERA_API_KEY environment variables. mcp_server.py now reads these via os.environ.get() with the original hardcoded values as fallbacks. Closes mitre#5
|
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
app/mcp_server.pyhardcoded the Caldera API connection details (localhost:8888andADMIN123), completely ignoring thehost,port, andapi_key_redvalues configured inconf/default.yml. This caused all MCP tool calls to fail when Caldera is deployed on a non-localhost IP or with a non-default port/API key.The fix reads those values in
get_env()in bothmcp_planner_client.pyandmcp_factory_client.py, and passes them to themcp_server.pysubprocess asCALDERA_URLandCALDERA_API_KEYenvironment variables — following the same pattern already used for LLM config.mcp_server.pyreads them viaos.environ.get()with the original hardcoded values as safe fallbacks.Closes #5
Type of change
How Has This Been Tested?
Manually tested by configuring Caldera with
host: 203.0.113.1inconf/default.ymland triggering both factory and planner MCP executions. Prior to the fix all API calls failed with a connection error; after the fix the MCP server correctly connects to the configured host, port, and API key.Checklist: