Risha.ai MCP Server
OfficialClick on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Risha.ai MCP Server show my credit balance"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Risha.ai MCP Server
A Model Context Protocol (MCP) server for the Risha.ai API.
This server lets MCP clients such as Codex, Claude Code, and Claude Desktop discover Risha API operations, authenticate with email/password, inspect capabilities, check credit balance and create generation requests.
Features
Email/password authentication using Risha
/auth/login/Automatic login at MCP startup
Automatic startup context loading:
current user
active capabilities
credit wallet / balance
Generic Swagger-backed API caller for all Risha operations
Convenience generation helpers:
risha_generate_imagerisha_create_generation
Automatic polling for generation completion
Related MCP server: litellm-mcp
Requirements
Node.js 18+
A valid Risha.ai account (www.risha.ai)
An MCP-capable client, for example:
Codex
Claude Code
Claude Desktop
Install
git clone https://github.com/aimedialab/risha-mcp-server.git
cd risha-mcp-server
npm installEnvironment variables
Required for email/password login:
RISHA_EMAIL="you@example.com"
RISHA_PASSWORD="your-password"Optional:
RISHA_API_BASE_URL="https://adminxcore-api.risha.ai/api"Token-based auth is also supported, but email/password is the recommended flow:
RISHA_API_TOKEN="your-access-token"
RISHA_REFRESH_TOKEN="your-refresh-token"Never commit real credentials. Put them in your MCP client config or a local
.envfile..envis ignored by git.
Run manually
RISHA_EMAIL="you@example.com" RISHA_PASSWORD="your-password" npm startExpected startup log:
[risha-mcp] logged in, loaded 32 capabilities, credit balance: 72621An MCP stdio server normally waits silently after startup. That is expected.
Available MCP tools
risha_api_info
Shows API metadata, authentication mode, startup status, capabilities count, credit balance, and Swagger tag list.
risha_startup_state
Shows the context loaded at startup:
login state
current user
capabilities count
credit balance
startup errors, if any
risha_capabilities
Returns the active capabilities retrieved at startup.
Input example:
{
"filter": "image",
"limit": 20
}risha_credit_balance
Returns credit balance, wallet, summary, and user wallet data.
risha_refresh_context
Logs in again and refreshes current user, capabilities, and credit data.
risha_login
Manually logs in with RISHA_EMAIL and RISHA_PASSWORD and caches the JWT for the current MCP session.
risha_list_operations
Searches all Swagger operations.
Input example:
{
"filter": "generation",
"limit": 20
}risha_get_operation
Returns schema details for one operation.
Input example:
{
"operationId": "generation-requests_create"
}risha_call
Generic caller for any Swagger operation.
Input example:
{
"operationId": "auth_me"
}Generation request example:
{
"operationId": "generation-requests_create",
"body": {
"capability": 21,
"title": "MCP smoke test",
"prompt_data": {
"prompt": "a red apple on a white table",
"resolution": "0.5k",
"aspect_ratio": "1:1"
}
}
}risha_create_generation
Creates any generation request and optionally polls until it reaches a terminal state.
Input example:
{
"capability": 21,
"title": "MCP image test",
"prompt_data": {
"prompt": "a red apple on a white table",
"resolution": "0.5k",
"aspect_ratio": "1:1"
},
"wait": true,
"timeoutSeconds": 300,
"pollSeconds": 5
}risha_generate_image
Convenience text-to-image tool. Defaults to capability 21, 0.5k, 1:1.
Input example:
{
"prompt": "a cinematic photo of a red apple on a white table",
"resolution": "0.5k",
"aspect_ratio": "1:1",
"timeoutSeconds": 300,
"pollSeconds": 5
}risha_resolve_media_url
Converts a private authenticated Risha media URL into a signed public CDN URL.
Input example:
{
"url": "https://adminxcore-api.risha.ai/api/media/asset/4c6cbe1c-7696-4c13-8790-6456e5d64698/?f=webp&h=600&q=85&w=600"
}Use with Codex
Codex reads MCP servers from ~/.codex/config.toml.
Add this block:
[mcp_servers.risha]
command = "node"
args = ["/absolute/path/to/risha-mcp-server/src/index.js"]
startup_timeout_sec = 60
[mcp_servers.risha.env]
RISHA_EMAIL = "you@example.com"
RISHA_PASSWORD = "your-password"For the local project path created by this agent:
[mcp_servers.risha]
command = "node"
args = ["/Users/amirhamdani/Documents/risha-mcp-server/src/index.js"]
startup_timeout_sec = 60
[mcp_servers.risha.env]
RISHA_EMAIL = "you@example.com"
RISHA_PASSWORD = "your-password"Restart Codex after editing the config.
Codex test prompts
Use the Risha MCP server and run risha_api_info.Use the Risha MCP server and show my Risha credit balance.Use the Risha MCP server and list image capabilities.Use Risha MCP to generate a small image of a red apple on a white table.Use with Claude Code
Claude Code supports MCP servers over stdio. You can add the server using either the CLI or JSON configuration.
Option A: Claude Code CLI
From the project directory:
claude mcp add risha \
--env RISHA_EMAIL="you@example.com" \
--env RISHA_PASSWORD="your-password" \
-- node /absolute/path/to/risha-mcp-server/src/index.jsThen restart Claude Code or start a new session.
Test prompts:
Use the risha MCP server and run risha_api_info.Use the risha MCP server to show my credit balance.Use the risha MCP server to generate a small image of a robot holding a camera.Option B: Claude MCP JSON config
If your Claude Code setup uses JSON MCP configuration, add:
{
"mcpServers": {
"risha": {
"command": "node",
"args": ["/absolute/path/to/risha-mcp-server/src/index.js"],
"env": {
"RISHA_EMAIL": "you@example.com",
"RISHA_PASSWORD": "your-password"
}
}
}
}Use with Claude Desktop
Add this to your Claude Desktop MCP config:
{
"mcpServers": {
"risha": {
"command": "node",
"args": ["/absolute/path/to/risha-mcp-server/src/index.js"],
"env": {
"RISHA_EMAIL": "you@example.com",
"RISHA_PASSWORD": "your-password"
}
}
}
}Restart Claude Desktop after editing the config.
Test with MCP Inspector
cd risha-mcp-server
npx @modelcontextprotocol/inspector \
env RISHA_EMAIL="you@example.com" RISHA_PASSWORD="your-password" \
node src/index.jsOpen the Inspector URL printed in the terminal and try:
risha_api_inforisha_credit_balancerisha_capabilitiesrisha_generate_image
Typical workflow for agents
Call
risha_api_infoto confirm authentication and startup state.Call
risha_credit_balanceto check credits.Call
risha_capabilitiesto pick a capability.Use
risha_generate_imagefor simple image generation, orrisha_create_generationfor arbitrary capabilities.Use returned public CDN URLs directly. Private media URLs are resolved automatically when possible.
Notes on generation time
Image/video generation is asynchronous. The MCP server can create a request immediately, but final completion depends on provider queue and model runtime. risha_generate_image and risha_create_generation poll until completion or timeout.
Default polling values:
timeoutSeconds:300pollSeconds:5
Development
npm install
node --check src/index.js
npm startProject layout:
risha-mcp-server/
src/
index.js # MCP server implementation
swagger.json # Risha Swagger/OpenAPI document
package.json
README.mdLicense
MIT
Available Tools
12 toolsrisha_api_infoB
Show Risha API server/configuration info loaded from Swagger.
Inputs: no named parameters.
risha_callB
Call a Risha API operation by operationId. Set RISHA_EMAIL and RISHA_PASSWORD for automatic login, or RISHA_API_TOKEN for Bearer auth.
Inputs: operationId (required), body, query, headers, +1 more.
risha_capabilitiesA
Return capabilities retrieved automatically at MCP startup. Use filter to search name/slug/category/provider fields.
Inputs: limit, filter.
risha_create_generationB
Create a Risha generation request and optionally poll until completed/failed. Use this instead of manual create/read polling.
Inputs: capability (required), prompt_data (required), wait, title, +2 more.
risha_credit_balanceA
Return the credit balance/wallet data retrieved automatically at MCP startup.
Inputs: no named parameters.
risha_generate_imageC
Convenience text-to-image tool. Defaults to the lightweight Nano Banana 2 text-to-image capability and waits for the final public image URL.
Inputs: prompt (required), title, capability, resolution, +4 more.
risha_get_operationA
Get details for one Risha API operation, including required path/query parameters and request body schema.
Inputs: operationId (required).
risha_list_operationsB
List Risha API operations from the Swagger document. Use filter to search operationId, path, tag, or summary.
Inputs: tag, limit, filter, method.
risha_loginA
Login to Risha using RISHA_EMAIL and RISHA_PASSWORD and cache the returned JWT for this MCP server session.
Inputs: no named parameters.
risha_refresh_contextB
Login again and refresh startup context: current user, all capabilities, and credit balance.
Inputs: no named parameters.
risha_resolve_media_urlA
Convert a private Risha /api/media/asset/... URL into its signed public/CDN URL.
Inputs: url (required).
risha_startup_stateA
Show the Risha data loaded automatically at MCP startup: login status, user, capabilities count, and credit balance.
Inputs: no named parameters.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 12 tools
Each tool targets a distinct aspect of the Risha API: authentication, API info, operation listing/calling, generation, image generation, media URL resolution, and startup state. No two tools have overlapping purposes.
All tools follow the consistent pattern of 'risha_' prefix followed by a verb_noun or noun structure (e.g., risha_create_generation, risha_get_operation, risha_credit_balance). The convention is uniform and predictable.
12 tools is an appropriate number for a server that wraps a generative AI API, covering authentication, information retrieval, API calling, image generation, and media management without being excessive or insufficient.
The tool set covers core workflows: login, state inspection, API operation discovery, general API calling, and specific generation/image tasks. A minor gap is the lack of a tool to list past generations, but the surface is otherwise comprehensive.
Maintenance
Related MCP Connectors
MCP server for OpenAI API (chat completions, image generation, embeddings) via AceDataCloud
Remote MCP server for the Mynth API: image and video generation, task tracking and balance.
An MCP server that provides agents access to the KeldynAI platform
MCP server for AI dialogue using various LLM models via AceDataCloud
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceAn MCP server that wraps the Riza Code Interpreter API and presents endpoints as individual tools.13-
- AlicenseNot gradedqualityDmaintenanceMCP server that provides tools to interact with the LiteLLM proxy API, enabling LLM completions, embeddings, image generation, and admin operations.MIT
- AlicenseNot gradedqualityDmaintenanceMCP server for the Golpo AI video API, enabling video generation, listing, and downloading from any MCP-compatible client.MIT
- FlicenseNot gradedqualityDmaintenanceMCP server that interfaces with Gemini and OpenAI CLI tools to enable AI model interactions. It provides a bridge to external AI CLIs with predefined model configurations.-