MCP

Configure your MCP server to connect to your Derived project.

Configuration

Below is the configuration schema to connect to the Derived MCP Server:

{
  "mcpServers": {
    "derived": {
      "name": "Derived",
      "version": "1.0.0",
      "command": "npx",
      "args": [
        "-y",
        "derived-mcp-server"
      ],
      "env": {
        "DERIVED_API_URL": "https://api.derived.dev/api/v1",
        "AUTH_TOKEN": "your-auth-token"
      }
    }
  }
}

Authentication Token

Obtain your authentication token from the Derived App under Account Settings.

Features of Derived MCP Server

Copy Resolved Code to Your Codebase

Copy resolved code directly into your codebase from your IDE.

  • Specify the entity and template group in natural language.
  • Example: copy country from express api from derived
  • This command retrieves the country entity, resolves all templates in the express api template group, and copies the generated code to your codebase.

Create and Copy New Entities

Create a new entity and copy its resolved code to your codebase.

  • Specify the entity, its fields, and the desired template group.
  • Example: create state with fields name, code, country_id and copy express api from derived
  • This command creates a state entity using your AJV validator, resolves templates in the express api template group, and copies the generated code to your codebase.

Use Code as Context for AI Tools

Leverage existing code as context for AI-driven development.

  • Specify the entity and template group to use as context for generating new code.
  • Example: use apiSpec stateByCountryName and single express api template group as context. Generate a new API to fetch state by country name.
  • This command uses the stateByCountryName entity from apiSpec and the express api template group as context to create a new API for fetching states by country name.

On this page