
mars-curiosity
Agent Skills for MARS-Curiosity, the Delphi REST library: scaffold new MARS server projects (also from OpenAPI documents, with MARSgen), develop REST APIs (resources and, as an addition, routes, attributes, JWT, datasets with FireDAC and Devart UniDAC/MyDAC/IBDAC, SSE, WebStencils, client, deployment) and build MCP servers exposing Delphi tools to AI agents.
- GitHub stars
- 401
Install
/plugin install mars-curiosity@marsRun it inside Claude Code after adding the marketplace with /plugin marketplace add andrea-magni/MARS.
Contents
Discovered from sourceSkills 3
Developing with MARS-Curiosity
MARS (https://github.com/andrea-magni/MARS) maps HTTP requests onto plain Delphi classes via attributes and RTTI. Runtime model:
- Engine (
IMARSEngine, usuallyTServerEngine.DefaultinServer.Ignition.pas): owns HTTP-level config (port, base path/rest, CORS, compression) and one or more Applications added withAddApplication('DefaultApp', '/default', ['Server.Resources.*'])— the third argument is a list of unit-name masks selecting which registered resources belong to the app. - Resources: classes annotated with
[Path('...')], registered viaMARSRegister(TMyResource)(orMARSRegister([TResA, TResB]), orTMARSResourceRegistry.Instance.RegisterResource<TMyResource>) in the unitinitialization. A new instance is created per request and freed afterwards. - Activation (
IMARSActivation): per-request context (request, response, token, URL...). Injectable anywhere with[Context]. - URL = engine BasePath + app path + resource
[Path]+ method[Path]:/rest/default/customers/123. - Routes (additional style,
MARS.Core.Routes, since 1.9.0): endpoints defined in code withMARSRoutes(...)modules andR.Get<T>('path', function (const C: TMARSRouteContext): T ...), added withIMARSApplication.AddRoutes; same activation, serialization, roles and OpenAPI as resources. Seereferences/routes.md.
Resources first, routes as an option
Resource classes with attributes (JAX-RS style) are the primary MARS model and stay fully supported: routes are an addition, not a replacement. Both styles live in the same application, on the same engine, base path, token and OpenAPI document.
- Write resources by default: new endpoints, examples, answers to "how do I add an endpoint".
- Use routes when the user asks for them (Express / Minimal API / endpoints in code, middlewares around endpoints) or when the project already uses them (
Server.Routes*units,MARS.Core.Routes,AddRoutes,MARSRoutes); follow the style of the code around. - Never convert existing resources to routes (or routes to resources) unless the user asks. Login (
TMARSTokenResource), OpenAPI, static files and MCP (TMCPResource) are resources in every project, route-based ones included.
Minimal resource
unit Server.Resources.Customers;
interface
uses
SysUtils, Classes
, MARS.Core.Attributes, MARS.Core.MediaType, MARS.Core.JSON;
type
TCustomer = record
Id: Integer;
Name: string;
end;
[Path('customers'), Produces(TMediaType.APPLICATION_JSON)]
TCustomersResource = class
public
[GET]
function List([QueryParam] search: string): TArray<TCustomer>;
[GET, Path('{id}')]
function GetById([PathParam] id: Integer): TCustomer;
[POST, Consumes(TMediaType.APPLICATION_JSON)]
function Add([BodyParam] ACustomer: TCustomer): TCustomer;
end;
implementation
uses
MARS.Core.Registry;
// ... method bodies ...
initialization
MARSRegister(TCustomersResource);
end.
Records, arrays of records, objects, TJSONObject/TJSONArray, strings, numbers, streams and datasets are serialized automatically by the MessageBodyWriter registry; same in reverse for [BodyParam] via MessageBodyReaders. No manual JSON code needed for plain data.
Returned objects (class instances) are freed by MARS after writing the response. Mark the method [IsReference] when returning a shared/long-lived instance that must NOT be freed.
Raise EMARSHttpException.Create('Not found', 404) for error statuses; raise EMARSWithResponseException to return a structured (JSON) error body. Both are in MARS.Core.Exceptions. Exceptions raised while binding parameters (custom MessageBodyReaders included) keep their status if they are EMARSHttpException, otherwise they become a 500: the built-in JSON readers use this to answer 400 when the request body is missing or malformed.
Reference files — read the one matching the task
references/routes.md— route-based endpoints (Express / Minimal API style):MARSRoutesmodules,TMARSRouter(Get<T>,Post<TBody,TResult>, groups, constraints{id:int}),TMARSRouteContext, declarations, middlewares (Use), OpenAPI. Read when the user wants endpoints defined in code, middlewares, or works onServer.Routes*units.references/attributes.md— complete attribute catalog (HTTP methods,Path,Produces/Consumes, all*Parambinding attributes,Context, config params, authorization, invocation events, response shaping). Read when writing or reviewing resource declarations.references/authentication.md— JWT tokens,TMARSTokenResourcelogin endpoint,Authenticateoverride,[RolesAllowed]/[PermitAll]/[DenyAll],[Context] Token: TMARSToken, JWT ini parameters. Read for anything auth/security related.references/firedac.md— publishing datasets withTMARSFDDatasetResource+[SQLStatement], ad-hoc queries with[Context] FD: TMARSFireDAC, connection defs from ini, macro/param injection, applying deltas. Read for database endpoints.references/devart.md— the same with Devart UniDAC, MyDAC, IBDAC (TMARSUniDAC/TMARSMyDAC/TMARSIBDAC, connect strings from ini, whole datasets instead of deltas,TMARS<Lib>Resourceclients). Read when the project uses a Devart library.references/client.md— consuming a MARS server:TMARSNetClient/TMARSIndyClient,TMARSClientApplication, typed client resources,TMARSClientToken, sync/async calls,EMARSClientHttpException. Read when writing Delphi client code.references/configuration.md— ini file structure, engine/application parameters (port, CORS, compression, SSL, JWT, OpenAPI info, FireDAC), reading params in code,[EngineParam]/[ApplicationParam]injection.references/sse.md— server-sent events:TMARSServerSideEventendpoints with worker procs,text/event-stream, client-sideTMARSClientResourceSSE. Read for push/streaming/live-update endpoints.references/marsgen.md— MARSgen: Delphi types (records or classes) from OpenAPI documents and JSON samples, MARS resources generated from a document (Server.Resources.<Name>.Basegenerated,Server.Resources.<Name>the user's), importing a changed document again (MARSgen update), conformance of a server (MARSgen compare). Read when the project has*.marsgen.jsonor*.Base.pasunits, or the user has an OpenAPI document or JSON samples to turn into code.references/webstencils.md— server-side HTML with WebStencils (Delphi 12.2+):[Context] TMARSWebStencils,ContentFromFile,AddVarValue/AddDataVar, template folders. Read for HTML-rendering endpoints (also htmx-style apps).
For hosting/deployment (Windows service, ISAPI, Apache, FastCGI, Linux daemon, HTTPS) see references/deployment.md in the companion skill mars-new-project.
Conventions worth keeping
- One resource per unit, unit named
Server.Resources.<Topic>, so the standard'Server.Resources.*'mask finds it; remember to add new units to the .dpr uses clause, otherwise the unit'sinitializationnever runs and the resource is silently missing. - Prefer attribute-driven binding over reading
IMARSRequestmanually; inject what you need with[Context]. - Working demos for most features live in
Demos/in the MARS repo:MARSTemplate(baseline),TokenRenew(JWT+roles),OTPDemo(FireDAC+auth),ErrorObjects(structured errors),FireDACDemo/UniDACDemo/MyDACDemo/IBDACDemo(the same customers app with each data access library),SSEDemo(server-sent events),RoutesDemo(route-based endpoints and middlewares),HtmxDemo,WebStencilsDemo. When unsure about an API, check the corresponding demo or the source unit inSource/— it is the ground truth.
Build an MCP server with MARS-Curiosity
MARS ships native MCP support (units MARS.MCP.* in Source/): derive a resource from TMCPResource, mark methods with [MCPTool], and any MARS server becomes an MCP server speaking the Streamable HTTP transport (single endpoint, JSON-RPC 2.0 over POST). Tool list and JSON Schema are generated from RTTI — no protocol code to write.
The complete working example is Demos/MCPServer in the MARS repository (public tools + FireDAC-backed authenticated tools + OAuth).
MCP servers are built on resources (TMCPResource), also in projects that define their REST endpoints as routes (MARS.Core.Routes, MARSTemplateRoutes): routes are an addition to resources, and an MCP resource lives next to them in the same application. Add it to the application's resources ('Server.Resources.*' mask) as shown below.
Minimal MCP server
unit Server.Resources.MCP;
interface
uses
SysUtils, Classes
, MARS.Core.Attributes, MARS.Core.MediaType
, MARS.MCP.Resource, MARS.MCP.Attributes;
type
TCalculationResult = record
operation: string;
value: Double;
end;
[Path('mcp')
, MCPServerInfo('My MCP Server', '1.0.0'
, 'Optional instructions the AI agent reads on connection.')]
TMyMCPResource = class(TMCPResource)
public
[MCPTool('say_hello', 'Returns a friendly greeting for the given name')]
function SayHello(
[MCPParam('name', 'Name of the person to greet')] const AName: string): string;
[MCPTool('add_numbers', 'Adds two numbers and returns a structured result')]
function AddNumbers(
[MCPParam('a', 'First operand')] const A: Double;
[MCPParam('b', 'Second operand')] const B: Double): TCalculationResult;
end;
implementation
uses
MARS.Core.Registry;
function TMyMCPResource.SayHello(const AName: string): string;
begin
Result := 'Hello, ' + AName + '!';
end;
function TMyMCPResource.AddNumbers(const A, B: Double): TCalculationResult;
begin
Result.operation := 'add';
Result.value := A + B;
end;
initialization
MARSRegister([TMyMCPResource]);
end.
This is a regular MARS resource: register the unit mask in Server.Ignition.pas as usual (AddApplication('DefaultApp', '/default', ['Server.Resources.*'])). The MCP endpoint is the composed URL, e.g. http://localhost:8080/rest/default/mcp. Everything the mars-development skill says about resources, [Context] injection and configuration applies here too.
A complete starting unit is available in assets/Server.Resources.MCP.pas.template.
What the attributes do
| Attribute | Where | Effect |
|---|---|---|
MCPServerInfo(name, version, instructions) | resource class | identity returned by initialize; instructions are read by the agent |
MCPTool(description) / MCPTool(name, description) | public method | exposes the method as a tool (name defaults to the method name) |
MCPParam(description) / MCPParam(name, description) | parameter | documents and optionally renames the parameter in the JSON Schema (rename it: Delphi convention names like AValue leak otherwise) |
MCPDefault('<JSON literal>') | tool parameter | makes the parameter optional, with that default value |
MCPResource(uri, [name,] description [, mimeType]) | public method | exposes readable content by URI; {param} placeholders make it a template — see references/resources-prompts.md |
MCPPrompt([name,] description) | public method | exposes a reusable prompt template; parameters become the prompt arguments — see references/resources-prompts.md |
RolesAllowed('...') / DenyAll | tool method | per-tool authorization — see references/authorization.md |
MCPOAuth | resource class | 401 + OAuth discovery for unauthenticated requests — see references/authorization.md |
MCPToolUI(uri [, visibility]) | tool method | MCP Apps: links the tool to an interactive ui:// view — see references/mcp-apps.md |
MCPAppResource(uri, [name,] description), MCPAppCSP(...), MCPAppBorder(...) | public method | MCP Apps: the HTML view (text/html;profile=mcp-app) and its CSP/border settings — see references/mcp-apps.md |
MCPMeta('<JSON object>') | tool/resource method | free-form _meta, merged with the MCP Apps attributes |
Tool results: a string becomes a text content block; records (and arrays, numbers...) are serialized with the MARS JSON serializer and records also become structuredContent. Exceptions raised inside a tool are reported as tool execution errors (isError: true), not protocol errors. TDataSet results need TMCPDataResource — see references/database-tools.md.
Parameter/field types map to JSON Schema automatically: strings → string, integers → integer, floats → number, Boolean → boolean, enums → string + enum values, TDateTime → string/date-time, TDate → string/date ("2026-10-19"), dynamic arrays → array, records → nested object. Parameters are listed as required, except those marked [MCPDefault('<JSON literal>')]: they are left out of required, the schema advertises the value as default, and a missing or null argument is bound to it ([MCPDefault('true')], ('7'), ('"value_date"'), ('""'), ('[]') — the literal is converted like any argument).
Protocol facts worth knowing
- Supported JSON-RPC methods:
initialize(protocol versions 2025-06-18, 2025-03-26, 2024-11-05),ping,tools/list,tools/call,resources/list,resources/templates/list,resources/read,prompts/list,prompts/get. Notifications answer202with no body;GET/DELETEanswer405(stateless server, allowed by spec). Theresources/promptscapabilities are advertised only when the class declares any. ExtendTMCPDispatcher.DispatchRequestfor additional methods. - Tool discovery is cached per resource class (thread-safe, RTTI scanned once). The authorization filter is evaluated per request, so caching never leaks role-protected tools.
- The dispatcher class is pluggable: override
GetDispatcherClasson the resource (that is howTMCPDataResourceadds dataset support). - A local server on stdio, without HTTP:
TMCPStdioServer.Serve(TMyTools.Create, 'name', '1.0.0')in a console program (MARS.MCP.Stdio; JSON-RPC a line each on stdin/stdout, UTF-8; log only to stderr), registered withclaude mcp add name -- path\to\exe.
When to read the references
- Any authentication requirement — Bearer tokens, roles, hiding tools per user, OAuth login window for Claude/ChatGPT/Open WebUI: read
references/authorization.mdfirst, it also lists client-specific pitfalls that look like server bugs. - Tools that query a database (FireDAC, TFDQuery, TMARSFireDAC, or Devart UniDAC/MyDAC/IBDAC with TMARSUniDAC/TMARSMyDAC/TMARSIBDAC): read
references/database-tools.md— dataset ownership rules matter. - MCP resources or prompts (attachable content like DB schemas, URI templates, reusable prompt templates): read
references/resources-prompts.md. - Interactive UIs / MCP Apps (a chart, form or dashboard rendered by Claude or another host next to a tool result,
ui://resources): readreferences/mcp-apps.md.
Verify the server
With curl (initialize / list / call):
curl -X POST http://localhost:8080/rest/default/mcp -H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'
curl -X POST http://localhost:8080/rest/default/mcp -H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"add_numbers","arguments":{"a":2,"b":3}}}'
With the official MCP Inspector (needs Node.js), which performs a real client handshake:
npx @modelcontextprotocol/inspector --cli http://localhost:8080/rest/default/mcp --transport http --method tools/list
Connect real clients: claude mcp add --transport http my-server http://localhost:8080/rest/default/mcp, or in Open WebUI add an External Tools connection of type MCP (Streamable HTTP) (requires Open WebUI ≥ 0.6.31). Remember: from another machine/container, use the server's LAN IP, not localhost.
Troubleshooting quick table
| Symptom | Likely cause |
|---|---|
| Client says no tools / "no such tool" | tools not enabled for the chat/model on the client side; or tool hidden by a role filter (by design it answers "Unknown tool") |
| 404 on the endpoint | wrong composed URL — check engine BasePath (/rest), app path, resource [Path] |
| 403 instead of OAuth login | class-level [RolesAllowed] fires before MCP: use [MCPOAuth] for OAuth-protected endpoints (see references/authorization.md) |
| Client aborts during OAuth discovery | a /.well-known/* probe returns 500/garbage — wire TMCPOAuthMetadata.HandleWellKnownRequest in BeforeHandleRequest (it also answers clean 404s and serves the openid-configuration alias) |
| Works with curl, not from Docker/other host | server bound/reached via localhost only — use the LAN IP; verify with curl from the client's network |
Create a new MARS server project
MARS-Curiosity (https://github.com/andrea-magni/MARS) is a REST library for Delphi. A MARS server has three moving parts, regardless of host type:
- A project file (.dpr) — the host: console app, VCL/FMX form, Windows service, ISAPI dll, Apache module, or Linux daemon. The host creates an HTTP server (typically
TMARShttpServerIndy) bound to the engine. Server.Ignition.pas— creates the singletonIMARSEngine(TServerEngine.Default), loads configuration, and registers applications withAddApplication(AName, ABasePath, AResourceMasks).- Resource units (
Server.Resources.*.pas) — plain classes annotated with attributes ([Path],[GET],[Produces], ...) and registered in theirinitializationsection viaMARSRegister(...). This JAX-RS style is the primary MARS model. As an addition (not a replacement), endpoints can also be defined as routes in code (Server.Routes*.pas,MARS.Core.Routes, Express style), next to the resources.
Endpoint URLs compose as: engine base path (/rest by default) + application base path (/default) + resource [Path] + method [Path]. So the HelloWorld template answers at http://localhost:8080/rest/default/helloworld.
Two ways to scaffold
Option A — copy the official template (recommended for full projects)
Demos/MARSTemplate/ in the MARS repository is the canonical project group: console host, VCL form host, FMX host, Windows service, ISAPI, Apache module, FCGI, Linux daemon, tests, and an FMX client — all sharing the same Server.Ignition.pas and resource units. To scaffold:
- Copy the whole
Demos/MARSTemplatefolder to the target location, outside the MARS folder (the setup's uninstaller deletes the MARS folder; MARSCmd usesDocuments\MARS Projects\<name>). The.dprojsearch paths and theRootFolderofServer.Resources.OpenAPI.pasrefer to the MARS folder as..\..\({bin}\..\..\..\): outsideDemos\rewrite them as$(MARSDIR)\(IDE environment variable set by the setup) and drop the..\..\Sourceinclause/DCCReferenceofMARS.Linux.Daemon, as MARSCmd does. - Rename files and rename the
MARSTemplateprefix inside.dpr/.dproj/.groupprojfiles to the new project name (keepServer.*.pasunit names as they are — the engine registers resources by unit name mask'Server.Resources.*'). - Delete the host flavors the user does not need.
- Rename the ini file in
bin/to match the new executable name.
Pick the template:
Demos/MARSTemplate/(default): Indy, endpoints as resource classes;Demos/MARSTemplateDCS/: the same on Delphi Cross Socket, if the user asks for the DCS transport;Demos/MARSTemplateRoutes/: the same asMARSTemplate, with its sample endpoints defined as routes in code (Server.Routes.pas,MARS.Core.Routes, Express style), only if the user asks for route-based / Express-style endpoints. Routes are in addition to resources: token (login) and OpenAPI stay resources there too, and resource units can be added to that project as to any other ('Server.Resources.*').
MARSCmd (Utils\Bin\Win32\MARScmd_VCL.exe) lists the three templates and does all the steps above. From the command line (prefer it when you can run programs: it does steps 1, 2 and 4 exactly as the tool, with a random JWT.Secret), use Utils\Bin\Win32\MARScmd.exe:
MARScmd <ProjectName> [--template MARSTemplate|MARSTemplateDCS|MARSTemplateRoutes|<folder>] [--dest <folder>]
MARScmd --list-templates
Default destination: Documents\MARS Projects\<ProjectName>; a destination inside the MARS folder needs --allow-inside; exit code 0 = created, 1 = error (i.e. destination not empty), 2 = wrong command line. Then delete the host flavors the user does not need (step 3).
Option B — generate a minimal project from bundled templates
For a lean, from-scratch server (one console host, HelloWorld + Token resources, ini config), generate the files from assets/ in this skill directory, replacing every occurrence of {{PROJECT_NAME}} with the project name (a valid Delphi identifier):
| Template | Target file |
|---|---|
assets/ConsoleServer.dpr.template | {{PROJECT_NAME}}Server.dpr |
assets/Server.Ignition.pas.template | Server.Ignition.pas |
assets/Server.Resources.HelloWorld.pas.template | Server.Resources.HelloWorld.pas |
assets/Server.Resources.Token.pas.template | Server.Resources.Token.pas |
assets/ServerConfig.ini.template | bin\{{PROJECT_NAME}}Server.ini (next to the executable) |
Then create a .dproj for it (or let the user open the .dpr in the IDE and save). Set the output directory to bin\ so the executable sits next to its ini file.
Option C — from an OpenAPI document (MARSgen)
When the API is described by an OpenAPI 3.0/3.1 document (JSON or YAML, file or URL), generate the project with Utils\Bin\Win32\MARSgen.exe: it runs MARSCmd (same templates, same options) and adds the resources of every operation, the Delphi types of the schemas, and the links (Server.<Api> in the uses of Server.Ignition, the base path of the document as engine/application paths, title/version in Server.ini):
MARSgen openapi <document> --project <ProjectName> [--template MARSTemplate|MARSTemplateDCS|MARSTemplateRoutes] [--dest <folder>]
Every operation answers 501 until implemented: override its Do<Operation> method in Server.Resources.<Name>.pas (the user's unit; *.Base.pas units are generated, never edit them). Keep <Api>.marsgen.json with the sources: MARSgen update <folder> imports the document again after it changes, never touching the user's units. See the mars-development skill, references/marsgen.md.
Project requirements (all options)
- Library paths: the project must see the MARS sources. Either the user installed MARS (Library Path already contains them) or add to the project search path:
[MARS]\Source,[MARS]\ThirdParty\delphi-jose-jwt\Source\Common,[MARS]\ThirdParty\delphi-jose-jwt\Source\JOSE(a git submodule: clone MARS with--recurse-submodules),[MARS]\ThirdParty\mORMot2\src\core,[MARS]\ThirdParty\mORMot2\src\crypt,[MARS]\ThirdParty\mORMot2\src\lib,[MARS]\ThirdParty\Neslib.Yaml,[MARS]\ThirdParty\Neslib.Yaml\Neslib. {$I MARS.inc}must compile — it lives in[MARS]\Source, so that path is required even for the .dpr.- JWT backend: exactly one of
MARS.mORMotJWT.Token(Windows) orMARS.JOSEJWT.Token(all platforms) must be in the ignition uses clause. The template handles this with{$IFDEF MSWINDOWS}. - Delphi compatibility: 10.4 Sydney through 13 Florence; earlier versions are not supported (
MARS.incstops the build). Packages per IDE version are in[MARS]\Packages\.
Configuration defaults
The engine defaults (from TMARSEngine.Create): Port=8080, PortSSL=0, ThreadPoolSize=75, BasePath=/rest. FEngine.Parameters.LoadFromIniFile overrides them from an ini named like the executable (or passed with the -configFileName <file> command-line switch), section [DefaultEngine]. See the ini template for the commented catalog of common settings (JWT, CORS, compression, SSL, OpenAPI info, FireDAC connection defs).
Adding more pieces
-
New resource: create
Server.Resources.<Name>.paswith an attributed class, register it withMARSRegister(TMyResource)ininitialization, and add the unit to the .dpr uses. No engine change needed — the'Server.Resources.*'mask picks it up. -
New route module (projects using routes, or when the user asks for them): create
Server.Routes.<Name>.pasregistering a module withMARSRoutes('Server.Routes.<Name>', '<path>', procedure (const R: TMARSRouter) ...)ininitialization, add the unit to the .dpr uses, and make sure the ignition callsLApplication.AddRoutes('Server.Routes.*')(already there inMARSTemplateRoutes). See themars-developmentskill,references/routes.md. -
Token/login endpoint: already included (
Server.Resources.Token.passubclassesTMARSTokenResource). OverrideAuthenticateto plug real credential checks. -
OpenAPI/Swagger endpoint: see
Demos/MARSTemplate/Server.Resources.OpenAPI.pas(TOpenAPIResource+MARS.OpenAPI.v3.InjectionServicein the ignition uses) and theOpenAPI.info.*ini parameters; the documentation pages are Swagger UI (<app>/www/) and Stoplight Elements (<app>/docs,TOpenAPIElementsResourceofMARS.OpenAPI.Elements). -
FireDAC: uncomment the
FireDAC.<DefName>.*entries in the ini; the ignition template already callsTMARSFireDAC.LoadConnectionDefs(FEngine.Parameters, 'FireDAC')under{$IFDEF MARS_FIREDAC}. -
Devart UniDAC, MyDAC or IBDAC instead of FireDAC: define
MARS_UNIDAC/MARS_MYDAC/MARS_IBDACin the projects (or inMARS.inc), load the connection defs withTMARS<Lib>.LoadConnectionDefs(FEngine.Parameters, '<Lib>')and add<Lib>.<DefName>.*entries to the ini. See themars-developmentskill,references/devart.md, and the demosDemos/UniDACDemo,MyDACDemo,IBDACDemo(Demos/FireDACDemofor FireDAC). -
Deployment (Windows service install, ISAPI on IIS, Apache module, FastCGI, Linux daemon, HTTPS/SSL, reverse proxy): read
references/deployment.mdin this skill.
For everything about writing resources (attributes, parameter binding, auth, FireDAC and Devart datasets, SSE, WebStencils, clients), consult the companion skill mars-development.
Verify the result
- Compile (IDE or MSBuild against the
.dproj). - Run the server and hit
http://localhost:8080/rest/default/helloworld— expectHello World!astext/plain. - Login check:
POST http://localhost:8080/rest/default/tokenwith form fieldsusernameandpasswordreturns a JSON token. Note: the sampleAuthenticateinTMARSTokenResourceaccepts the current hour (0-23) as password (SameText(APassword, IntToStr(HourOf(Now)))) and grants rolestandard(plusadminfor usernameadmin) — it exists only to make demos runnable. Override it before any real use.
Sponsors
Details
- Marketplace
- andrea-magni/MARS
- Category
- Community