feat: prefer ~/.config/coyote/mcp.json for the user-scope MCP config
The user-scope MCP config historically lived at <config-dir>/functions/mcp.json, a leftover from when MCP support was part of the llm-functions tooling. It now resolves through a single choke point with these semantics: - Preferred location: <config-dir>/mcp.json (created there on first run) - Historical <config-dir>/functions/mcp.json still honored when the preferred file does not exist, so existing installs are unchanged - If both exist, the preferred location wins --info/.info now reports the resolved location as mcp_config_file, and the --scope help text plus config.agent.example.yaml reference the new default. This also removes the asymmetry with the workspace scope, which already used .coyote/mcp.json directly.
This commit is contained in:
+5
-1
@@ -517,7 +517,11 @@ impl Functions {
|
||||
anyhow!("Failed to load embedded function file: {}", file.as_ref())
|
||||
})?;
|
||||
let content = unsafe { std::str::from_utf8_unchecked(&embedded_file.data) };
|
||||
let file_path = paths::functions_dir().join(file.as_ref());
|
||||
let file_path = if file.as_ref() == "mcp.json" {
|
||||
paths::mcp_config_file()
|
||||
} else {
|
||||
paths::functions_dir().join(file.as_ref())
|
||||
};
|
||||
let is_script = file_path
|
||||
.extension()
|
||||
.and_then(OsStr::to_str)
|
||||
|
||||
Reference in New Issue
Block a user