drio
Open app

Elixir MCP Server

Source

An example of how to implement an MCP server using Elixir and SSE transport

Catalog onlyCatalog onlySTDIO

Overview

Elixir MCP Server is an implementation of the Model Context Protocol (MCP) server using Elixir with Server-Sent Events (SSE) as the transport protocol. It allows AI models to securely interact with local and remote resources through standardized server implementations.

To use the Elixir MCP Server, install the necessary dependencies, set the WEATHER_API_KEY environment variable, and start the server. The server will be available at specified endpoints for SSE and message handling.

  • Implements the Model Context Protocol (MCP) for secure AI model interactions. - Uses Server-Sent Events (SSE) for real-time communication. - Provides tools for listing files, echoing messages, and fetching weather information.
  1. Building AI applications that require real-time data updates.
  2. Integrating weather data into applications using the provided weather API.
  3. Developing custom tools that can interact with the MCP server.

Add to your AI client

Use these steps to connect Elixir MCP Server in Cursor, Claude, VS Code, and other MCP-compatible apps. The same JSON appears in the Use with menu above for one-click copy.

Cursor

Add this to your .cursor/mcp.json file in your project root, then restart Cursor.

.cursor/mcp.json

{
  "mcpServers": {
    "elixir-mcp-server-epinault": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-elixir-mcp-server-epinault"
      ]
    }
  }
}

Claude Desktop

Add this server entry to the mcpServers object in your Claude Desktop config, then restart the app.

~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows)

{
  "mcpServers": {
    "elixir-mcp-server-epinault": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-elixir-mcp-server-epinault"
      ]
    }
  }
}

Claude Code

Add this to your project's .mcp.json file. Claude Code will detect it automatically.

.mcp.json (project root)

{
  "mcpServers": {
    "elixir-mcp-server-epinault": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-elixir-mcp-server-epinault"
      ]
    }
  }
}

VS Code (Copilot)

Add this to your .vscode/mcp.json file. Requires the GitHub Copilot extension with MCP support enabled.

.vscode/mcp.json

{
  "servers": {
    "elixir-mcp-server-epinault": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-elixir-mcp-server-epinault"
      ]
    }
  }
}

Windsurf

Add this to your Windsurf MCP config file, then restart Windsurf.

~/.codeium/windsurf/mcp_config.json

{
  "mcpServers": {
    "elixir-mcp-server-epinault": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-elixir-mcp-server-epinault"
      ]
    }
  }
}

Cline

Open Cline settings, navigate to MCP Servers, and add this server configuration.

Cline MCP Settings (via UI)

{
  "mcpServers": {
    "elixir-mcp-server-epinault": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-elixir-mcp-server-epinault"
      ]
    }
  }
}

FAQ

What is the Model Context Protocol (MCP)?

MCP is an open protocol that enables AI models to interact with resources securely.

How do I test the server?

You can test the server using the NXP Inspector client, following the instructions to connect and use the available tools.

Can I add custom tools to the server?

Yes! You can add custom tools by updating the `handle_initialize/2` function and implementing the necessary handling clauses.7:["$","div",null,{"className":"container mx-auto flex flex-col gap-4","children":["$L26","$L27",["$","$L28",null,{"currentProject":{"id":3626,"uuid":"caca0f03-a7d7-47f5-8e9b-42d5e8bef5fe","name":"elixir_mcp_server","title":"Elixir MCP Server","description":"An example of how to implement an MCP server using Elixir and SSE transport","avatar_url":"https://avatars.githubusercontent.com/u/479143?v=4","created_at":"2025-03-20T16:44:02.858Z","updated_at":"2025-03-20T16:46:18.640Z","status":"created","author_name":"epinault","author_avatar_url":"https://avatars.githubusercontent.com/u/479143?v=4","tags":"elixir,mcp,server,sse,protocol","category":"developer-tools","is_featured":false,"sort":1,"url":"https://github.com/epinault/elixir_mcp_server","target":"_self","content":"$29","summary":"$2a","img_url":null,"type":null,"metadata":"{\"star\":\"0\",\"license\":\"MIT license\",\"language\":\"Elixir\",\"is_official\":false,\"latest_commit_time\":\"2025-03-20 08:25:43\"}","user_uuid":null,"tools":null,"sse_url":null,"sse_provider":null,"sse_params":null,"is_official":false,"server_command":null,"server_params":null,"server_config":null,"allow_call":false,"is_innovation":false,"is_dxt":false,"dxt_manifest":null,"dxt_file_url":null,"is_audit":false},"randomProjects":[],"currentServerKey":"$undefined"}]]}]