Skip to main content
Glama

NexaLayer Agent

NexaLayer MCP Server — a Model Context Protocol (MCP) server that lets AI agents create and manage proxy sessions with budget guardrails.

The MCP implementation is in mcp/, with its source entry point at mcp/src/index.ts. The published package builds that file to the runtime entry path mcp/dist/index.js.

Current public starting prices are $0.23/GB for dynamic proxy sessions and $1.05/month for shared static proxy sessions. Exclusive static proxy sessions are $1.43–$5.86/month (launch pricing, live API authoritative). Query GET /v1/public/products or the authenticated product catalog for the current, authoritative quote and availability before creating a paid session.

MCP Server

Install

Run the published stdio server with npm:

npx -y @nexalayer/mcp

Or build and run the existing Docker image from the repository root:

docker build -t nexalayer-mcp ./mcp
docker run -i --rm \
  -e NEXALAYER_API_KEY="$NEXALAYER_API_KEY" \
  nexalayer-mcp

The Docker image uses stdio and does not expose a port.

Configure

Set NEXALAYER_API_KEY for API-backed tool calls. The server can start and expose initialize and tools/list without a key so MCP clients and directories can discover its capabilities. NEXALAYER_BASE_URL is an optional override.

Claude Desktop and Cursor both accept an mcpServers configuration like this:

{
  "mcpServers": {
    "nexalayer": {
      "command": "npx",
      "args": ["-y", "@nexalayer/mcp"],
      "env": {
        "NEXALAYER_API_KEY": "agk_your_key"
      }
    }
  }
}

Tools

Tool

Description

Charges

nexalayer_list_products

List the compact, paginated catalog of available proxy products and current prices.

No

nexalayer_create_session

Create a dynamic or static proxy session with an idempotency key. The create API does not honor include_credentials and omits proxy credentials. PRICE_MISMATCH (409): re-read prices, retry once. BUDGET_EXCEEDED and INSUFFICIENT_BALANCE (402): ask the owner, don't retry.

Yes — deducts from the account balance

nexalayer_get_session

Read one session. Credentials are omitted unless include_credentials=true; never log them.

No

nexalayer_rotate_session

Rotate a dynamic session when health or telemetry recommends it. Credentials are omitted unless include_credentials=true; never log them.

May affect paid usage

nexalayer_terminate_session

Terminate a session and release its network resource; early termination does not imply a refund.

No new charge

nexalayer_session_health

Read a session health score and rotation recommendation.

No

nexalayer_session_usage

Read traffic and request usage for a session.

No

nexalayer_get_budget

Read spend limits, current spend, pause state, and daily reset.

No

nexalayer_set_budget

Set API-key and daily spend limits, alerts, and pause behavior.

No direct charge

nexalayer_usage_alerts

Read actionable budget-threshold alerts.

No

nexalayer_get_balance

Read the account balance and trial-credit state.

No

nexalayer_list_transactions

List billing transactions for audit and reconciliation.

No

nexalayer_check_status

Check component status and incidents before retrying or filing a ticket.

No

nexalayer_known_issues

List known issues with runnable workaround steps, filtered by error code.

No

nexalayer_report_issue

File a support ticket; recent request ids and error codes are attached automatically.

No

nexalayer_get_ticket

Read a ticket's status, severity, events, and workaround.

No

Transport: stdio.

See the mcp/ package README for packaging, Docker, pricing, and approval-policy details.

Related MCP server: Agentic Vault

Backend API

The repository also contains the Agent Layer backend for NexaLayer, the Network Execution Layer for AI Agents.

This service exposes API-first capabilities for AI Agent, Playwright, Puppeteer, Browser-use, crawler, and automation workflows:

  • Agent account registration and API key authentication

  • Dynamic and static proxy session lifecycle management

  • Session telemetry, health scoring, and rotation recommendations

  • Billing, balance, recharge, transaction, and usage-facing endpoints

  • Natural-language agent routes for controlled proxy network operations

Local Development

npm install
cp .env.example .env
npm run db:generate
npm run dev

Useful Commands

npm run build
npm run lint
npm run test:unit
npm test
npm run test:phase0
npm run test:phase0:real
npm run test:phase0:static
npm run test:smoke

npm run test:phase0 is the safe profile. It validates registration, API key auth, product listing, balance, and transactions without creating a paid proxy session.

npm run test:phase0:real sets PHASE0_ALLOW_PAID=1 and creates one low-volume dynamic session, polls until active, explicitly requests credentials with include_credentials=true, checks proxy.full_url, reports telemetry, reads health and billing, then terminates the session in a cleanup step. Use NEXALAYER_PRODUCT_NO, PHASE0_QUANTITY, and PHASE0_PRINT_PROXY_URL=1 when you need a specific product or need to inspect the returned proxy URL.

npm run test:phase0:static creates one minimal static session, polls for proxy info, reports telemetry, reads health and billing, then terminates the session and releases the static resource. It is a paid smoke profile and should only be used in controlled environments.

The broader npm run test:smoke suite may create real Agent accounts, proxy sessions, orders, or billing records depending on environment configuration. Review docs/agentTest.md and the target environment before running it.

Session detail and rotation responses hide proxy.full_url by default. Send include_credentials=true only when the caller needs to connect, and never log the returned credentials. nexalayer_get_session and nexalayer_rotate_session pass that flag through. POST /sessions does not honor it, so nexalayer_create_session omits proxy credentials; read the session after it is active. Read measured traffic from GET /v1/sessions/{session_id}/usage. Unknown product numbers return HTTP 404 with PRODUCT_NOT_FOUND. PRICE_MISMATCH is HTTP 409: re-read prices, retry once. BUDGET_EXCEEDED and INSUFFICIENT_BALANCE are HTTP 402: ask the owner, don't retry.

Support (machine-readable)

API errors use an additive envelope: code, message, and details are unchanged, plus retryable, retry_after, suggested_action, side_effects, doc_url, known_issue_id, request_id, and a support contact. MCP tools return the same object in structuredContent with isError: true.

  • GET /v1/public/status: components, current state, and incident history (no key)

  • GET /v1/public/known-issues: known issues with workaround steps (no key)

  • GET /v1/public/errors and /v1/public/errors/{code}: error catalog (no key)

  • GET /v1/public/sla: early-access response targets, not guarantees (no key)

  • POST /v1/support/tickets, GET /v1/support/tickets/{ticket_id}: tickets scoped to the API key

Human contact: support@nexalayer.net (Telegram @LEWISMIN). If the upstream is down during terminate, billing stops at the first terminate attempt. See docs/SUPPORT.md for triage, response targets, alerts, and environment variables.

Chinese Docs and Examples

NexaLayer is not a raw proxy IP service. The Chinese MVP documentation presents it as a session-based network execution layer for Playwright, Puppeteer, Browser-use, AI browser agents, crawlers, and automation workflows.

Available Tools

16 tools
nexalayer_check_statusA
Read-onlyIdempotent

Check NexaLayer service status before retrying or filing a ticket. Returns each component (api, sessions, billing, catalog, upstream_network) as operational, degraded_performance, partial_outage, major_outage, or under_maintenance, plus active incidents and recent incident history. If the component your call depends on is not operational, wait and retry later instead of reporting an issue. No API key needed; no charge.

Inputs: no named parameters.

nexalayer_create_sessionA
Idempotent

Create a paid network session. This action incurs charges against the account balance. Configure a budget first and obtain owner approval for autonomous spend. The create API does not honor include_credentials and omits proxy credentials; read the session with include_credentials=true. Credentials are omitted unless include_credentials=true; never log them. PRICE_MISMATCH (409: re-read prices, retry once). BUDGET_EXCEEDED and INSUFFICIENT_BALANCE (402: ask the owner, don't retry).

Inputs: product_no (required), session_type (required), idempotency_key (required), duration, +3 more.

nexalayer_get_balanceA
Read-onlyIdempotent

Read the current account balance and trial-credit state.

Inputs: no named parameters.

nexalayer_get_budgetA
Read-onlyIdempotent

Read spend limits, current spend, pause state, and next daily reset.

Inputs: no named parameters.

nexalayer_get_sessionA
Read-onlyIdempotent

Read one session's status and proxy endpoint. Credentials are omitted unless include_credentials=true; never log them.

Inputs: session_id (required), include_credentials.

nexalayer_get_ticketA
Read-onlyIdempotent

Read a NexaLayer support ticket: status (received, triaged, needs_info, in_progress, awaiting_approval, workaround_available, resolved, closed), severity, events, matched known issue with workaround steps, and resolution. Poll no sooner than next_check_after_seconds. No charge.

Inputs: ticket_id (required).

nexalayer_known_issuesA
Read-onlyIdempotent

List known issues with machine-runnable workaround steps. Call this with the error_code from a failed tool call (for example UPSTREAM_UNAVAILABLE or BACKEND_ERROR) before filing a ticket; if an issue matches, run its workaround.steps instead of reporting. No API key needed; no charge.

Inputs: status, component, error_code.

nexalayer_list_productsB
Read-onlyIdempotent

List a compact catalog of current products and prices before purchasing.

Inputs: type, limit, cursor, country, +1 more.

nexalayer_list_transactionsC
Read-onlyIdempotent

List billing transactions for audit and reconciliation.

Inputs: page, page_size.

nexalayer_report_issueA
Idempotent

File a support ticket with NexaLayer. Use only after following the error's suggested_action and checking nexalayer_check_status and nexalayer_known_issues. Recent request_ids and error codes seen by this MCP server are attached automatically, so you do not need to copy them. The server assigns severity (S1 outage or wrong billing, S2 broken with no workaround, S3 bug with a workaround, S4 question or feature request). Returns ticket_id and next_check_after_seconds; poll with nexalayer_get_ticket. Never include API keys, proxy passwords, or full_url: they are redacted and the ticket is escalated as a security issue. No charge.

Inputs: summary (required), category (required), tool, actual, +8 more.

nexalayer_rotate_sessionA
Idempotent

Rotate a dynamic session after health or telemetry recommends rotation. Credentials are omitted unless include_credentials=true; never log them.

Inputs: session_id (required), idempotency_key (required), reason, include_credentials.

nexalayer_session_healthB
Read-onlyIdempotent

Read health score and rotation recommendation for a session.

Inputs: session_id (required).

nexalayer_session_usageC
Read-onlyIdempotent

Read traffic and request usage for a session.

Inputs: session_id (required).

nexalayer_set_budgetB
DestructiveIdempotent

Set key and daily spend limits. This is a consequential write and should require owner approval.

Inputs: idempotency_key (required), paused, key_limit_usd, daily_limit_usd, +2 more.

nexalayer_terminate_sessionA
DestructiveIdempotent

Terminate a session and release its underlying network resource. Early termination does not imply a refund.

Inputs: session_id (required).

nexalayer_usage_alertsB
Read-onlyIdempotent

Read actionable budget threshold alerts.

Inputs: no named parameters.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.5/5.0

    Scored across 16 tools

    Disambiguation5/5

    Each tool targets a distinct resource-action pair across clearly separated domains: sessions (create/get/rotate/terminate/usage/health), budget (set/get/alerts), billing (balance/transactions), support (status/known_issues/report/get_ticket), and catalog (list_products). The closest pairs—session_health vs session_usage and get_budget vs usage_alerts—are differentiated by descriptions (health/rotation vs traffic, limits/spend vs threshold alerts). No two tools appear to do the same thing.

    Naming Consistency4/5

    All tools share the nexalayer_ prefix and snake_case, and most follow a verb_noun pattern (get_balance, list_transactions, create_session, rotate_session, report_issue). A few are noun phrases rather than verb-first (session_health, usage_alerts, known_issues, session_usage), a minor deviation from the otherwise predictable pattern.

    Tool Count4/5

    16 tools sit at the upper end of the comfortable range but each earns its place across five functional areas (sessions, budget, billing, support, catalog). The count is slightly heavy but reasonable for the breadth of the service being governed.

    Completeness4/5

    Core lifecycle coverage is strong: create/get/rotate/terminate plus usage and health for sessions, set/get budget with alerts, balance and transactions for billing, and a full support loop (status, known_issues, report, get_ticket). The notable gap is the absence of a list_sessions operation to enumerate existing sessions, a minor inconvenience rather than a dead end.

    Maintenance

    ActivityNo data
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      C
      maintenance
      A proxy server that bridges AI agents and external APIs by dynamically translating OpenAPI specifications into standardized MCP tools, enabling seamless interaction without custom integration code.
      69
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      MCP server that lets AI agents call APIs without ever seeing the credentials, using a local encrypted vault and per-secret allowlist policies for HTTP requests and subprocess environment variables.
      1
      AGPL 3.0
    • A
      license
      Not graded
      quality
      D
      maintenance
      A robust, lightweight Model Context Protocol (MCP) server designed to empower your AI Agents with context-awareness, safe execution sandboxes, and dedicated thought logs.
      ISC