jido_mcp integrates MCP servers into the Jido ecosystem using anubis_mcp directly.
- Shared pooled MCP clients per configured endpoint
- Consume-side API for MCP tools/resources/prompts
- Jido actions + plugin routes for signal-driven usage
- Jido.AI runtime tool sync (MCP tools -> proxy
Jido.Actions) - MCP server bridge (
use Jido.MCP.Server) with explicit allowlists
def deps do
[
{:jido_mcp, "~> 0.1"}
]
endconfig :jido_mcp, :endpoints,
github: %{
transport: {:streamable_http, [base_url: "http://localhost:8080/mcp"]},
client_info: %{name: "my_app", version: "1.0.0"},
protocol_version: "2025-03-26",
capabilities: %{},
timeouts: %{request_ms: 30_000}
},
local_fs: %{
transport: {:stdio, [command: "uvx", args: ["mcp-server-filesystem"]]},
client_info: %{name: "my_app", version: "1.0.0"}
}Supported transports in v1:
{:stdio, keyword()}{:streamable_http, keyword()}
{:ok, tools} = Jido.MCP.list_tools(:github)
{:ok, called} = Jido.MCP.call_tool(:github, "search_issues", %{"query" => "label:bug"})
{:ok, resources} = Jido.MCP.list_resources(:github)
{:ok, content} = Jido.MCP.read_resource(:github, "repo://owner/name/README")
{:ok, prompts} = Jido.MCP.list_prompts(:github)
{:ok, prompt} = Jido.MCP.get_prompt(:github, "release_notes", %{"version" => "1.2.0"})All calls return normalized envelopes:
- success:
%{status: :ok, endpoint: atom(), method: String.t(), data: map(), raw: ...} - error:
%{status: :error, endpoint: atom(), type: ..., message: String.t(), details: ...}
Jido.MCP.Actions.ListToolsJido.MCP.Actions.CallToolJido.MCP.Actions.ListResourcesJido.MCP.Actions.ListResourceTemplatesJido.MCP.Actions.ReadResourceJido.MCP.Actions.ListPromptsJido.MCP.Actions.GetPromptJido.MCP.Actions.RefreshEndpoint
defmodule MyApp.Agent do
use Jido.Agent,
name: "assistant",
plugins: [
{Jido.MCP.Plugins.MCP,
%{
default_endpoint: :github,
allowed_endpoints: [:github, :local_fs]
}}
]
endSignal routes:
mcp.tools.listmcp.tools.callmcp.resources.listmcp.resources.templates.listmcp.resources.readmcp.prompts.listmcp.prompts.getmcp.endpoint.refresh
Jido.MCP.JidoAI.Actions.SyncToolsToAgent discovers remote tools and creates proxy Jido.Action modules, then registers them on a running Jido.AI.Agent.
Jido.MCP.JidoAI.Actions.UnsyncToolsFromAgent removes previously synced proxies.
Plugin route support:
mcp.ai.sync_toolsmcp.ai.unsync_tools
defmodule MyApp.MCPServer do
use Jido.MCP.Server,
name: "my-app",
version: "1.0.0",
publish: %{
tools: [MyApp.Actions.SearchIssues],
resources: [MyApp.MCP.Resources.ReleaseNotes],
prompts: [MyApp.MCP.Prompts.CodeReview]
}
endPublication is explicit allowlist only.
children =
Jido.MCP.Server.server_children(MyApp.MCPServer,
transport: :streamable_http
)forward "/mcp", Anubis.Server.Transport.StreamableHTTP.Plug,
Jido.MCP.Server.plug_init_opts(MyApp.MCPServer)Jido.MCP.Server.ResourceJido.MCP.Server.Prompt
Implement those behaviours for items listed in publish.resources and publish.prompts.
mix test