File size: 573 Bytes
c981f27 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | use std::collections::BTreeMap;
use forge_app::McpServerInfra;
use forge_domain::{Environment, McpServerConfig};
use crate::mcp_client::ForgeMcpClient;
#[derive(Clone)]
pub struct ForgeMcpServer;
#[async_trait::async_trait]
impl McpServerInfra for ForgeMcpServer {
type Client = ForgeMcpClient;
async fn connect(
&self,
config: McpServerConfig,
env_vars: &BTreeMap<String, String>,
environment: &Environment,
) -> anyhow::Result<Self::Client> {
Ok(ForgeMcpClient::new(config, env_vars, environment.clone()))
}
}
|