1. Conduid
  2. Analytics
  3. Teemux
MCP server · Analytics

Teemux

Zero-config log multiplexer with built-in MCP server

Unclaimed NOASSERTION last commit 7 months ago analyticsmcplogging
72Good

Scored 1 hours ago · breakdown

About Teemux

Teemux is an MCP server published by gajus in the Analytics category: zero-config log multiplexer with built-in MCP server.

The repository has 91 stars and 5 forks, with the last commit 7 months ago. Six months or more without a commit doesn't mean the server is broken, but check the open issues before depending on it in production.

Install

From source
git clone https://github.com/gajus/teemux

This server has no ConduID identity, so agent calls to it are not receipted. Pin the version you install and review the source before granting it credentials.

Tools (4)

clear_logsClear the log buffer

Parameters not published.

get_logsGet recent logs from buffer

Parameters not published.

get_process_namesList all process names that have logged

Parameters not published.

search_logsSearch logs with patterns

Parameters not published.

Ask AI

✦

Ask AI about Teemux

Powered by Claude · Grounded in docs

I know everything about Teemux. Ask me about installation, configuration, usage, or troubleshooting.

Security checks

Static checks derived from the repository 1 hours ago. Heuristics on the source, not an audit.

  • ✓README presentThe repository ships documentation.
  • ✓License declaredUsable under a stated license.
  • ✓Tests presentA test suite exists in the repository.
  • ✓Dependencies pinnedA lockfile pins dependency versions.
  • ✓No dynamic code executionSource scan found no eval, dynamic Function, or shell execution.
  • !Scoped permissionsDoesn't declare a permission scope. Assume it can do anything its process can.

Releases

v1.9.1v1.9.1 · 23 Feb 2026[1.9.1](https://github.com/gajus/teemux/compare/v1.9.0...v1.9.1) (2026-02-23) Bug Fixes remove release env ([96b13a8](https://github.com/gajus/teemux/commit/96b13a88136f572a9c23eb5eead475765627e906))
v1.9.0v1.9.0 · 23 Jan 2026[1.9.0](https://github.com/gajus/teemux/compare/v1.8.0...v1.9.0) (2026-01-23) Bug Fixes add build client step ([987d11c](https://github.com/gajus/teemux/commit/987d11c41fa1aaeffd0695c8c511b04fc9dec686)) install Playwright browser system…
v1.8.0v1.8.0 · 23 Jan 2026[1.8.0](https://github.com/gajus/teemux/compare/v1.7.0...v1.8.0) (2026-01-23) Features add summary field ([253e673](https://github.com/gajus/teemux/commit/253e67309b1debd5fe0e7cce38e0fa3ea1ed2d87))
v1.7.0v1.7.0 · 23 Jan 2026[1.7.0](https://github.com/gajus/teemux/compare/v1.6.0...v1.7.0) (2026-01-23) Bug Fixes use JSON.stringify for JS string escaping to handle all edge cases…
v1.6.0v1.6.0 · 22 Jan 2026[1.6.0](https://github.com/gajus/teemux/compare/v1.5.0...v1.6.0) (2026-01-22) Bug Fixes escape newlines in log lines to prevent JS string literal breaks…

README


Demo

npx teemux -- curl -N https://teemux.com/random-logs

Motivation

  • Needed a simple way to browse logs aggregated across multiple processes.
  • Needed a simple way to give agents a unified view of all the logs

Install

npm install -g teemux

Usage

teemux --name api -- node api.js
teemux --name worker -- node worker.js
teemux -- redis-server  # name defaults to "redis-server"

The first process starts a local server on port 8336. Others connect automatically.

Options

Option Alias Default Description
--name -n command name Identifier for this process in logs
--port -p 8336 Port for the log aggregation server
--buffer -b 10000 Number of log lines to keep in server buffer
--force-leader -f false Force this process to become the leader, replacing any existing leader

All options can also be set via environment variables with TEEMUX_ prefix:

TEEMUX_PORT=9000 teemux -- node app.js

Viewing Logs

Browser

Open http://127.0.0.1:8336/ to view aggregated logs with:

  • Color-coded process names
  • Auto-scroll (sticks to bottom like a terminal)
  • Scroll up to pause, scroll back down to resume

Terminal / curl

curl http://127.0.0.1:8336/

Plain text stream of all logs.

MCP Server for AI Agents

teemux includes a built-in Model Context Protocol (MCP) server that enables AI agents to programmatically access logs in your development environment. This makes it easy for coding assistants like Claude, Cursor, or other AI tools to inspect application logs, search for errors, and understand what's happening in your running processes.

The MCP server runs on the same port as the HTTP server at /mcp and provides these tools:

Tool Description Parameters
get_logs Get recent logs from buffer limit?, include?, exclude?
search_logs Search logs with patterns limit?, include?, exclude?
clear_logs Clear the log buffer none
get_process_names List all process names that have logged none

Configuring your AI agent

Add teemux as an MCP server in your AI tool's configuration. For Claude Code, add to your MCP settings:

{
  "mcpServers": {
    "teemux": {
      "command": "npx",
      "args": [
        "mcp-remote",
        "http://127.0.0.1:8336/mcp"
      ]
    }
  }
}

Once configured, your AI agent can:

  • Inspect logs when debugging issues ("What errors are in the logs?")
  • Search for specific events ("Find all database connection errors")
  • Monitor processes ("What processes are currently running?")
  • Clear logs to start fresh when testing

Example MCP usage

# Initialize session
curl -X POST http://127.0.0.1:8336/mcp \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -d '{"jsonrpc":"2.0","method":"initialize","params":{"protocolVersion":"2025-03-26","capabilities":{},"clientInfo":{"name":"test","version":"1.0"}},"id":1}'

# List available tools (use session ID from response above)
curl -X POST http://127.0.0.1:8336/mcp \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -H "mcp-session-id: <session-id>" \
  -d '{"jsonrpc":"2.0","method":"tools/list","params":{},"id":2}'

# Get recent logs
curl -X POST http://127.0.0.1:8336/mcp \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -H "mcp-session-id: <session-id>" \
  -d '{"jsonrpc":"2.0","method":"tools/call","params":{"name":"get_logs","arguments":{"limit":50}},"id":3}'

Filtering Logs

Use query parameters to filter logs:

Parameter Logic Description
include OR Show lines matching any of the patterns
exclude OR Hide lines matching any of the patterns

Patterns support * as a wildcard (matches any characters):

# Show only logs from the api process
curl "http://127.0.0.1:8336/?include=api"

# Show only error logs (using wildcard)
curl "http://127.0.0.1:8336/?include=*error*"

# Show logs from api OR worker
curl "http://127.0.0.1:8336/?include=api,worker"

# Hide healthcheck and ping logs
curl "http://127.0.0.1:8336/?exclude=health*,ping"

# Show GET requests to /api endpoints
curl "http://127.0.0.1:8336/?include=*GET*/api*"

# Show api logs but exclude verbose debug output
curl "http://127.0.0.1:8336/?include=api&exclude=DEBUG,TRACE"

# In browser
open "http://127.0.0.1:8336/?include=api&exclude=health*"

Filters apply to both buffered logs and new incoming logs in real-time.

Output Example

Terminal (where teemux runs):

● started (pid 12345)
Server listening on :3000
Processing jobs...
GET /health 200
○ exited (code 0)

Browser / curl (aggregated with prefixes):

[api] ● started (pid 12345)
[api] Server listening on :3000
[worker] Processing jobs...
[api] GET /health 200
[worker] ○ exited (code 0)

FAQ

What's the origin of the name?

The name combines tee (the Unix command that duplicates output) and mux (multiplexer) – it multiplexes multiple log streams into one.

How does teemux work?

teemux uses automatic leader discovery to coordinate log aggregation across multiple processes:

  1. Leader Discovery: When the first teemux process starts, it attempts to bind to the configured port (default 8336). If successful, it becomes the leader and starts the log aggregation server.

  2. Client Registration: When subsequent teemux processes start, they detect the port is already in use, verify a server is responding, and automatically become clients that forward their logs to the leader.

  3. Leader Election: If the leader process exits, clients detect this through periodic health checks (every 2 seconds). When a client detects the leader is gone, it attempts to become the new leader. Random jitter prevents multiple clients from racing to claim leadership simultaneously.

This design requires no configuration – just run multiple teemux commands and they automatically coordinate.

Docker output appears corrupted with strange spacing

When running Docker with the -t flag, output may appear corrupted:

Initializing database...
                        The files belonging to this database system...

Cause: The -t flag allocates a pseudo-TTY, which adds terminal control sequences (cursor positioning, colors, etc.) to the output. These sequences are meant for interactive terminal use, not for piping.

Solution: Remove the -t flag when running through teemux:

# ❌ Don't use -t
teemux --name db -- docker run --rm -it my-database

# ✅ Use -i only (or neither flag)
teemux --name db -- docker run --rm -i my-database
teemux --name db -- docker run --rm my-database

The flags:

  • -i = keep stdin open (for interactive input) ✅
  • -t = allocate pseudo-TTY (adds terminal formatting) ❌

Developing

# Install dependencies
npm install

# Build and watch for changes
npm run dev

# In another terminal, run with fake logs
node dist/teemux.js -- node scripts/fake-logs.js

README fetched from the repository 1 hours ago. The original is authoritative.

Questions

About Teemux

How do I install Teemux?

No package has been published for this server, so install it from source: clone the repository and follow its README.

Is Teemux safe to use with an AI agent?

Its trust score is 72 out of 100 (good). It passes 5 of the 6 static security checks run so far; the failures are listed above. It has no ConduID identity yet, so agent calls to it are not receipted.

Is Teemux still maintained?

The last commit was 7 months ago. That's long enough that you should check whether the maintainer is responding to issues before depending on it.