Files
Template-MCP/src/types.ts
T
Jonathan Miller 91b78f8da1 feat: initial MCP server template with placeholder-driven scaffolding
Template repository for creating MokoStandards-compliant MCP servers.
Includes 4-file src/ structure (index, client, config, types), setup
wizard, example tools, 12 CI/CD workflows, full docs, and {{placeholder}}
tokens for search-and-replace customization.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-07 14:39:19 -05:00

49 lines
1.3 KiB
TypeScript

/* Copyright (C) 2026 Moko Consulting <hello@mokoconsulting.tech>
*
* This file is part of a Moko Consulting project.
*
* SPDX-License-Identifier: GPL-3.0-or-later
*
* FILE INFORMATION
* DEFGROUP: {{PROJECT_NAME}}.Types
* INGROUP: {{PROJECT_NAME}}
* REPO: https://git.mokoconsulting.tech/MokoConsulting/{{PROJECT_NAME}}
* PATH: /src/types.ts
* VERSION: 01.00.00
* BRIEF: TypeScript type definitions for {{DISPLAY_NAME}} MCP server
*/
/**
* Connection configuration for a single API instance.
*
* Rename and extend these fields to match your target API's auth mechanism:
* - `apiKey` + DOLAPIKEY header (Dolibarr)
* - `apiToken` + Bearer header (Joomla, GitHub)
* - `username`/`password` (Basic auth)
* - `oauth` fields (OAuth2 flows)
*/
export interface ApiConnection {
/** Base URL of the API instance (no trailing slash) */
baseUrl: string;
/** API key or token for authentication */
apiKey: string;
/** Skip TLS certificate verification (self-signed certs) */
insecure?: boolean;
}
/**
* Top-level configuration supporting multiple named connections.
*/
export interface ApiConfig {
connections: Record<string, ApiConnection>;
defaultConnection: string;
}
/**
* Normalized API response returned by the HTTP client.
*/
export interface ApiResponse {
status: number;
data: unknown;
}