pub struct SSEProxy { /* private fields */ }
Expand description
SSE Proxy server for MCP servers
Provides an HTTP and SSE proxy that allows web clients to interact with MCP servers using Actix Web. The proxy supports authentication, server listing, tool calls, and resource retrieval.
Implementations§
Source§impl SSEProxy
impl SSEProxy
Sourcepub async fn start_proxy(
runner_access: SSEProxyRunnerAccess,
config: SSEProxyConfig,
) -> Result<SSEProxyHandle>
pub async fn start_proxy( runner_access: SSEProxyRunnerAccess, config: SSEProxyConfig, ) -> Result<SSEProxyHandle>
Start the SSE proxy server
Creates a proxy handle and starts the server in a background task. Returns a handle that can be used to control and communicate with the proxy.
§Arguments
runner_access
- Functions to access McpRunner operationsconfig
- Configuration for the SSE proxy
§Returns
A Result
containing a SSEProxyHandle
or an error
Sourcepub async fn process_tool_call(
&self,
server_name: &str,
tool_name: &str,
args: Value,
request_id: &str,
) -> Result<()>
pub async fn process_tool_call( &self, server_name: &str, tool_name: &str, args: Value, request_id: &str, ) -> Result<()>
Sourcepub fn get_server_info(&self) -> &Arc<Mutex<HashMap<String, ServerInfo>>>
pub fn get_server_info(&self) -> &Arc<Mutex<HashMap<String, ServerInfo>>>
Get the server information cache
Sourcepub fn get_runner_access(&self) -> &SSEProxyRunnerAccess
pub fn get_runner_access(&self) -> &SSEProxyRunnerAccess
Get the runner access functions
Sourcepub fn event_manager(&self) -> &Arc<EventManager>
pub fn event_manager(&self) -> &Arc<EventManager>
Get the event manager
Sourcepub fn config(&self) -> &SSEProxyConfig
pub fn config(&self) -> &SSEProxyConfig
Get the configuration
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SSEProxy
impl !RefUnwindSafe for SSEProxy
impl Send for SSEProxy
impl Sync for SSEProxy
impl Unpin for SSEProxy
impl !UnwindSafe for SSEProxy
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more