Skip to main content
Glama

NexusAPI MCP server, Python, Node.js and n8n examples

An open-source MCP server and production-minded examples for the asynchronous NexusAPI generation flow.

MCP tools for AI agents

The stdio server exposes four tools:

  • nexusapi_list_models — search the live public model catalog;

  • nexusapi_get_model_schema — inspect the live OpenAPI fields for one model;

  • nexusapi_generate — create an asynchronous, potentially billable generation task;

  • nexusapi_get_task — retrieve task status, result or error.

The server does not hide model-specific validation. Agents should inspect the live schema and obtain user approval before calling the billable generation tool.

After this repository is published, use it from a compatible local MCP host with:

{
  "mcpServers": {
    "nexusapi": {
      "command": "npx",
      "args": ["-y", "github:mat12121212/nexusapi-examples"],
      "env": {
        "NEXUS_API_KEY": "replace-me"
      }
    }
  }
}

Requirements: Node.js 20+ and an existing NexusAPI key. The key remains in the local host environment; do not commit it to the repository.

The repository demonstrates one lifecycle shared by the model schemas published in the live NexusAPI OpenAPI document:

  1. Send POST /generate with a params object.

  2. Store the returned task_id.

  3. Poll GET /tasks/{task_id} with bounded exponential backoff.

  4. Stop on completed or failed.

The model-specific fields still come from the live schema. Do not copy parameters between models without checking the NexusAPI documentation and OpenAPI JSON.

Related MCP server: A2A Client MCP Server

Examples

Quick start: Python

python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
export NEXUS_API_KEY="replace-me"
python python/kling_video.py

Quick start: Node.js

export NEXUS_API_KEY="replace-me"
node node/gpt-image.mjs

n8n

Import the JSON file from n8n/, then create the NEXUS_API_KEY environment variable in the n8n runtime. Review the model parameters before executing the workflow. A successful run can incur generation charges.

Safety notes

  • Keep the API key on the server. Never ship it in browser JavaScript.

  • A client timeout does not prove that a generation stopped. Save task_id and check it again.

  • Do not retry an ambiguous POST /generate automatically: the first request may have created a paid task.

  • Treat 422 as a request/schema problem. Change the request before retrying.

  • Respect 429 and temporary 5xx responses with bounded backoff.

  • Review every agent-proposed generation before allowing the billable MCP tool call.

Verification

Verified against the live NexusAPI OpenAPI document and the official MCP TypeScript SDK v2 on 2026-08-01. The included smoke test performs the MCP initialize handshake, lists tools and calls all four tools against a local mock API. No paid generation is used by the test.

Disclosure

This repository is maintained for NexusAPI. The examples are open source under the MIT License; use of the API itself is governed by the service terms and pricing.

Install Server
A
license - permissive license
A
quality
B
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • -
    license
    -
    quality
    -
    maintenance
    Enables discovery of public AI models with pricing, documentation context, and OpenAI-compatible integration examples. Supports both read-only queries and paid async media generation tasks.
    Last updated

View all related MCP servers

Related MCP Connectors

  • Reliable async execution for agent tool calls: schema gating, retries, idempotency, audit trail.

  • Create and manage cinematic AI video renders through the Future Video Studio Agent API.

  • OCR, transcription, file extraction, and image generation for AI agents via MCP.

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/mat12121212/nexusapi-examples'

If you have feedback or need assistance with the MCP directory API, please join our Discord server