MCP Servers (Agentic Integration)

Overview of the Model Context Protocol (MCP) servers used for discovery and execution within the nuxt-auto-crud ecosystem.

This document details the Tier 1 (Discovery) and Tier 2 (Execution) MCP architecture that enables AI agents to autonomously understand schemas and perform CRUD operations with high accuracy.

MCP Servers (Agentic Integration)

The nuxt-auto-crud ecosystem is designed for "Agentic First" operations. This is achieved through a two-tier MCP (Model Context Protocol) strategy that allows AI agents to discover system capabilities and execute operations without hardcoded configurations.

πŸ—οΈ Two-Tier Strategy

Tier 1: Discovery (OSS Entry)

Server: nac-schema-inspector (mcp-server-fetch-typescript)

This tier is used for Schema Awareness. It connects to the /_meta endpoint of any nuxt-auto-crud instance to retrieve a markdown or JSON representation of the entire database schema, including pluralized endpoint mapping and field constraints.

  • Primary Endpoint: /api/_meta?format=md
  • Purpose: Enables the agent to "see" the database structure and understand which fields are protected, hidden, or required.

Tier 2: Execution (Private/Premium)

Server: nac-bridge

This is the CRUD Execution Engine. It provides a standardized interface for agents to perform create, list, get, update, and delete operations directly against the engine.

  • Capabilities: Full internal CRUD mapping, handling of pluralized routes, and error translation.
  • Security: Inherits the engine's security boundaries (Protected/Hidden fields).

For maximum reliability, AI agents should follow this sequence:

  1. Discovery: Invoke nac-schema-inspector to fetch the current schema metadata.
  2. Analysis: Reason about the required payload and appropriate endpoint based on the meta-data retrieved.
  3. Execution: Use nac-bridge to perform the operation with schema-accurate payloads.

πŸ” Configuration & Secrets

When configuring MCP servers in a local environment (e.g., mcp_config.json), ensure that special characters in tokens are handled correctly:

  • URI Encoding: The plus sign (+) in NUXT_API_SECRET_TOKEN query params must be encoded as %2B to prevent signature mismatches during authentication.