Embedding Servers
The aether-mcp-servers crate provides the same built-in servers used by the CLI as embeddable library components. You can selectively enable the servers you need and register them with McpBuilder in your own runtime.
[dependencies]aether-mcp-servers = { version = "0.2", default-features = false, features = ["coding", "plan"] }The crate is imported in Rust as mcp_servers.
Feature flags
Section titled “Feature flags”| Feature | Exposes | Notes |
|---|---|---|
default | CodingMcp, SkillsMcp, TasksMcp, SubAgentsMcp, PlanMcp | Default bundle |
coding | CodingMcp, LspMcp, LspRegistry | File I/O, bash, search, web, and standalone LSP support |
skills | SkillsMcp | Slash commands, skills, and persisted notes |
tasks | TasksMcp | Hierarchical task management |
subagents | SubAgentsMcp | Child agent spawning and orchestration |
survey | SurveyMcp | Structured user questions |
plan | PlanMcp | Plan review and approval workflow |
all | All built-in servers | Explicit alias for the full set |
Constructing servers
Section titled “Constructing servers”CodingMcp
Section titled “CodingMcp”use mcp_servers::{CodingMcp, PermissionMode};
let server = CodingMcp::new() .with_root_dir("/my/project".into()) .with_permission_mode(PermissionMode::AlwaysAllow);Standalone LSP
Section titled “Standalone LSP”use mcp_servers::LspMcp;
let server = LspMcp::new("/my/project".into());PlanMcp
Section titled “PlanMcp”use mcp_servers::PlanMcp;
let server = PlanMcp::new();let custom = PlanMcp::new().with_prompt_file("/my/project/.aether/prompts/plan-mode.md".into());Registering with McpBuilder
Section titled “Registering with McpBuilder”Use register_in_memory_server() to expose the servers your runtime wants to support:
use aether_core::mcp::mcp;use futures::FutureExt;use mcp_servers::{CodingMcp, PlanMcp};
let builder = mcp() .register_in_memory_server("coding", Box::new(|_args, _input| { async move { CodingMcp::new() .with_root_dir("/my/project".into()) .into_dyn() } .boxed() })) .register_in_memory_server("plan", Box::new(|args, _input| { async move { PlanMcp::from_args(args).unwrap().into_dyn() }.boxed() }));If you want the same built-in server setup used by the CLI, look at mcp_servers::setup::McpBuilderExt in the main repository for a production-ready registration helper.
Custom CodingTools
Section titled “Custom CodingTools”You can swap out the default filesystem-backed implementation by implementing the CodingTools trait yourself:
use mcp_servers::{CodingMcp, CodingTools};
struct MySandboxedTools { /* ... */ }
impl CodingTools for MySandboxedTools { // Implement file operations, bash, search, and web behavior.}
let server = CodingMcp::with_tools(MySandboxedTools::new());This is useful for sandboxed environments, testing, or custom file-access policies.