Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

feat(mcp): re-export the two types a downstream classifier needs\n\nThe registry extraction moved both behind crate boundaries with nothing\nexposing them, so a downstream host can no longer name either — and both are\ntypes it must read rather than infer.\n\n`McpError`: the typed 401 moved from a standalone `McpUnauthorizedError` onto\n`tinymcp::Error::Unauthorized`. A consumer reads `resource_metadata` off it to\ntell a server that wants OAuth from one that wants a static credential — the\ndifference between offering a Sign in button and asking for a token. Without the\nre-export that classification has no typed path left, and the only fallback is\nmatching on the message, which this variant's own doc argues against.\n\n`McpDefinitionAuth`: `McpServerDefinition::auth" is `tinymcp_bus::McpAuthConfig`,\nwhile `config::McpAuthConfig` is the shape this application's TOML declares.\nThey were one type before the extraction and are now two with the same name;\nonly the second is exported, so a caller reading a definition's auth constructs\nthe wrong one and fails to match. Named `McpDefinitionAuth" rather than\nshadowing, so the two stay distinguishable at the use site.\n\nAdditive: two `pub use` lines, no behaviour change, no new dependency.\n

Steven Enamakel31f0d8f2a1dd
diff --git a/src/openhuman/mcp/mod.rs b/src/openhuman/mcp/mod.rs
index d9115a6716..10174669aa 100644
--- a/src/openhuman/mcp/mod.rs
+++ b/src/openhuman/mcp/mod.rs
@@ -128,6 +128,21 @@ pub mod server;
pub mod http_client {
pub use tinymcp::transport::http::{McpHttpClient, McpHttpClientBuilder};
pub use tinymcp::{redact_endpoint, render_tool_result};
+ /// The transport's error, re-exported so a caller can inspect a failure
+ /// structurally rather than by its rendered text.
+ ///
+ /// The variant that motivates it is [`McpError::Unauthorized`], whose
+ /// `resource_metadata` is what separates a server that wants OAuth from one
+ /// that wants a static credential — the difference between offering a sign-in
+ /// path and asking for a token. That field is deliberately absent from the
+ /// message, so a caller wanting it must have the type.
+ ///
+ /// Note this crate's own `core::observability` classifier does **not** use
+ /// it: it reads rendered text, because it classifies failures that have
+ /// already crossed an RPC boundary and arrive as strings. This re-export is
+ /// for an in-process consumer, which holds the real error and should not be
+ /// reduced to matching on wording that upstream is free to reword.
+ pub use tinymcp::Error as McpError;
pub use tinymcp_bus::{
AuthorizationServerMetadata, McpAuthChallenge, McpAuthorizationContext,
McpInitializeResult, McpRemoteTool, McpServerToolResult, McpSseEvent,
@@ -143,4 +158,11 @@ pub mod config_servers {
pub use tinymcp::{
McpRegistrySource, McpServerDefinition, McpServerRegistry, McpTransportClient,
};
+ /// The auth shape a *definition in this registry* carries.
+ ///
+ /// Distinct from `config::McpAuthConfig`, which is the shape this
+ /// application's own TOML declares — the two were one type before the
+ /// extraction. A caller reading `McpServerDefinition::auth` needs this one,
+ /// and without the re-export cannot name it at all.
+ pub use tinymcp_bus::McpAuthConfig as McpDefinitionAuth;
}
diff --git a/vendor/tinymemory b/vendor/tinymemory
index 5993f063e8..1d6b997874 160000
--- a/vendor/tinymemory
+++ b/vendor/tinymemory
@@ -1 +1 @@
-Subproject commit 5993f063e88a41d376a893a4a0a8bffedc7d1fda
+Subproject commit 1d6b997874a06600ba0c4922708b5613497c9ffe