IR
irwinrodriguez.dev
Back to docs

FoxServer

FoxServer is a standalone HTTP and HTTPS server that publishes logic written in Visual FoxPro, and serves websites as well. No IIS and no Apache: the host is a process of its own that loads your MTDLL over COM and answers the requests.

What sets it apart from any other bridge is that the same controller is published three times: as a REST API, as a JSON-RPC 2.0 method and as an MCP tool, without writing the endpoint three times. You write one VFP function and an AI agent can call it exactly as your front end does.

In this section

  • Installation: Requirements, the installer, the installation tree and where the license goes.
  • Quick Start: Your first REST API, from the empty project to the first response.
  • Configuration: The server manifest: ports, HTTPS, logging, origins and middlewares.
  • Routing: How a route is declared in the HELP comment, the parameters and the responses.
  • Middleware: The middlewares the host ships: JWT, logging, SSE, webhooks, status, OpenAPI.
  • Licensing: Developer and Runtime, activation, maintenance and the version gate.
  • Advanced Features: SSE, outgoing webhooks, the status endpoint and Windows service mode.
  • Examples: Hello world, a full CRUD and a master-detail, ready to copy.
  • API Reference: The real surface of ApiController, req and res, member by member.
  • FAQ: Frequently asked questions and what to look at when something will not start.

What it does

  • REST, JSON-RPC 2.0 and MCP from the same controller. The as <capability> alias in the HELP is what turns a route into a JSON-RPC method and an MCP tool
  • Standalone HTTP and HTTPS server, with no IIS or Apache, that also serves static websites
  • Routing with parameters, declared in the method's own HELP comment
  • Host middlewares: JWT, request logging, SSE, outgoing webhooks, PIN-protected status, OpenAPI and Swagger at /docs
  • /openapi.json generated from the project, with nothing written by hand
  • Outgoing webhooks with Standard Webhooks signing, retries and a dead-letter queue
  • Windows service mode, installed and removed from the host itself
  • License validated locally at start-up, without calling any server
A Developer license only listens to 127.0.0.1 This is the product's number one misunderstanding, and it is worth knowing before buying: FoxServer seats are Developer licenses, and the host answers 403 to any request that does not come from 127.0.0.1. It is for developing and testing on your own machine. For another machine on the network or on the internet to call your API you need a Runtime license, which is the other product in the shop. The symptom looks like a permissions problem and it is the license.

Requirements

There are two different sets, and mixing them causes half the trouble: the machine you develop on needs the Visual FoxPro IDE; the machine you serve from does not.

To developTo serve
Visual FoxProThe VFP 9 SP2 IDE. init, controller-add and build need it: CREATE PROJECT and BUILD MTDLL do not exist in the runtimeOnly the VFP 9 runtime: vfp9r.dll, vfp9t.dll, vfp9renu.dll and msvcr71.dll next to your MTDLL
.NET.NET 10 Runtime, x86 variant. The 64-bit one does not work even if it is installed: the host is 32-bit because it loads the VFP COM, which isThe same: .NET 10 Runtime x86
WindowsWindows 10 or later, 32 or 64 bitsWindows 10 or later
PermissionsAn elevated console for build: BUILD MTDLL registers the coclass when it finishesAdministrator only to install and to register the service
LicenseDeveloper (localhost)Runtime, if it is going to serve other machines
No internet connection FoxServer calls no external server to do its work. The license is a JWT checked locally at start-up, against a public key inside the binary. Published version: 0.9.38.