Add MCP server to AST tool
Integrates the MCP server functionality into the AST tool binary. This allows the tool to act as a server for LLM integration, enabling communication over stdio. The server can list available bindings and execute scripts.
This commit is contained in:
@@ -39,10 +39,22 @@ struct Cli {
|
||||
/// Disable optimization
|
||||
#[arg(long)]
|
||||
no_opt: bool,
|
||||
|
||||
/// Start MCP server (stdio transport, for LLM integration)
|
||||
#[arg(long)]
|
||||
mcp: bool,
|
||||
}
|
||||
|
||||
fn main() {
|
||||
let cli = Cli::parse();
|
||||
|
||||
if cli.mcp {
|
||||
if let Err(e) = myc::ast::mcp_server::run() {
|
||||
eprintln!("MCP server error: {}", e);
|
||||
std::process::exit(1);
|
||||
}
|
||||
return;
|
||||
}
|
||||
let mut env = Environment::new();
|
||||
env.optimization = !cli.no_opt;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user