Skip to main content
Glama
README.md
# NoLag MCP Server

[![NoLagApp/nolag-mcp MCP server](https://glama.ai/mcp/servers/NoLagApp/nolag-mcp/badges/score.svg)](https://glama.ai/mcp/servers/NoLagApp/nolag-mcp)

A hosted [Model Context Protocol (MCP)](https://modelcontextprotocol.io) server for
[NoLag](https://nolag.app). Connect Claude Desktop, Cursor, or any MCP-compatible
client and let an AI agent manage your realtime infrastructure directly: create
apps, rooms, and actors, publish messages, dispatch agent tasks, and manage access
scopes, all through natural language.

- **Homepage:** https://nolag.app
- **Full setup guide:** https://nolag.app/docs/agents/mcp-setup
- **Get an API key:** https://portal.nolag.app (Settings → API Keys)

## What is NoLag?

NoLag is realtime messaging infrastructure and the coordination layer for AI agents:
pub/sub over WebSocket with presence, rooms, and quality-of-service delivery, high
level SDKs for chat, notifications, and dashboards, and agent patterns to dispatch
work, share state, observe decisions, and gate actions. SDKs for JavaScript, Go,
and Python. This MCP server exposes a set of tools so an AI client can operate that
infrastructure for you.

## Endpoints

The server is remote (hosted). It supports two transports:

- **SSE:** `GET https://api.nolag.app/mcp/sse`
- **Streamable HTTP:** `POST https://api.nolag.app/mcp`

Authentication uses a project-level API key (format `nl_live_yourKeyId.yourSecret`),
created in the [Portal](https://portal.nolag.app).

## Connect

### Claude Desktop / Claude Code

Add this to your MCP configuration (`claude_desktop_config.json`, or `.mcp.json`
in your project root for Claude Code):

```json
{
  "mcpServers": {
    "nolag": {
      "command": "npx",
      "args": [
        "mcp-remote",
        "https://api.nolag.app/mcp/sse?token=nl_live_yourKeyId.yourSecret"
      ]
    }
  }
}
```

`mcp-remote` bridges the SSE transport to stdio and installs automatically via
`npx` on first run. Replace the token with your API key.

### Cursor

Add the same block to `.cursor/mcp.json`.

### Custom HTTP client

```bash
curl -X POST https://api.nolag.app/mcp \
  -H "Authorization: Bearer nl_live_yourKeyId.yourSecret" \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":"1","method":"initialize","params":{}}'
```

## Run it locally (stdio)

Prefer a local stdio server over the hosted endpoint? This repo ships a thin
bridge that forwards to `https://api.nolag.app/mcp`. Listing tools needs no key;
tool execution uses your key from `NOLAG_API_KEY`.

```json
{
  "mcpServers": {
    "nolag": {
      "command": "npx",
      "args": ["-y", "@nolag/mcp"],
      "env": { "NOLAG_API_KEY": "nl_live_yourKeyId.yourSecret" }
    }
  }
}
```

Or with Docker:

```bash
docker build -t nolag-mcp .
docker run -i -e NOLAG_API_KEY=nl_live_yourKeyId.yourSecret nolag-mcp
```

## Tools

The server exposes tools across NoLag's resources:

- **Apps** — create, list, update, and delete apps.
- **Rooms** — create, list, update, and delete rooms.
- **Actors** — create, list, update, and delete client identities and access tokens.
- **Topics and messaging** — publish messages to topics.
- **Agents** — dispatch tasks and coordinate multi-agent work.
- **Access scopes** — manage tenant isolation.

To verify your connection, ask your client to "list my NoLag apps" or "create an
agent actor".

## Links

- Docs: https://nolag.app/docs
- MCP setup guide: https://nolag.app/docs/agents/mcp-setup
- AI agents guide: https://nolag.app/docs/agents
- Portal: https://portal.nolag.app

## License

MIT. See [LICENSE](./LICENSE).