Get the FREE Ultimate OpenClaw Setup Guide →

mcp-irc-ts

MCP Server as IRC Client in Typescript. npx mcp-irc

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio tbarron-xyz-mcp-irc-ts npx -y mcp-irc --url irc.libera.chat --port 6697 --mcpPort 3000 --nick mc --randomize-nick-suffix -n 1000

How to use

mcp-irc-ts exposes an MCP server that runs as an IRC client, bridging between an IRC network and an MCP world. It connects to an IRC server (by default ircs://irc.libera.chat:6697) and serves an MCP API locally on a specified port (default 3000). The server exposes a small set of tools for interacting with the MCP world: getMessages() returns the most recent messages as a JSON stringified list with fields { from, to, message, time }. sendRaw(command, arg1, arg2) allows sending raw IRC commands to the connected server. channels() returns the current list of joined channels with a structure that maps channel names to their user lists. For common operations, there are helper functions like join(channel) to enter a channel, part(channel) to leave, and privmsg(target, message) to send a message to a channel or as a direct message to a user. These tools let you read chat history, issue raw IRC commands, navigate channels, and send messages from your MCP client context through the IRC bridge.

How to install

Prerequisites:

  • Node.js and npm installed (or access to npx).
  • Internet access to install dependencies.
  1. Install Node.js from https://nodejs.org/ or ensure npm/yarn is available.
  2. Verify npx is available: npx --version
  3. Install and run the MCP-IRC server using the provided command (no global install necessary):
# Run the MCP IRC bridge (uses npx to fetch the package on demand)
npx -y mcp-irc --url irc.libera.chat --port 6697 --mcpPort 3000 --nick mc --randomize-nick-suffix -n 1000
  1. If you prefer to install locally, you can add the package to your project and run via node scripts, or use a script file that executes the same npx invocation.
  2. Open the MCP API at http://localhost:3000 (or configured port) to begin interacting with the bridge.

Additional notes

Tips and considerations:

  • If you need to customize the IRC server or port, adjust the --url, --port, and related flags in the launch command.
  • The MCP API is exposed on the mcpPort you specify (default 3000); ensure that port is accessible from your MCP client environment.
  • The helper methods (join, part, privmsg) simplify common IRC operations; use getMessages() to keep a local history synchronized with the IRC channel activity.
  • If connection issues occur, verify network access to irc.libera.chat on 6697 (SSL) and ensure any corporate firewall allows outbound TLS connections.
  • The -n flag (e.g., -n 1000) controls nickname suffix randomness to avoid collisions; adjust as needed for your setup.

Related MCP Servers

Sponsor this space

Reach thousands of developers