Skip to main content
Glama
clients.tsâ€ĸ1.24 kB
import { CrudClient, ReadOnlyClient } from '@mcp-abap-adt/adt-clients'; import type { AbapConnection } from '@mcp-abap-adt/connection'; import { getManagedConnection } from './utils'; import { registerConnectionResetHook } from './connectionEvents'; let readOnlyClient: ReadOnlyClient | undefined; let readOnlyClientConnection: AbapConnection | undefined; let crudClient: CrudClient | undefined; let crudClientConnection: AbapConnection | undefined; export function getReadOnlyClient(): ReadOnlyClient { const connection = getManagedConnection(); if (!readOnlyClient || readOnlyClientConnection !== connection) { readOnlyClient = new ReadOnlyClient(connection); readOnlyClientConnection = connection; } return readOnlyClient; } export function getCrudClient(): CrudClient { const connection = getManagedConnection(); if (!crudClient || crudClientConnection !== connection) { crudClient = new CrudClient(connection); crudClientConnection = connection; } return crudClient; } export function resetClientCache() { readOnlyClient = undefined; readOnlyClientConnection = undefined; crudClient = undefined; crudClientConnection = undefined; } registerConnectionResetHook(resetClientCache);

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/fr0ster/mcp-abap-adt'

If you have feedback or need assistance with the MCP directory API, please join our Discord server