Get the FREE Ultimate OpenClaw Setup Guide →

vancouver

Simple MCP server library for Elixir.

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio jameslong-vancouver mix phx.server \
  --env MIX_ENV="dev"

How to use

Vancouver is an MCP server library for Elixir/Phoenix that helps you add Model Context Protocol functionality to your app. It handles initialization, request validation, and provides helpers to create MCP tools and prompts in your Phoenix/Bandit stack. With Vancouver, you can define tools (operations that perform computations or actions), prompts (structured prompts to guide the LLM), and synchronous MCP responses. Developers can mount the MCP route in their router and expose a clean interface for clients to invoke tools and prompts via the MCP protocol.

How to install

Prerequisites:

  • Elixir installed (with Erlang)
  • Node.js is optional if you later integrate tooling outside Elixir
  • A Phoenix project or the ability to run a Phoenix server
  1. Create a new Phoenix project (if you don’t have one):
mix phx.new my_app
cd my_app
  1. Add Vancouver to your dependencies in mix.exs:
defp deps do
  [
    {:vancouver, "~> 0.3"}
  ]
end
  1. Fetch and compile dependencies:
mix deps.get
mix deps.compile
  1. Configure Vancouver in config/config.exs (example):
config :vancouver,
  name: "My MCP Server",
  version: "1.0.0"
  1. Implement your Tools and Prompts (as shown in the Vancouver README example) and add the MCP route to your router:
# lib/my_app_web/router.ex
forward "/mcp", Vancouver.Router, 
  tools: [MyApp.Tools.CalculateSum],
  prompts: [MyApp.Prompts.CodeReview]
  1. Start the server:
mix phx.server
  1. Optional: expose via MCP client configuration (see the README example) and ensure your MCP route is reachable at http://localhost:4000/mcp.

Additional notes

Tips and common issues:

  • Vancouver currently supports tools, prompts, and sync responses (no streaming). Ensure your tools/prompts modules implement Vancouver.Tool and Vancouver.Prompt as shown in the examples.
  • If you encounter routing errors, verify the MCP route is correctly forwarded in your router and that your endpoint is reachable (CORS and auth considerations may apply).
  • Environment variables such as MIX_ENV can influence behavior in development vs. production; adjust as needed for deployment.
  • When deploying, consider running Phoenix in prod (e.g., MIX_ENV=prod mix compile && mix phx.server or using a release) and ensure port 4000 (or your configured port) is accessible to MCP clients.
  • Update dependencies regularly to keep up with MCP protocol changes and Vancouver improvements.

Related MCP Servers

Sponsor this space

Reach thousands of developers