mcpField
E
Elixir MCP Server

Elixir MCP Server

Local
github.com/epinaultDeveloper Tools7Updated 84w ago

About Elixir MCP Server

Elixir MCP Server is a basic MCP server example built with Elixir, Bandit, and Plug for developers learning or building Elixir services. It uses SSE and includes file listing, echo, and weather tools.

Key features

  1. 01Implement an MCP server in Elixir
  2. 02Use SSE transport
  3. 03Provide a file-listing tool
  4. 04Provide a message echo tool
  5. 05Provide a weather lookup tool

Use cases

  1. 01Learn to implement an Elixir MCP server
  2. 02Test an SSE client connection
  3. 03Look up weather information
  4. 04Extend the example with custom tools

MCP support

The server exposes `list_files`, `echo`, and `get_weather` tools to MCP clients over SSE. Clients connect over SSE and send requests through the message endpoint.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

No install method listed yet

We haven’t collected a package or remote endpoint for this server. Follow the instructions in the project README.

Repository

Tools

No tool list yet

Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.

Details

From the project README

Elixir MCP Server

An Elixir implementation of the Model Context Protocol (MCP) server using Elixir with Bandit and Plug.

The Model Context Protocol (MCP) is an open protocol that enables AI models to securely interact with local and remote resources through standardized server implementations. This project is a basic example of an MCP server using SSE (Server-Sent Events) as the transport protocol. It is based off the example at https://modelcontextprotocol.io/quickstart/server

Prerequisites

  • Elixir 1.18 or higher

  • Erlang/OTP 27 or higher

  • The weather API key can be set through the WEATHER_API_KEY environment variable. The default service is using the free tier of https://www.weatherapi.com/.

Getting Started

  1. Install dependencies:

    mix deps.get
    
  2. Start the server:

    WEATHER_API_KEY="1234567890abcdef" mix run --no-halt
    
    
    
  3. The server will be available at:

Available Tools

  • list_files: List files in a directory
  • echo: Echo a message back
  • get_weather: Get weather information

Testing with MCP Client

Install the NXP Inspector client and follow the instructions to connect to the server.

Make sure to use SSE (Server-Sent Events) as the transport protocol, then you should be able to list available tools and call them. Also to ping/keepalive the connection, you can use the ping tool.

Adding Custom Tools

To add custom tools, update the handle_initialize/2 function to include your tool definitions and implement corresponding handle_call_tool/3 clauses.

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.