Skip to main content
Services live in _mcp/<service-name>/ in your workspace. The CLI scaffolds the directory structure, and you customize the configuration, tool definitions, and implementation.

Create a service

This scaffolds the service directory:

Configure the service

Edit src/config.ts to set the auth type and service metadata:
For services using API keys instead of OAuth, set authType: "custom" and define the credential fields:

Define tools

Edit src/tools.ts to define the tools your service exposes. Each tool has a name, description, and input/output schemas:
Set mutation: true for tools that modify data (writes, deletes, sends). This enables the framework to enforce access control policies on mutating operations.

Implement tool handlers

Edit src/Service.ts to implement the tool logic. The createClient method sets up an authenticated API client, and getToolHandler maps tool names to their implementations:
The context parameter is provided by the framework at call time — it contains the authenticated user’s credentials, service settings, and request metadata. Your handler code never fetches or manages credentials directly.