Skip to main content
Glama
Frontal MCP Server

Frontal MCP Server

Official
by frontal-labs

Frontal MCP Server

Frontal Banner

A standalone Model Context Protocol (MCP) server for the Frontal public API (api.frontal.dev). It exposes the API as a hybrid of curated, typed tools for the highest-value surfaces (ontology / knowledge graph and the data platform) plus spec-driven generic meta-tools that can reach any of the API's ~450 operations — all driven by the vendored OpenAPI spec.

Quick Start

Installation

# Install globally
npm install -g @frontal-labs/mcp-server

# Or install locally
npm install @frontal-labs/mcp-server

Basic Setup

  1. Get your API key from Frontal Platform

  2. Set up environment:

export FRONTAL_API_KEY="your_api_key_here"
  1. Start the server:

# For Claude Desktop (stdio transport)
frontal-mcp-server --transport stdio

# For web applications (HTTP transport)
frontal-mcp-server --transport http --port 3000

Claude Desktop Integration

Add to your Claude Desktop configuration:

macOS: ~/Library/Application Support/Claude/claude_desktop_config.json Windows: %APPDATA%\Claude\claude_desktop_config.json

{
  "mcpServers": {
    "frontal": {
      "command": "frontal-mcp-server",
      "args": ["--transport", "stdio"],
      "env": {
        "FRONTAL_API_KEY": "your_api_key_here"
      }
    }
  }
}

Related MCP server: github-mcp-tool

Features

  • Full API coverage: Generic meta-tools drive any endpoint from the vendored OpenAPI spec (api.frontal.dev, ~450 operations).

  • Curated tools: First-class, typed tools for the ontology / knowledge-graph and data-platform surfaces.

  • Edge-aware client: Bearer frt_ auth, cursor pagination, 429/Retry-After backoff, the edge retry matrix (retry 429/502/503/504, never 401/409/501), idempotency keys on retried writes, and region pinning.

  • Multi-transport: stdio (local / Claude Desktop) and Streamable HTTP, with per-request Authorization for multi-tenant hosting.

  • MCP 2026-07-28: speaks the 2026-07-28 protocol revision and still serves 2025-era clients. The HTTP transport is stateless (no sessions), so it runs as any number of instances behind a load balancer.

  • Type safe: TypeScript throughout with Zod-validated tool inputs.

  • Monitoring: Optional incident.io status-page integration and structured logging.

Available Tools

Tools are grouped into tool sets selectable via FRONTAL_TOOLSETS.

Generic (spec-driven) — generic

  • frontal_list_endpoints: Browse the API surface, filtered by tag/search.

  • frontal_describe_endpoint: Full parameter/body/response detail for one operation.

  • frontal_call_endpoint: Invoke any operation by operationId (or method + path), with optional auto-pagination.

Ontology (curated) — ontology

ontology_list_objects, ontology_get_object, ontology_list_object_types, ontology_list_relationships, ontology_query_graph, ontology_graph_neighborhood, ontology_graph_path, ontology_extract_entities, ontology_list_schemas, ontology_get_schema.

Data platform (curated) — data

data_query_federated, data_list_datasets, data_get_dataset, data_list_pipelines, data_create_pipeline, data_get_pipeline, data_list_pipeline_runs, data_get_pipeline_run, data_ingest_dataset, data_list_streams, data_list_schemas.

Workflows (curated) — workflows

workflows_search, workflows_get_run, workflows_get_run_summary, workflows_get_run_timeline.

Integrations (curated) — integrations

integrations_get, integrations_list_capabilities, integrations_list_action_runs, action_runs_get, integrations_test_connection, connection_tests_get, providers_get.

The public API has no endpoint that lists integrations, so there is no integrations_list tool.

Events (curated, read-only) — events

events_list, events_get, events_query.

Everything not covered by a curated tool stays reachable via the generic tools.

Tool safety

Every tool carries MCP annotations, so a client can tell what it does before calling it:

  • Read tools are marked readOnlyHint: true.

  • Write tools are data_create_pipeline, data_ingest_dataset, ontology_extract_entities and integrations_test_connection. Every tool that is not read-only is marked destructiveHint: true, so a client shows its own approval prompt before running it.

  • frontal_call_endpoint can call any operation, so it is marked destructive and open-world.

  • openWorldHint is true only for tools that reach systems outside Frontal: integrations_test_connection and frontal_call_endpoint.

Confirmation. Any operation that is not on the read allow-list is confirmed with the user before it runs, when the client supports elicitation. This covers the write tools above and every write made through frontal_call_endpoint. Clients without elicitation run the tool directly and rely on their own approval prompt.

Read-only mode. Set FRONTAL_READ_ONLY=true to offer only tools that read. Write tools are not registered, and frontal_call_endpoint refuses any operation that is not known to only read. "Read" is not decided by HTTP method alone: GET operations qualify, and so do the POST operations on an explicit allow-list of searches, queries and graph traversals (src/tools/policy.ts).

Structured output. Tools return the API response as structuredContent when it is a JSON object, and always as JSON text in content.

Configuration

Environment Variables

Variable

Description

Default

Required

FRONTAL_API_KEY

Frontal API key (frt_...). Used by stdio only; never a fallback for HTTP

-

For stdio

FRONTAL_BASE_URL

API base URL (bare host; /v1/ is in the paths)

https://api.frontal.dev

No

FRONTAL_REGION

Region pin (x-frontal-region, e.g. iad, lhr, fra, sin)

-

No

FRONTAL_TOOLSETS

Comma-separated tool sets to register (invalid values are rejected)

generic,ontology,data,workflows,integrations,events

No

FRONTAL_READ_ONLY

Offer only tools and operations that read data (true/false)

false

No

FRONTAL_HTTP_ALLOWED_ORIGINS

Comma-separated CORS allowlist for the HTTP transport

- (no origin trusted)

No

FRONTAL_HTTP_ALLOWED_HOSTS

Comma-separated Host allowlist for the HTTP transport (blocks DNS rebinding)

- (no host check)

No

FRONTAL_HTTP_MAX_BODY_BYTES

Largest HTTP request body accepted, in bytes

4194304

No

MCP_LOG_LEVEL

Log level

info

No

Over the HTTP transport, every MCP request must send a per-request Authorization: Bearer frt_... header (multi-tenant hosting); MCP requests without one are rejected with 401. The unauthenticated GET /health endpoint is the one exception: it always returns 200 {"status":"ok"} without a token. The FRONTAL_API_KEY env key is used only by the stdio transport and is never applied to HTTP requests. CORS trusts no origin by default: responses only carry Access-Control-Allow-Origin for origins listed in FRONTAL_HTTP_ALLOWED_ORIGINS (never *).

The HTTP transport keeps no sessions. GET and DELETE on the MCP endpoint return 405, no Mcp-Session-Id is issued, and FRONTAL_HTTP_MAX_SESSIONS is no longer read. See docs/MCP_SERVER.md for the supported protocol versions, and docs/MIGRATION-2026-07-28.md for what changed and when 2025-era HTTP support will be retired.

CLI Options

frontal-mcp-server [options]

Options:
  -t, --transport <type>     Transport type (stdio|http) [default: "stdio"]
  -p, --port <number>        HTTP port (for http transport) [default: 3000]
  -h, --host <address>       HTTP host (for http transport) [default: "localhost"]
  -k, --api-key <key>        Frontal API key
  -c, --config <path>         Configuration file path
  -v, --verbose              Verbose logging
  --log-level <level>        Log level (error|warn|info|debug) [default: "info"]

Usage Examples

Basic Usage

# Start with stdio transport (for Claude Desktop)
FRONTAL_API_KEY=your_key ./dist/bin/frontal-mcp-server.js

# Start with HTTP transport for web integration
FRONTAL_API_KEY=your_key ./dist/bin/frontal-mcp-server.js --transport http --port 3000

# Register only specific tool sets
FRONTAL_TOOLSETS=generic,data FRONTAL_API_KEY=your_key ./dist/bin/frontal-mcp-server.js

Programmatic Usage

import { FrontalMcpServer, createLogger } from "@frontal-labs/mcp-server";

import { createConfig } from "@frontal-labs/mcp-server";

const config = createConfig({
  apiKey: "frt_your_api_key",
  toolsets: ["generic", "ontology", "data"],
  transport: { transport: "stdio" },
});

const logger = createLogger({ level: "info" });
const server = new FrontalMcpServer(config, logger);

await server.initialize();
await server.connectStdio();

Architecture

The server is a thin, spec-driven layer over the Frontal public API:

  1. Vendored OpenAPI spec (openapi/public.v1.json) indexed at startup — the source of truth for endpoints, params, and auth.

  2. Frontal client (src/client.ts) — an edge-aware fetch client (auth, pagination, retry matrix, idempotency, region pin, errors).

  3. Tool adapters — a generic (meta-tool) adapter plus curated adapters (ontology, data, workflows, integrations, events), gated by FRONTAL_TOOLSETS.

  4. Transport layer — stdio and stateless Streamable HTTP on the MCP SDK v2, the latter binding a per-request bearer token via AsyncLocalStorage.

See ARCHITECTURE.md for details.

Development

Project Structure

mcp-server/
├── src/
│   ├── adapters/          # Service adapters for each Frontal service
│   ├── config/            # Configuration management
│   ├── server/            # Core MCP server implementation
│   ├── utils/             # Utilities (logging, etc.)
│   └── bin/               # CLI entry point
├── tests/                 # Test files
├── docs/                  # Documentation
└── examples/              # Integration examples

Scripts

# Build the project
bun run build

# Run tests
bun run test

# Run tests in watch mode
bun run test:watch

# Generate coverage report
bun run test:coverage

# Lint code
bun run lint

# Format code
bun run format

# Type check
bun run type-check

Current Status

Completed:

  • Spec-driven integration against the real api.frontal.dev OpenAPI contract (vendored + refreshable via bun run sync-spec).

  • Generic meta-tools (full coverage) + curated ontology/data tools.

  • Edge-aware client (auth, pagination, retry matrix, idempotency, region pin).

  • stdio and stateless Streamable HTTP transports, per-request auth over HTTP.

  • MCP protocol revision 2026-07-28, with 2025-era clients still served.

  • Test suite and CI (lint, type-check, coverage, build) plus Fly.io deploy.

Planned:

  • Curated tools for more surfaces (events, webhooks, integrations, workflows, billing) — reachable today via the generic tools.

  • MCP resources/prompts and optional OAuth flows.

Contributing

We welcome contributions! Please see our Developer Guide for detailed information.

  1. Fork the repository

  2. Create a feature branch

  3. Make your changes

  4. Run tests: bun run test

  5. Submit a pull request

Documentation

Troubleshooting

Common Issues

Server won't start:

# Check API key
echo $FRONTAL_API_KEY

# Validate configuration
frontal-mcp-server --validate-config

Connection issues:

# Test with different transport
frontal-mcp-server --transport http --port 3000

# Check logs
frontal-mcp-server --verbose

Performance issues:

# Enable debug logging
MCP_LOG_LEVEL=debug frontal-mcp-server

# Monitor resources
top -p $(pgrep frontal-mcp-server)

Getting Help

  • GitHub Issues: Report bugs and request features

  • Discord Community: Join our developer community

  • Documentation: Check docs/ for detailed guides

License

Apache License 2.0 - see LICENSE file for details.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers