Skip to content

cmd mcp

github-actions[bot] edited this page May 18, 2026 · 2 revisions

nself mcp

Start the nSelf MCP server and expose infrastructure tools to Claude Code and other MCP clients.

Synopsis

nself mcp [flags]

Description

nself mcp starts a Model Context Protocol server that exposes nSelf infrastructure operations as tools. MCP clients (including Claude Code) can then call those tools directly, without leaving their coding environment.

By default the server runs over stdio, which is the correct mode for Claude Code's mcpServers configuration. Use --transport sse to expose the server over HTTP on a local port instead.

The server provides six tools:

Tool Description
nself_list_plugins List the plugin catalog (installed and available plugins)
nself_get_schema Hasura GraphQL schema introspection
nself_get_permissions Hasura role permissions snapshot
nself_run_migration Apply a SQL migration (requires confirm: true)
nself_tail_logs Tail Docker logs for a named service or plugin container
nself_doctor Run nself doctor --deep and return the diagnostic report

The server advertises itself via mDNS as _nself._tcp.local so Claude Code and other mDNS-aware clients can discover a running instance on the local network automatically. Pass --no-mdns to suppress this.

nself mcp must be run from inside a directory that contains an nSelf project (i.e. one initialised by nself init). The server exits immediately if no project is found.

Flags

Flag Short Type Default Description
--transport -t string stdio Transport mode: stdio or sse
--port -p int 3825 Port for SSE transport
--no-mdns bool false Disable mDNS service advertising

Examples

# Run as a Claude Code MCP server using stdio (recommended)
nself mcp
# Run as an SSE server for browser-based clients
nself mcp --transport sse
# Run SSE on a custom port
nself mcp --transport sse --port 4000
# Run without mDNS advertising (e.g. in CI)
nself mcp --no-mdns
# Run SSE on a custom port without mDNS
nself mcp --transport sse --port 4000 --no-mdns

Claude Code configuration

Add the following to your project's .claude/settings.json:

{
  "mcpServers": {
    "nself": {
      "command": "nself",
      "args": ["mcp"]
    }
  }
}

Claude Code will start nself mcp automatically and connect over stdio.

See Also

Commands | Home

Home


Getting Started


Commands


Features


Configuration


Plugins (87 + 10 monitoring)

Free (25)
Pro (62)
Planned (26)
  • plugin-audit
  • plugin-blog
  • plugin-checkout
  • plugin-commerce
  • plugin-drm
  • plugin-export
  • plugin-flow
  • plugin-import
  • plugin-ldap
  • plugin-mailgun
  • plugin-media
  • plugin-oauth-providers
  • plugin-pages
  • plugin-postmark
  • plugin-rate-limit
  • plugin-reports
  • plugin-saml
  • plugin-scheduler
  • plugin-sendgrid
  • plugin-sso
  • plugin-subscription
  • plugin-thumb
  • plugin-transcoder
  • plugin-twilio
  • plugin-waf
  • plugin-watermark

Guides


Architecture


Reference


Licensing


Security


Brand


Operations


Contributing


Admin


Changelog

Clone this wiki locally