pub fn write_mcp_registry(
ctx: &PluginContext,
cfg: &SsgConfig,
agents: &AgentsConfig,
) -> Result<(), SsgError>Expand description
Render and write .well-known/mcp.json under ctx.site_dir.
§Errors
Returns SsgError::Io if the .well-known directory cannot be
created or the registry file cannot be written.
§Examples
use ssg::cmd::SsgConfig;
use ssg::plugin::PluginContext;
use ssg::postprocess::agentic_discovery::{AgentsConfig, write_mcp_registry};
let tmp = tempfile::tempdir().unwrap();
let cfg = SsgConfig::builder()
.site_name("Example".into())
.base_url("https://example.com".into())
.build()
.unwrap();
let mut agents = AgentsConfig::default();
agents.mcp.enabled = true;
let ctx = PluginContext::new(tmp.path(), tmp.path(), tmp.path(), tmp.path());
write_mcp_registry(&ctx, &cfg, &agents).unwrap();
assert!(tmp.path().join(".well-known/mcp.json").exists());