diwushennian4955/nexa-mcp-agent-example
NexaAPI + MCP: Add Generative AI to Your Claude Agents — 77+ models, from $0.002/image
Platform-specific configuration:
{
"mcpServers": {
"nexa-mcp-agent-example": {
"command": "npx",
"args": [
"-y",
"nexa-mcp-agent-example"
]
}
}
}Add the config above to .claude/settings.json under the mcpServers key.
[](https://pypi.org/project/nexaapi/) [](https://www.npmjs.com/package/nexaapi) [](https://opensource.org/licenses/MIT)
Give your MCP agents real generative AI superpowers — image generation, video, TTS, music — via NexaAPI. One API key. 77+ models. From $0.002/image.
> Inspired by the spaceship-mcp launch (March 2026) — MCP is the new standard for AI agent tooling.
pip install nexaapi
# or
npm install nexaapiGet your API key: rapidapi.com/user/nexaquency
nexa-mcp-agent-example/
├── examples/
│ ├── python/
│ │ ├── image_generation.py # Generate images with 35+ models
│ │ ├── video_generation.py # Generate videos with Kling, Veo 3.1, Sora 2
│ │ ├── text_to_speech.py # TTS with OpenAI, ElevenLabs, Kokoro
│ │ └── mcp_agent_example.py # Full MCP-compatible agent example
│ └── javascript/
│ ├── imageGeneration.js # Image generation
│ ├── videoGeneration.js # Video generation
│ └── mcpAgentExample.js # Full MCP-compatible agent example
├── README.md
└── LICENSEfrom nexaapi import NexaAPI
client = NexaAPI(api_key='YOUR_API_KEY')
# Generate an image — MCP-compatible function
def agent_generate_image(prompt: str, style: str = 'photorealistic') -> dict:
"""
Give your Claude agent image generation superpowers.
Cost: from $0.002/image — among the cheapest in the market.
"""
result = client.image.generate(
model='flux-schnell', # or any of 35+ models
prompt=f'{prompt}, {style} style',
widtLoading reviews...