Skip to main content
Adapters convert external definitions or systems into FrontMCP components (tools, resources, prompts). Common examples:
  • OpenAPI → generate typed tools from REST endpoints
  • File system / blobs → expose documents as resources
  • Custom backends → synthesize prompts/resources from proprietary schemas

Define an adapter

import { Adapter } from '@frontmcp/sdk';

@Adapter({
  name: 'Billing OpenAPI Loader',
  description: 'Generates tools/resources from the Billing API spec',
})
export default class BillingOpenApiAdapter {
  // implement adapter-specific logic to register generated tools/resources/prompts
}
Register the adapter on an app:
@App({
  name: 'Billing',
  adapters: [BillingOpenApiAdapter],
})
export default class BillingApp {}

Behavior

  • Generated items inherit the app’s plugins, providers, and policies and are tagged with provenance.
  • Adapters can contribute tools, resources, and prompts simultaneously.
Keep adapters pure: read a spec or source, generate components, and let app-level plugins handle cross-cutting concerns like auth, rate limiting, or caching.