External AI Assistants
Developers building complex C# scripts or integrations for Struktural can drastically increase their productivity by connecting their local AI IDEs (such as Cursor or Windsurf) or desktop clients (such as Claude Desktop) directly to the Struktural MCP Server.
By connecting to the MCP Server, the AI agent gains the ability to dynamically read this Wiki, introspect the live application schema, and generate correct code that adheres to the platform's sandbox constraints.
Authentication
The Struktural MCP Server enforces Role-Based Access Control (RBAC). It requires the connecting client to provide valid authentication.
You must pass a valid JWT token via the Authorization: Bearer <TOKEN> header, or a valid ASP.NET Authentication Cookie. The user associated with the token must have the Admin role to access the documentation and draft state tools.
Available MCP Tools
When an AI assistant connects to the Struktural /mcp endpoint, it discovers several tools it can invoke:
admin_get_struktural_documentation: Returns the raw Markdown content of specific technical topics from this Wiki (e.g.,Scripting,ViewLayout,EntitySchema). The AI should be instructed to always call this tool before attempting to write C# code.search_documentation(Wiki Extension): Performs semantic searches across the entire Markdown knowledge base to locate relevant business scenarios or architectural rules.admin_get_draft_status: Allows the AI to read the current memory state of the application being built.admin_get_entity_payload: Returns the exact JSON structure required to interact with a specific entity's API.
Configuring Claude Desktop
To connect Claude Desktop to your local or remote Struktural instance, add the following configuration to your claude_desktop_config.json file:
{
"mcpServers": {
"struktural-docs": {
"command": "curl",
"args": [
"-X", "POST",
"https://your-struktural-domain.com/mcp",
"-H", "Content-Type: application/json",
"-H", "Authorization: Bearer YOUR_VALID_JWT_TOKEN",
"-d"
]
}
}
}
(Note: Replace the domain and JWT token with your actual environment details. Depending on your MCP client, you may need a specialized HTTP transport adapter if the client does not support raw HTTP POST out of the box).
Recommended Prompting Strategy
When interacting with your connected AI, use prompts that force it to consult the documentation first:
"I need to write a Custom Action for the
Invoiceentity that approves the invoice and sends an email. Before writing the code, use theadmin_get_struktural_documentationtool to read the 'Scripting' topic so you understand the available execution context variables, theDb.SaveEntityAsynchelper, and theUiobject."