pub struct McpCapabilityProvider { /* private fields */ }Expand description
A CapabilityProvider that surfaces MCP tools, resources, and prompts.
The tool side is built by wrapping McpToolAdapters in
agentkit_tools_core::ToolInvocableAdapter, so the same
permission-check + adapter-spec plumbing the rest of agentkit uses also
applies to MCP tools — this crate no longer ships its own
McpInvocable.
Implementations§
Source§impl McpCapabilityProvider
impl McpCapabilityProvider
Sourcepub fn from_snapshot(
connection: Arc<McpConnection>,
snapshot: &McpDiscoverySnapshot,
) -> Self
pub fn from_snapshot( connection: Arc<McpConnection>, snapshot: &McpDiscoverySnapshot, ) -> Self
Builds a capability provider from an existing connection and snapshot,
using the McpToolNamespace::Default tool naming strategy.
Sourcepub fn from_snapshot_with_namespace(
connection: Arc<McpConnection>,
snapshot: &McpDiscoverySnapshot,
namespace: &McpToolNamespace,
) -> Self
pub fn from_snapshot_with_namespace( connection: Arc<McpConnection>, snapshot: &McpDiscoverySnapshot, namespace: &McpToolNamespace, ) -> Self
Builds a capability provider with a custom tool naming strategy.
Sourcepub fn merge<I>(providers: I) -> Selfwhere
I: IntoIterator<Item = Self>,
pub fn merge<I>(providers: I) -> Selfwhere
I: IntoIterator<Item = Self>,
Merges multiple capability providers into one.
Sourcepub async fn connect(
config: &McpServerConfig,
) -> Result<(Arc<McpConnection>, Self, McpDiscoverySnapshot), McpError>
pub async fn connect( config: &McpServerConfig, ) -> Result<(Arc<McpConnection>, Self, McpDiscoverySnapshot), McpError>
Connects to an MCP server, performs discovery, and builds a provider.
Trait Implementations§
Source§impl CapabilityProvider for McpCapabilityProvider
impl CapabilityProvider for McpCapabilityProvider
Auto Trait Implementations§
impl !RefUnwindSafe for McpCapabilityProvider
impl !UnwindSafe for McpCapabilityProvider
impl Freeze for McpCapabilityProvider
impl Send for McpCapabilityProvider
impl Sync for McpCapabilityProvider
impl Unpin for McpCapabilityProvider
impl UnsafeUnpin for McpCapabilityProvider
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