feat: mcp server first take

This commit is contained in:
2026-04-24 11:12:31 +02:00
parent f857e739f6
commit 213b3fc652
14 changed files with 1814 additions and 7 deletions

25
lib/mix/tasks/bds.mcp.ex Normal file
View File

@@ -0,0 +1,25 @@
defmodule Mix.Tasks.Bds.Mcp do
@moduledoc false
use Mix.Task
@shortdoc "Runs the bDS MCP server over stdio or localhost HTTP"
@impl Mix.Task
def run(args) do
Mix.Task.run("app.start")
case args do
["--http", port] ->
{:ok, _server} = BDS.MCP.Server.start(String.to_integer(port))
Process.sleep(:infinity)
["--http"] ->
{:ok, _server} = BDS.MCP.Server.start(0)
Process.sleep(:infinity)
_other ->
BDS.MCP.Stdio.main()
end
end
end