Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/ReAPI-com/mcp-openapi
/ functions
Functions
78 in github.com/ReAPI-com/mcp-openapi
⨍
Functions
78
◇
Types & classes
40
↓ 15 callers
Method
loadSpec
* Load a single specification by ID
src/core/interfaces/ISpecService.ts:134
↓ 14 callers
Method
debug
(message: string, context?: LogContext)
src/core/Logger.ts:6
↓ 14 callers
Method
error
(message: string, context?: LogContext)
src/core/Logger.ts:12
↓ 11 callers
Method
info
(message: string, context?: LogContext)
src/core/Logger.ts:8
↓ 10 callers
Method
process
* Process an OpenAPI document by dereferencing and transforming it * @param spec The OpenAPI document to process * @returns A processed version
src/core/interfaces/ISpecProcessor.ts:25
↓ 7 callers
Method
initialize
* Initialize the spec explorer
src/core/interfaces/ISpecService.ts:144
↓ 6 callers
Method
findOperationByPathAndMethod
* Find an operation by path and method when operationId is not known
src/core/interfaces/ISpecService.ts:175
↓ 6 callers
Method
warn
(message: string, context?: LogContext)
src/core/Logger.ts:10
↓ 5 callers
Function
createTestConfig
(basePath: string)
src/core/__tests__/SpecPersister.test.ts:17
↓ 5 callers
Method
findOperationById
* Find an operation by its ID within a specification
src/core/interfaces/ISpecService.ts:167
↓ 5 callers
Method
findSchemaByName
* Find a schema by name within a specification
src/core/interfaces/ISpecService.ts:159
↓ 5 callers
Method
loadSpecCatalog
* Load the catalog of specifications
src/core/interfaces/ISpecService.ts:124
↓ 5 callers
Method
saveSpec
* Persist a single specification
src/core/interfaces/ISpecService.ts:129
↓ 5 callers
Method
searchOperations
* Search for operations across specifications
src/core/interfaces/ISpecService.ts:184
↓ 4 callers
Method
ensureDirectory
(dir: string)
src/core/SpecService.ts:80
↓ 4 callers
Method
log
(level: string, messageOrContext: string | LogContext, contextOrMessage?: LogContext | string)
src/core/Logger.ts:24
↓ 4 callers
Method
processSchema
* Processes a schema object, merging allOf if present * @param schema The schema to process * @returns The processed schema
src/core/SpecProcessor.ts:121
↓ 4 callers
Method
searchSchemas
* Search for schemas across specifications
src/core/interfaces/ISpecService.ts:192
↓ 3 callers
Method
set
(key: K, value: V)
src/core/Cache.ts:53
↓ 2 callers
Method
clear
()
src/core/Cache.ts:79
↓ 2 callers
Method
createServer
()
src/McpService.ts:34
↓ 2 callers
Method
ensureDirectories
()
src/core/SpecService.ts:92
↓ 2 callers
Method
isSchemaObject
* Type guard to check if a schema is a SchemaObject (not a ReferenceObject)
src/core/SpecProcessor.ts:211
↓ 2 callers
Method
mergeSchemas
* Merges multiple schemas into one * @param schemas The schemas to merge * @returns The merged schema
src/core/SpecProcessor.ts:165
↓ 2 callers
Method
resetState
()
src/core/SpecService.ts:101
↓ 2 callers
Method
scan
* Scan a folder for OpenAPI specs and yield them one at a time * This allows for memory-efficient processing of large specs * @param folderPath
src/core/interfaces/ISpecScanner.ts:52
↓ 2 callers
Method
scanAndSave
* Scan a directory and persist found specifications
src/core/interfaces/ISpecService.ts:114
↓ 1 callers
Method
cleanup
()
src/core/Cache.ts:44
↓ 1 callers
Function
createTestConfig
(basePath: string)
src/core/__tests__/SpecExplorer.test.ts:14
↓ 1 callers
Method
extractSpecId
* Extracts the spec ID from the spec object * @param spec - The parsed spec object * @param defaultId - Default ID to use if none is found in th
src/core/SpecScanner.ts:228
↓ 1 callers
Method
get
(key: K)
src/core/Cache.ts:66
↓ 1 callers
Method
getApiCatalog
* List all specifications in the catalog
src/core/interfaces/ISpecService.ts:154
↓ 1 callers
Method
getFileType
* Determines the file type based on the file extension * @param filePath - Path to the file * @returns The detected file type
src/core/SpecScanner.ts:127
↓ 1 callers
Method
initialize
()
src/core/SpecService.ts:129
↓ 1 callers
Method
initializeExplorer
()
src/McpService.ts:23
↓ 1 callers
Method
isValidSpecObject
* Validates that the parsed object has the basic structure of an OpenAPI spec * @param spec - The parsed spec object * @returns true if the spec
src/core/SpecScanner.ts:212
↓ 1 callers
Method
loadExistingCatalog
()
src/core/SpecService.ts:108
↓ 1 callers
Method
loadSpec
(specId: string)
src/core/SpecService.ts:286
↓ 1 callers
Method
loadSpecCatalog
()
src/core/SpecService.ts:273
↓ 1 callers
Function
main
()
src/cli.ts:46
↓ 1 callers
Method
mergeAllOfSchemas
* Recursively traverses the OpenAPI spec and merges any allOf schemas found * @param spec The OpenAPI specification to process * @returns The pr
src/core/SpecProcessor.ts:36
↓ 1 callers
Method
parseSpec
* Parses the spec content based on the file type and converts Swagger 2.0 to OpenAPI 3.0 if needed * @param content - Raw file content * @param
src/core/SpecScanner.ts:144
↓ 1 callers
Method
processFile
* Processes a single OpenAPI specification file * @param folderPath - Path to the directory containing the file * @param filename - Name of the
src/core/SpecScanner.ts:82
↓ 1 callers
Method
processPathItem
* Processes a path item object, handling all nested schemas * @param pathItem The path item to process
src/core/SpecProcessor.ts:63
↓ 1 callers
Method
refresh
* Refresh the spec explorer
src/core/interfaces/ISpecService.ts:149
↓ 1 callers
Method
saveSpec
(spec: OpenAPIV3.Document, specId: string)
src/core/SpecService.ts:246
↓ 1 callers
Method
saveSpecCatalog
(catalog: SpecCatalogEntry[])
src/core/SpecService.ts:265
↓ 1 callers
Method
saveSpecCatalog
* Persist the catalog of specifications
src/core/interfaces/ISpecService.ts:119
↓ 1 callers
Method
scanAndSave
(folderPath: string)
src/core/SpecService.ts:150
↓ 1 callers
Method
setUpTools
(server: McpServer)
src/McpService.ts:47
↓ 1 callers
Method
startCleanupTimer
()
src/core/Cache.ts:28
↓ 1 callers
Method
stopCleanupTimer
()
src/core/Cache.ts:37
Method
constructor
( private readonly specExplorer: ISpecExplorer, logger?: Logger )
src/McpService.ts:12
Method
constructor
( message: string, public readonly code: | "INIT_ERROR" | "PERSIST_ERROR" | "LOAD_ER
src/core/SpecService.ts:25
Method
constructor
( private readonly scanner: ISpecScanner, config: SpecServiceConfig, logger?: Logger )
src/core/SpecService.ts:49
Method
constructor
(options: CacheOptions = {})
src/core/Cache.ts:19
Method
constructor
()
src/core/Logger.ts:19
Method
constructor
( message: string, public readonly filename: string, public readonly cause?: Error )
src/core/SpecScanner.ts:17
Method
constructor
(private readonly specProcessor: ISpecProcessor)
src/core/SpecScanner.ts:33
Method
debug
(messageOrContext: string | LogContext, contextOrMessage?: LogContext | string)
src/core/Logger.ts:46
Method
destroy
()
src/core/Cache.ts:83
Method
error
(messageOrContext: string | LogContext, contextOrMessage?: LogContext | string)
src/core/Logger.ts:58
Method
findOperationById
( specId: string, operationId: string )
src/core/SpecService.ts:439
Method
findOperationByPathAndMethod
( specId: string, path: string, method: string )
src/core/SpecService.ts:465
Method
findSchemaByName
( specId: string, schemaName: string )
src/core/SpecService.ts:417
Method
getApiCatalog
()
src/core/SpecService.ts:242
Method
info
(messageOrContext: string | LogContext, contextOrMessage?: LogContext | string)
src/core/Logger.ts:50
Method
process
(spec: OpenAPIV3.Document)
src/core/SpecProcessor.ts:21
Method
refresh
()
src/core/SpecService.ts:321
Method
scan
* Scans a directory for OpenAPI specification files and yields processed results * @param folderPath - Path to the directory containing OpenAPI spe
src/core/SpecScanner.ts:40
Method
searchOperations
( query: string, specId?: string )
src/core/SpecService.ts:328
Method
searchSchemas
( query: string, specId?: string )
src/core/SpecService.ts:383
Method
serializeOperation
* Serialize an operation result to string
src/core/interfaces/ISpecService.ts:202
Method
serializeSchema
* Serialize a schema result to string
src/core/interfaces/ISpecService.ts:207
Method
setUpPrompts
(server: McpServer)
src/McpService.ts:250
Method
setUpResources
(server: McpServer)
src/McpService.ts:332
Method
sync
* Synchronize specifications from sources to target directory * @param config Configuration for the sync operation * @returns Array of results f
src/core/interfaces/ISyncManager.ts:53
Method
warn
(messageOrContext: string | LogContext, contextOrMessage?: LogContext | string)
src/core/Logger.ts:54