defmodule Backplane.McpProtocol.MixProject do use Mix.Project @version "0.4.2" @source_url "https://github.com/gsmlg-opt/backplane/tree/main/apps/backplane_mcp_protocol" def project do [ app: :backplane_mcp_protocol, version: @version, build_path: "../../_build", config_path: "../../config/config.exs", deps_path: "../../deps", lockfile: "../../mix.lock", elixir: "~> 1.18", start_permanent: Mix.env() == :prod, deps: deps(), docs: docs(), package: package(), description: description(), elixirc_paths: elixirc_paths(Mix.env()), aliases: aliases(), dialyzer: [ plt_local_path: "priv/plts", ignore_warnings: ".dialyzerignore.exs", plt_add_apps: [:mix, :ex_unit] ], extra_applications: [:observer, :wx], releases: releases() ] end defp elixirc_paths(:test), do: ["lib", "test/support"] defp elixirc_paths(_), do: ["lib"] # Run "mix help compile.app" to learn about applications. def application do [ extra_applications: [:logger], mod: {Backplane.McpProtocol.Application, []} ] end def cli do [ preferred_envs: [dialyzer: :test] ] end # Run "mix help deps" to learn about dependencies. defp deps do [ {:finch, "~> 0.19"}, {:peri, "0.9.0"}, {:telemetry, "~> 1.2"}, {:redix, "~> 1.5", optional: true}, {:gun, "~> 2.2", optional: true}, {:burrito, "~> 1.0", optional: true}, {:plug, "~> 1.18", optional: true}, {:jose, "~> 1.11.7", optional: true}, {:mox, "~> 1.2", only: :test}, {:mimic, "~> 2.0", only: :test}, {:bypass, "~> 2.1", only: :test}, {:cowboy, "~> 2.10", only: :test}, {:styler, "~> 1.4", only: [:dev, :test], runtime: false}, {:ex_doc, ">= 0.0.0", only: [:dev, :test], runtime: false}, {:credo, "~> 1.7", only: [:dev, :test], runtime: false}, {:dialyxir, "~> 1.3", only: [:dev, :test], runtime: false} ] end # Define releases for standalone binaries def releases do [ backplane_mcp_protocol: [ steps: [:assemble, &Burrito.wrap/1], applications: [ backplane_mcp_protocol: :permanent ], include_executables_for: [:unix, :windows], burrito: [ targets: [ macos_intel: [os: :darwin, cpu: :x86_64], macos_arm: [os: :darwin, cpu: :aarch64], linux: [os: :linux, cpu: :x86_64], windows: [os: :windows, cpu: :x86_64] ] ], # Set the CLI module as the main entry point default_release: true, main_module: Backplane.McpProtocol.CLI ] ] end defp package do %{ licenses: ["LGPL-3.0"], contributors: ["Backplane contributors"], links: %{ "GitHub" => @source_url, "Docs" => "https://hexdocs.pm/backplane_mcp_protocol" }, files: ~w[lib mix.exs README.md CHANGELOG.md LICENSE .formatter.exs] } end defp aliases do [ setup: ["deps.get", "compile --force"], lint: ["format --check-formatted", "credo --strict", "dialyzer"], format_doc: ["cmd npx prettier -w ./**/*.md"] ] end defp docs do [ main: "readme", before_closing_head_tag: &before_closing_head_tag/1, extras: [ "README.md", "pages/introduction.md", "pages/building-a-client.md", "pages/building-a-server.md", "pages/recipes.md", "pages/reference.md", "CHANGELOG.md", "CONTRIBUTING.md", "LICENSE" ], groups_for_extras: [ "Getting Started": [ "README.md", "pages/introduction.md" ], "Building with Backplane.McpProtocol": [ "pages/building-a-client.md", "pages/building-a-server.md" ], "Patterns & Reference": [ "pages/recipes.md", "pages/reference.md" ], "Project Info": [ "CHANGELOG.md", "CONTRIBUTING.md", "LICENSE" ] ] ] end defp before_closing_head_tag(:html) do """ """ end defp before_closing_head_tag(:epub), do: "" defp description do """ Model Context Protocol (MCP) implementation in Elixir with Phoenix integration """ end end