Kanzi API MCP server¶
The Kanzi API MCP server connects your AI assistant to the Kanzi API reference documentation. This allows the AI assistant to look up API signatures, check deprecation status, resolve include directives, and compare APIs between Kanzi versions. The server covers Kanzi APIs across C++, Java, C#, Lua, and Rust.
The Kanzi API MCP server prevents the AI assistant from hallucinating API signatures. Instead of guessing, the assistant retrieves verified API information directly from the server.
The Kanzi API MCP server supports these API sets:
API set |
Language |
Description |
|---|---|---|
|
C++ |
Kanzi Engine core API |
|
Java |
Kanzi Engine Java bindings |
|
Java |
Kanzi Android Framework API |
|
Java |
Kanzi Android App Framework API |
|
C# |
Kanzi Studio Plugin API |
|
C# |
Kanzi Localization Plugin API |
|
Lua |
Kanzi Engine Lua API |
|
Rust |
Kanzi Engine Rust API |
Setting up the Kanzi API MCP server¶
Setting up in Claude Desktop¶
To set up the Kanzi API MCP server in Claude Desktop, add the server to your Claude Desktop configuration file:
In your Claude Desktop configuration file, add the following:
{ "mcpServers": { "kanzi-api": { "command": "npx", "args": [ "-y", "mcp-remote", "https://api.mcp.kanzi.com" ] } } }
Restart Claude Desktop.
Setting up in VS Code¶
To set up the Kanzi API MCP server in VS Code:
In VS Code, open the Command Palette (Ctrl Shift P) and select MCP: Open User Configuration.
In the
mcp.jsonfile, add the server configuration:{ "servers": { "kanzi-api": { "url": "https://api.mcp.kanzi.com" } } }
Open the Command Palette and select Developer: Reload Window.
Open the Chat window with Ctrl Alt I.
Setting up in Claude Code¶
To set up the Kanzi API MCP server in Claude Code, run:
claude mcp add --transport http kanzi-api https://api.mcp.kanzi.com
Example queries¶
After you set up the Kanzi API MCP server, you can ask your AI assistant questions like the following. The assistant uses the server tools to retrieve accurate API information.
Basic lookups¶
You can search for API members, verify signatures, check deprecation status, and get include directives:
“Find the Node class in the Java API.”
“What is the signature of
kanzi::Node::setName?”“Is
kanzi::Pagedeprecated? What should I use instead?”“What header do I need to include to use
Button2Din C++?”
Cross-version migration¶
The Kanzi API MCP server can compare APIs across versions, which helps you estimate the effort required for a migration and identify the changes that you need to address. This is where the server is most valuable, because no human could quickly diff tens of thousands of API records across multiple versions.
“I am migrating a Kanzi project from 3.9.8 to 4.0.0. What C++ APIs were removed or changed? Focus on the
NodeandRenderPassclasses.”“Show me every API that was deprecated between Kanzi 3.9.13 and 4.0.0, with their replacements.”
“Which Java APIs were added between Kanzi 3.9.9 and 3.9.12? I want to know what new capabilities became available.”
API evolution tracking¶
You can track how a specific API member changed across all available Kanzi versions:
“How has
kanzi::ResourceManagerevolved from Kanzi 3.6.21 to 4.0.0? Show me the full history.”“Track the history of
kanzi::Node::trySetFocusacross all versions. Did its signature change?”“When was the Lua API for
Button2Dintroduced, and has its interface changed across versions?”
Cross-language comparison¶
You can compare how the same functionality is exposed across different Kanzi language APIs:
“Compare how property types work in C++ versus Java versus Lua. Show me
PropertyTypeor equivalent in each language.”“I need to load a prefab at runtime. Show me the API for this in C++, Java, and Lua with the correct includes and imports.”
“How does animation timeline creation differ between C++ and Java? Show signatures for
TimelinePlayerorAnimationPlayer.”
Real-world coding tasks¶
You can ask the AI assistant to help you write code using verified API calls:
“Write a Kanzi Studio plugin in C# that iterates all
Node2Ditems in a project and lists their names. Use only verified API calls.”“Show me how to create a custom
RenderPassin C++ for Kanzi 3.9.15. What do I need to subclass, what headers to include, and what virtual methods to override?”“I am writing a Java Android app with Kanzi. How do I handle touch input? Show me the relevant classes and their methods.”
Configuring your AI assistant¶
For best results, add instructions to your AI assistant that tell it how to use the Kanzi API MCP server tools effectively. These instructions help the AI assistant choose the right tool for each task, use the correct naming conventions, and verify API information before using it in code.
How you add these instructions depends on the AI assistant that you use:
In Claude Code, add the instructions to the
CLAUDE.mdfile in your project root directory.In VS Code with GitHub Copilot, add the instructions to the
.github/copilot-instructions.mdfile in your project root directory.In Claude Desktop, add the instructions to the system prompt of your project.
The following instructions are a recommended starting point. You can adjust them based on your needs.
Kanzi API MCP server — tool selection guide:
- Discovery (do not know exact name): search_kanzi_api() — supports
member_type filter (class/function/variable/enum/struct/interface/typedef)
and n_results up to 20.
- Verification (know the fully-qualified name): get_method_signature() — also
finds overloads through prefix matching. For example,
"kanzi::Node::setProperty" returns all setProperty variants.
- Include and import directives: get_include() — returns #include (C++),
import (Java), using (C#), or use (Rust).
- Full class overview: get_class_reference() — shows all members at a glance,
including inherited members labeled with their origin class.
- Deprecation check: get_deprecation_warnings() — check before using any API.
- Migration: compare_versions() — scope with class_name and change_type
(added/removed/changed/deprecated) for focused diffs. Supports pagination
with limit/offset.
- API evolution: get_api_history() — shows signature changes across all
versions.
Naming conventions:
- C++ uses :: separators (kanzi::Node::setName).
- Java and C# use . separators (com.rightware.kanzi.Node).
- All tools accept optional language (cpp/java/csharp/lua/rust) and api
parameters to narrow results.
Workflow:
- When writing Kanzi code, verify each API with get_method_signature()
before using it.
- When migrating between versions, start with compare_versions(), then
drill into changed APIs with get_api_history().
- After finding a class, use get_class_reference() to see available methods
rather than guessing member names.
- Do not hallucinate Kanzi API signatures. Use these tools to verify.
Kanzi API MCP tools reference¶
When you connect the Kanzi API MCP server to your AI assistant, the assistant gains access to these tools.
list_apis¶
Lists available Kanzi versions, API sets, and the number of records in each. Shows which version is currently active and what other versions are available.
Parameters |
None. |
Examples |
# List all available Kanzi versions and API sets.
list_apis()
|
set_kanzi_version¶
Switches to a different Kanzi version for all subsequent queries.
Parameters |
|
||
Examples |
# Switch to Kanzi 3.9.15.
set_kanzi_version(version="3.9.15")
# Switch to Kanzi 4.0.0.
set_kanzi_version(version="4.0.0")
|
search_kanzi_api¶
Searches Kanzi API documentation by keyword. Use this tool to find Kanzi classes, methods, properties, and types.
Parameters |
|
||||||||||
Examples |
# Find all classes related to RenderPass.
search_kanzi_api(query="RenderPass", member_type="class")
# Search for touch handling in the Java API.
search_kanzi_api(query="touch input", language="java", n_results=10)
# Find all enums in the C++ runtime API.
search_kanzi_api(query="enum", language="cpp", member_type="enum", n_results=20)
|
get_method_signature¶
Returns the exact signature of a Kanzi API member by name. Use this tool when you know the specific API and need its exact parameters, return type, and deprecation status. Also finds overloads through prefix matching.
Parameters |
|
||||||
Examples |
# Get the exact signature of a fully-qualified C++ method.
get_method_signature(name="kanzi::Node::setProperty")
# Find all overloads of addChild in C++.
get_method_signature(name="kanzi::Node::addChild", language="cpp")
# Look up a Java method by short name.
get_method_signature(name="setName", language="java")
|
get_include¶
Returns the correct include directive for a Kanzi type: #include for C++, import for Java, using for C#, or use for Rust.
Parameters |
|
||||||
Examples |
# Get the C++ include directive for Button2D.
get_include(name="Button2D", language="cpp")
# Get the Java import statement for Node.
get_include(name="Node", language="java")
|
get_class_reference¶
Returns a complete reference for a Kanzi class with all public methods, properties, and enums. Includes inherited members from parent classes and interfaces.
Parameters |
|
||||||
Examples |
# Get all members of the Node class in C++.
get_class_reference(name="kanzi::Node", language="cpp")
# Get the Java Button2D class reference.
get_class_reference(name="Button2D", language="java")
# Get the Lua API for Node.
get_class_reference(name="Node", language="lua")
|
get_deprecation_warnings¶
Checks whether a Kanzi API member is deprecated and returns the replacement. Use this tool before using any API that you suspect might be outdated.
Parameters |
|
||||||
Examples |
# Check whether the Page class is deprecated.
get_deprecation_warnings(name="kanzi::Page", language="cpp")
# Check deprecation status of a specific method.
get_deprecation_warnings(name="kanzi::Node::setFocusable")
|
compare_versions¶
Compares Kanzi APIs between two versions to find what changed. Use this tool for migration guidance. Shows APIs that were added, removed, changed, or deprecated between two versions.
Parameters |
|
||||||||||||||||||
Examples |
# Show all C++ API changes between two versions.
compare_versions(from_version="3.9.8", to_version="4.0.0", language="cpp")
# Show only removed APIs in the Node class between two versions.
compare_versions(from_version="3.9.13", to_version="4.0.0", class_name="Node", change_type="removed")
# Show newly deprecated Java APIs between two versions.
compare_versions(from_version="3.9.9", to_version="3.9.12", language="java", change_type="deprecated")
|
get_api_history¶
Shows how a specific Kanzi API member evolved across all loaded versions. Use this tool to track when an API was introduced, its signature changed, or it was deprecated or removed.
Parameters |
|
||||||
Examples |
# Track how a C++ method evolved across all versions.
get_api_history(fqn="kanzi::Node::trySetFocus", language="cpp")
# Track the history of ResourceManager::acquireResource.
get_api_history(fqn="kanzi::ResourceManager::acquireResource")
|