- Explore MCP Servers
- elixir_mcp_server
Elixir Mcp Server
What is Elixir Mcp Server
elixir_mcp_server is an implementation of the Model Context Protocol (MCP) server using Elixir, Bandit, and Plug. It allows AI models to interact securely with local and remote resources through standardized server implementations, utilizing Server-Sent Events (SSE) as the transport protocol.
Use cases
Use cases for elixir_mcp_server include building interactive AI applications, integrating weather data into services, and developing real-time monitoring tools that require secure data exchange.
How to use
To use elixir_mcp_server, first install the dependencies with ‘mix deps.get’. Then, start the server by setting the WEATHER_API_KEY environment variable and running ‘mix run --no-halt’. The server will be accessible at the specified SSE and message endpoints.
Key features
Key features of elixir_mcp_server include support for Server-Sent Events (SSE), the ability to list files, echo messages, and retrieve weather information. It also allows for the addition of custom tools by modifying specific functions in the code.
Where to use
elixir_mcp_server can be used in various fields including AI model development, real-time data processing, and applications requiring secure communication between local and remote resources.
Clients Supporting MCP
The following are the main client software that supports the Model Context Protocol. Click the link to visit the official website for more information.
Overview
What is Elixir Mcp Server
elixir_mcp_server is an implementation of the Model Context Protocol (MCP) server using Elixir, Bandit, and Plug. It allows AI models to interact securely with local and remote resources through standardized server implementations, utilizing Server-Sent Events (SSE) as the transport protocol.
Use cases
Use cases for elixir_mcp_server include building interactive AI applications, integrating weather data into services, and developing real-time monitoring tools that require secure data exchange.
How to use
To use elixir_mcp_server, first install the dependencies with ‘mix deps.get’. Then, start the server by setting the WEATHER_API_KEY environment variable and running ‘mix run --no-halt’. The server will be accessible at the specified SSE and message endpoints.
Key features
Key features of elixir_mcp_server include support for Server-Sent Events (SSE), the ability to list files, echo messages, and retrieve weather information. It also allows for the addition of custom tools by modifying specific functions in the code.
Where to use
elixir_mcp_server can be used in various fields including AI model development, real-time data processing, and applications requiring secure communication between local and remote resources.
Clients Supporting MCP
The following are the main client software that supports the Model Context Protocol. Click the link to visit the official website for more information.
Content
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_KEYenvironment variable.
The default service is using the free tier of https://www.weatherapi.com/.
Getting Started
-
Install dependencies:
mix deps.get -
Start the server:
WEATHER_API_KEY="1234567890abcdef" mix run --no-halt -
The server will be available at:
- SSE endpoint: http://localhost:4000/sse
- Message endpoint: http://localhost:4000/message
Available Tools
list_files: List files in a directoryecho: Echo a message backget_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.
Dev Tools Supporting MCP
The following are the main code editors that support the Model Context Protocol. Click the link to visit the official website for more information.










