Skip to content

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

feat(examples): wire storage and modules into mcp example

Steven Enamakel2e7a940e59e5
diff --git a/crates/openhuman-embed/examples/mcp.rs b/crates/openhuman-embed/examples/mcp.rs
index 1934dc4b5f..c0c8ccb852 100644
--- a/crates/openhuman-embed/examples/mcp.rs
+++ b/crates/openhuman-embed/examples/mcp.rs
@@ -5,7 +5,7 @@
mod support;
use openhuman_core::config::schema::{ModuleOverride, ModuleSourceMode};
-use openhuman_embed::{AgentSpec, Runtime, Workspace};
+use openhuman_embed::{AgentSpec, Runtime, RuntimeModule, ServiceSet, Workspace};
fn main() -> anyhow::Result<()> {
support::run(run())
@@ -24,11 +24,24 @@ async fn run() -> anyhow::Result<()> {
"tinymcp",
ModuleSourceMode::Linked,
));
+ // TinyMCP needs a host storage callback even when linked into this example.
+ let storage_dir = tempfile::tempdir()?;
+ let storage_url = openhuman_core::storage::config::default_url(storage_dir.path());
let runtime = Runtime::builder()
.config(config)
.workspace(Workspace::Ephemeral)
+ .storage(storage_url)
.backend_url(backend.uri())
.provider(support::route(&provider, "fixture"))
+ .services(ServiceSet::none())
+ .modules([
+ RuntimeModule::Agent,
+ RuntimeModule::Inference,
+ RuntimeModule::Modules,
+ RuntimeModule::Memory,
+ RuntimeModule::Mcp,
+ RuntimeModule::Skills,
+ ])
.build()
.await?;
// ANCHOR: mcp