ExMCP.SpecSync.FileMapper (ex_mcp v0.10.0)
View SourceMaps GitHub paths to local paths for MCP specification files.
Handles the conversion from the upstream repository structure (MDX files with JSX components) to clean local Markdown files.
Summary
Functions
Returns the list of known doc file paths to fetch for a given version.
Maps a GitHub doc path to its local equivalent.
Checks if a file path is an MDX file that should be converted.
Processes MDX content into clean Markdown.
Returns the list of schema file paths to fetch for a given version.
Functions
Returns the list of known doc file paths to fetch for a given version.
These are the standard documentation files present in most versions.
Maps a GitHub doc path to its local equivalent.
Examples
iex> FileMapper.github_to_local("docs/specification/2025-11-25/index.mdx")
"2025-11-25/Specification.md"
iex> FileMapper.github_to_local("docs/specification/2025-11-25/basic/lifecycle.mdx")
"2025-11-25/BaseProtocol/Lifecycle.md"
iex> FileMapper.github_to_local("schema/2025-11-25/schema.ts")
"2025-11-25/schema.ts"
Checks if a file path is an MDX file that should be converted.
Processes MDX content into clean Markdown.
Strips JSX components, import statements, and other MDX-specific syntax while preserving the documentation content.
Returns the list of schema file paths to fetch for a given version.