### Run starter test after install Source: https://hexdocs.pm/attesto_mcp_server Run the generated starter test after a successful install, before editing the sample. ```shell mix test ``` -------------------------------- ### Run tests and start Phoenix server Source: https://hexdocs.pm/attesto_mcp_server Run the updated tests and start the application normally after replacing the starter registration. ```shell mix test mix phx.server ``` -------------------------------- ### Install with --attesto-config Source: https://hexdocs.pm/attesto_mcp_server Uses the installer with a custom Attesto configuration callback instead of attesto_phoenix. The task validates dependency, router, route, and parser ownership before editing and refuses ambiguous or custom parser arrangements. ```shell mix igniter.install attesto_mcp_server \ --base-url https://mcp.example.com \ --attesto-config MyApp.Attesto.config/0 ``` -------------------------------- ### Install with --enable-cimd Source: https://hexdocs.pm/attesto_mcp_server Enables Client ID Metadata Documents (CIMD) during installation. The installer leaves CIMD disabled by default because the default attesto_phoenix cache may require the attesto_client_id_metadata migration; verify that storage exists before running. ```shell mix igniter.install attesto_mcp_server \ --base-url https://mcp.example.com \ --enable-cimd ``` -------------------------------- ### Generate and run Ecto migration for attesto_mcp_server Source: https://hexdocs.pm/attesto_mcp_server Run when the installer selects the bundled Ecto store. The installer prints this migration command and does not run it; you must run it and then migrate. ```shell mix attesto_mcp_server.gen.migration --repo MyApp.Repo mix ecto.migrate ``` -------------------------------- ### Install with --allow-http-loopback Source: https://hexdocs.pm/attesto_mcp_server Allows a loopback origin for local development. HTTP remains disabled for deployed origins; connect local clients to http://127.0.0.1:4000/mcp and expect an unauthenticated probe to return 401 rather than 404. ```shell mix igniter.install attesto_mcp_server \ --base-url http://127.0.0.1:4000 \ --allow-http-loopback ``` -------------------------------- ### Install with --reuse-metadata-route Source: https://hexdocs.pm/attesto_mcp_server Reuses an existing attesto_phoenix protected-resource metadata route for /mcp instead of adding a new one. Ambiguous or mismatched routes are left unchanged and reported with manual remediation. ```shell mix igniter.install attesto_mcp_server \ --base-url https://mcp.example.com \ --reuse-metadata-route ``` -------------------------------- ### Install attesto_mcp_server with mix igniter.install Source: https://hexdocs.pm/attesto_mcp_server Run inside the Phoenix child application (not an umbrella root) with Igniter available and attesto_phoenix declared directly from Hex at a version compatible with >= 2.14.1 and < 4.0.0. The --base-url flag is the externally reachable HTTPS origin without /mcp; the installer mounts the MCP path itself. ```shell mix igniter.install attesto_mcp_server --base-url https://mcp.example.com ``` -------------------------------- ### Install with --session-store ets Source: https://hexdocs.pm/attesto_mcp_server Explicitly selects the in-memory ETS session store even when a PostgreSQL Ecto Repo exists. Use this to keep sessions in memory for local development or when no durable storage is desired. ```shell mix igniter.install attesto_mcp_server \ --base-url https://mcp.example.com \ --session-store ets ``` -------------------------------- ### Register application tool with AttestoMCP.Server.API Source: https://hexdocs.pm/attesto_mcp_server Replace the starter registration in .MCP with application tools. Uses the stable host-facing API AttestoMCP.Server.API.register_all/2 to register a tool named customer_lookup with a description, input schema, and handler. ```elixir alias AttestoMCP.Server.API def register(server) do API.register_all(server, [ {:tool, "customer_lookup", %{ description: "Look up a customer by ID", input_schema: %{ "type" => "object", "properties" => %{ "id" => %{"type" => "string", "minLength" => 1} }, "required" => ["id"], "additionalProperties" => false }, handler: fn %{"id" => id}, context -> customer = MyApp.Customers.fetch!(context.principal, id) {:ok, %{"id" => customer.id, "name" => customer.name}} end }} ]) end ``` -------------------------------- ### Add attestomcp_server dependency in deps Source: https://hexdocs.pm/attesto_mcp_server Add the attestomcp_server dependency to a non-Phoenix Plug host's mix.exs deps function. The package version is ~> 2.3. ```elixir def deps do [{:attesto_mcp_server, "~> 2.3"}] end ``` -------------------------------- ### Return a structured tool result with Result.tool_from_context Source: https://hexdocs.pm/attesto_mcp_server Use inside an arity-2 tool handler to build a structured tool result with the supervised server's JSON budget and output canonicalization settings. The context-aware constructor is the safe default for shared adapters. ```elixir alias AttestoMCP.Server.{Content, Result} handler: fn _arguments, context -> {:ok, Result.tool_from_context(Content.text("loaded"), context, structured_content: %{"status" => "ready"} )} end ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.