Skip to content

Commit

Permalink
feat: port over nondeveloper system into mcp server (#561)
Browse files Browse the repository at this point in the history
Co-authored-by: Bradley Axen <[email protected]>
  • Loading branch information
wendytang and baxen authored Jan 8, 2025
1 parent 640c38b commit 5743413
Show file tree
Hide file tree
Showing 6 changed files with 698 additions and 7 deletions.
8 changes: 5 additions & 3 deletions crates/goose-cli/src/commands/mcp.rs
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
use anyhow::Result;
use goose_mcp::DeveloperRouter;
use goose_mcp::NonDeveloperRouter;
use mcp_server::router::RouterService;
use mcp_server::{ByteTransport, Server};
use mcp_server::{BoundedService, ByteTransport, Server};
use tokio::io::{stdin, stdout};

pub async fn run_server(name: &str) -> Result<()> {
tracing::info!("Starting MCP server");

let router = match name {
"developer" => Some(RouterService(DeveloperRouter::new())),
let router: Option<Box<dyn BoundedService>> = match name {
"developer" => Some(Box::new(RouterService(DeveloperRouter::new()))),
"nondeveloper" => Some(Box::new(RouterService(NonDeveloperRouter::new()))),
_ => None,
};

Expand Down
6 changes: 5 additions & 1 deletion crates/goose-mcp/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,11 @@ kill_tree = "0.2.4"
shellexpand = "3.1.0"
indoc = "2.0.5"
xcap = "0.0.14"
reqwest = { version = "0.11", features = ["json"] }
async-trait = "0.1"
chrono = { version = "0.4.38", features = ["serde"] }
dirs = "5.0.1"
tempfile = "3.8"

[dev-dependencies]
sysinfo = "0.32.1"
tempfile = "3.8"
2 changes: 2 additions & 0 deletions crates/goose-mcp/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
mod developer;
mod nondeveloper;

pub use developer::DeveloperRouter;
pub use nondeveloper::NonDeveloperRouter;
Loading

0 comments on commit 5743413

Please sign in to comment.