Skip to content

Commit bd903b8

Browse files
fix: make bin/mcp-server generic and update installer
- Remove hardcoded path from bin/mcp-server wrapper script - Script now works from any Phoenix project directory - Installer creates .mcp.json with relative path (deps/excessibility/bin/mcp-server) - Updates existing .mcp.json if present, adding excessibility server config Bumps version to 0.10.2. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 5322de7 commit bd903b8

5 files changed

Lines changed: 60 additions & 6 deletions

File tree

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [0.10.2] - 2026-02-03
9+
10+
### Fixed
11+
- Make `bin/mcp-server` a generic wrapper script that works from any Phoenix project directory
12+
- Installer now generates correct relative path (`deps/excessibility/bin/mcp-server`) in `.mcp.json`
13+
814
## [0.10.1] - 2026-02-03
915

1016
### Fixed

bin/mcp-server

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
#!/bin/bash
2-
# Capture the client's working directory before switching to excessibility
2+
# MCP server wrapper for excessibility
3+
# Run this from your Phoenix project directory (where excessibility is a dependency)
4+
35
export MCP_CLIENT_CWD="$PWD"
4-
cd /home/andrew/projects/excessibility
56
export TERM=dumb
67
export NO_COLOR=1
78
export ELIXIR_CLI_ECHO=false
89

9-
# Debug logging enabled - check /tmp/excessibility_mcp.log
10-
export MCP_LOG_FILE=/tmp/excessibility_mcp.log
10+
# Optional: enable debug logging
11+
# export MCP_LOG_FILE=/tmp/excessibility_mcp.log
1112

1213
exec mix run --no-halt -e "Excessibility.MCP.Server.start()" 2>/dev/null

lib/excessibility/mcp/server.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ defmodule Excessibility.MCP.Server do
2727

2828
@server_info %{
2929
"name" => "excessibility",
30-
"version" => "0.10.1"
30+
"version" => "0.10.2"
3131
}
3232

3333
@capabilities %{

lib/mix/tasks/install.ex

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,7 @@ defmodule Mix.Tasks.Excessibility.Install do
211211
else
212212
igniter
213213
|> install_mcp_server()
214+
|> create_mcp_json()
214215
|> install_skills_plugin()
215216
end
216217
end
@@ -272,6 +273,52 @@ defmodule Mix.Tasks.Excessibility.Install do
272273
end
273274
end
274275

276+
defp create_mcp_json(igniter) do
277+
mcp_json_path = ".mcp.json"
278+
mcp_config = mcp_json_content()
279+
280+
if File.exists?(mcp_json_path) do
281+
update_existing_mcp_json(igniter, mcp_json_path, mcp_config)
282+
else
283+
Igniter.create_or_update_file(igniter, mcp_json_path, mcp_config, fn source -> source end)
284+
end
285+
end
286+
287+
defp update_existing_mcp_json(igniter, path, _new_config) do
288+
with {:ok, content} <- File.read(path),
289+
{:ok, existing} <- Jason.decode(content) do
290+
maybe_add_excessibility_server(igniter, path, existing)
291+
else
292+
{:error, %Jason.DecodeError{}} ->
293+
Igniter.add_warning(igniter, "Could not parse existing .mcp.json - skipping MCP config")
294+
295+
{:error, _} ->
296+
igniter
297+
end
298+
end
299+
300+
defp maybe_add_excessibility_server(igniter, path, existing) do
301+
servers = Map.get(existing, "mcpServers", %{})
302+
303+
if Map.has_key?(servers, "excessibility") do
304+
igniter
305+
else
306+
updated = Map.put(existing, "mcpServers", Map.put(servers, "excessibility", mcp_server_entry()))
307+
Igniter.create_or_update_file(igniter, path, Jason.encode!(updated, pretty: true), fn source -> source end)
308+
end
309+
end
310+
311+
defp mcp_server_entry do
312+
%{
313+
"command" => "deps/excessibility/bin/mcp-server",
314+
"args" => []
315+
}
316+
end
317+
318+
defp mcp_json_content do
319+
Jason.encode!(%{"mcpServers" => %{"excessibility" => mcp_server_entry()}}, pretty: true)
320+
end
321+
275322
defp install_skills_plugin(igniter) do
276323
dep_path = Mix.Project.deps_paths()[:excessibility] || File.cwd!()
277324
plugin_path = Path.join(dep_path, "priv/claude-plugin")

mix.exs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ defmodule Excessibility.MixProject do
22
use Mix.Project
33

44
@source_url "https://github.com/lessthanseventy/excessibility"
5-
@version "0.10.1"
5+
@version "0.10.2"
66

77
def project do
88
[

0 commit comments

Comments
 (0)