Serveur MCP

TweekIT MCP Server

io.github.equilibrium-team/tweekit
Outils développeur Médias et contenu Public et accessible MCP 2025-11-25

Ce que fait ce MCP

Fetches web resources, searches the web, identifies document types, and converts uploaded or remote files across many formats.

convert
Convert an uploaded document payload with TweekIT. The file must already be base64 encoded (see `blob`). The conversion can be resized and cropped by providing optional geometry parameters. For raster outputs, set `alpha`/`bgColor` to control transparency handling. Args: inext: Source file extension such as `pdf`, `docx`, or `png`. outfmt: Desired output format (`Fmt` in the API body). blob: Base64 encoded document payload (`DocData`). apiKey: TweekIT API key (`ApiKey` header). Falls back to `TWEEKIT_API_KEY` env var. apiSecret: TweekIT API secret (`ApiSecret` header). Falls back to `TWEEKIT_API_SECRET` env var. noRasterize: Forwarded to TweekIT to skip rasterization when possible. width: Optional pixel width to request in the output. height: Optional pixel height to request in the output. x1: Left crop coordinate in source pixels. y1: Top crop coordinate in source pixels. x2: Right crop coordinate in source pixels. y2: Bottom crop coordinate in source pixels. page: Page number to extract for multipage inputs. alpha: Whether the output should preserve alpha transparency. bgColor: Background color to composite behind transparent pixels. Returns: A FastMCP `Image` or `File` payload, or an error description.
Schéma d’entrée
{'type': 'object', 'required': ['inext', 'outfmt', 'blob'], 'properties': {'x1': {'type': 'integer', 'default': 0, 'description': 'Left crop coordinate in source pixels.'}, 'x2': {'type': 'integer', 'default': 0, 'description': 'Right crop coordinate in source pixels.'}, 'y1': {'type': 'integer', 'default': 0, 'description': 'Top crop coordinate in source pixels.'}, 'y2': {'type': 'integer', 'default': 0, 'description': 'Bottom crop coordinate in source pixels.'}, 'blob': {'type': 'string', 'description': 'Base64 encoded document payload (DocData).'}, 'page': {'type': 'integer', 'default': 1, 'description': 'Page number to convert for multi-page inputs.'}, 'alpha': {'type': 'boolean', 'default': True, 'description': 'Preserve alpha transparency when producing raster formats.'}, 'inext': {'type': 'string', 'description': 'Input file extension (e.g., pdf, docx, png).'}, 'width': {'type': 'integer', 'default': 0, 'description': 'Optional pixel width for the converted output.'}, 'apiKey': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'default': None, 'description': 'TweekIT API key passed via the ApiKey header. Defaults to the TWEEKIT_API_KEY environment variable when omitted.'}, 'height': {'type': 'integer', 'default': 0, 'description': 'Optional pixel height for the converted output.'}, 'outfmt': {'type': 'string', 'description': 'Requested output format to send as Fmt.'}, 'bgColor': {'type': 'string', 'default': '', 'description': 'Background color (hex RGB) to composite behind transparent pixels.'}, 'apiSecret': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'default': None, 'description': 'TweekIT API secret paired with the apiKey. Defaults to the TWEEKIT_API_SECRET environment variable when omitted.'}, 'noRasterize': {'type': 'boolean', 'default': False, 'description': 'Forward to TweekIT to disable rasterization when supported.'}}}
convert_url
Download a remote file and convert it with TweekIT in one step. This helper first fetches `url`, infers the input extension when possible, and then forwards the bytes to `convert`. Supply `fetchHeaders` when the remote resource needs authentication or custom headers. Args: url: Direct download URL for the source document or image. outfmt: Desired output format (`Fmt`). apiKey: TweekIT API key (`ApiKey` header). Falls back to `TWEEKIT_API_KEY` env var. apiSecret: TweekIT API secret (`ApiSecret` header). Falls back to `TWEEKIT_API_SECRET` env var. inext: Optional override for the source extension if it cannot be detected from the URL or response headers. noRasterize: Forwarded to TweekIT to skip rasterization when possible. width: Optional pixel width to request in the output. height: Optional pixel height to request in the output. x1: Left crop coordinate in source pixels. y1: Top crop coordinate in source pixels. x2: Right crop coordinate in source pixels. y2: Bottom crop coordinate in source pixels. page: Page number to extract for multipage inputs. alpha: Whether the output should preserve alpha transparency. bgColor: Background color to composite behind transparent pixels. fetchHeaders: Optional mapping of HTTP headers to include when fetching. Returns: A FastMCP `Image` or `File` payload, or an error description.
Schéma d’entrée
{'type': 'object', 'required': ['url', 'outfmt'], 'properties': {'x1': {'type': 'integer', 'default': 0, 'description': 'Left crop coordinate in source pixels.'}, 'x2': {'type': 'integer', 'default': 0, 'description': 'Right crop coordinate in source pixels.'}, 'y1': {'type': 'integer', 'default': 0, 'description': 'Top crop coordinate in source pixels.'}, 'y2': {'type': 'integer', 'default': 0, 'description': 'Bottom crop coordinate in source pixels.'}, 'url': {'type': 'string', 'description': 'Direct download URL for the source document or image.'}, 'page': {'type': 'integer', 'default': 1, 'description': 'Page number to convert for multi-page inputs.'}, 'alpha': {'type': 'boolean', 'default': True, 'description': 'Preserve alpha transparency when producing raster formats.'}, 'inext': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'default': None, 'description': 'Override for the detected input extension (e.g., pdf).'}, 'width': {'type': 'integer', 'default': 0, 'description': 'Optional pixel width for the converted output.'}, 'apiKey': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'default': None, 'description': 'TweekIT API key passed via the ApiKey header. Defaults to the TWEEKIT_API_KEY environment variable when omitted.'}, 'height': {'type': 'integer', 'default': 0, 'description': 'Optional pixel height for the converted output.'}, 'outfmt': {'type': 'string', 'description': 'Requested output format to send as Fmt.'}, 'bgColor': {'type': 'string', 'default': '', 'description': 'Background color (hex RGB) to composite behind transparent pixels.'}, 'apiSecret': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'default': None, 'description': 'TweekIT API secret paired with the apiKey. Defaults to the TWEEKIT_API_SECRET environment variable when omitted.'}, 'noRasterize': {'type': 'boolean', 'default': False, 'description': 'Forward to TweekIT to disable rasterization when supported.'}, 'fetchHeaders': {'anyOf': [{'type': 'object', 'additionalProperties': {'type': 'string'}}, {'type': 'null'}], 'default': None, 'description': 'Optional HTTP headers to include when downloading the URL.'}}}
doctype
Retrieve a list of supported file formats or map a file extension to its document type. Args: apiKey (str): The API key for authentication. Falls back to TWEEKIT_API_KEY when omitted. apiSecret (str): The API secret for authentication. Falls back to TWEEKIT_API_SECRET when omitted. extension (str): The file extension to query (e.g., 'jpg', 'pdf') or leave off or use '*' to return all supported input formats. Returns: Dict[str, Any]: A dictionary containing the supported file formats or an error message.
Schéma d’entrée
{'type': 'object', 'properties': {'apiKey': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'default': None, 'description': 'TweekIT API key passed via the ApiKey header. Defaults to the TWEEKIT_API_KEY environment variable when omitted.'}, 'apiSecret': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'default': None, 'description': 'TweekIT API secret paired with the apiKey. Defaults to the TWEEKIT_API_SECRET environment variable when omitted.'}, 'extension': {'type': 'string', 'default': '*', 'description': "File extension to inspect; use '*' to list all supported inputs."}}}
Schéma de sortie
{'type': 'object', 'additionalProperties': True}
fetch
Fetch a URL and return content. - Images return as FastMCP Image. - PDFs return as File(format="pdf"). - Text/JSON return as a JSON payload with metadata and text.
Schéma d’entrée
{'type': 'object', 'required': ['url'], 'properties': {'url': {'type': 'string', 'description': 'HTTP or HTTPS URL to retrieve and normalize.'}}}
search
Simple web search using DuckDuckGo HTML endpoint. Returns a list of {title, url, snippet} objects. Best‑effort parsing.
Schéma d’entrée
{'type': 'object', 'required': ['query'], 'properties': {'query': {'type': 'string', 'description': 'Search keywords to send to DuckDuckGo.'}, 'max_results': {'type': 'integer', 'default': 5, 'description': 'Maximum number of results to return (1-10).'}}}
Schéma de sortie
{'type': 'object', 'additionalProperties': True}
Ajouté
search
17 September 2026 12:41
Ajouté
fetch
17 September 2026 12:41
Ajouté
convert_url
17 September 2026 12:41
Ajouté
convert
17 September 2026 12:41
Ajouté
doctype
17 September 2026 12:41