How tinyfish-io/agentql-mcp works
Project Type & Purpose
• This is a Node.js/TypeScript-based MCP (Model Context Protocol) server. Its primary purpose is to act as an integration layer between AgentQL’s data extraction capabilities and various client applications (such as Claude, Cursor, and Windsurf). In short, it receives instructions via MCP (through command-line/stdio) and executes the "extract-web-data" tool to extract structured data from web pages.
File Structure Analysis
• The file tree shows a lightweight project setup:
• The “src” directory contains the main server code (“src/index.ts”), which likely initializes the MCP service and handles incoming requests.
• Configuration and project metadata are maintained in files like package.json, tsconfig.json, Dockerfile, and glama.json/smithery.yaml, hinting at environment configuration, build processes, and deployment scripts.
• GitHub workflows and configuration files are provided under the “.github” directory, indicating automated CI, code security scanning, publishing, and secrets protection.
• The inclusion of debugging instructions in the README and support scripts (like “npm run inspector”) point to a well-considered development and test workflow.
Key Components & Relationships
a. MCP Server Component:
• The core service implemented in “src/index.ts” that listens for incoming MCP requests.
• It handles incoming extraction commands, processes them (likely invoking "extract-web-data"), and returns results over stdio.
b. AgentQL Data Extraction Tool:
• Represents the integration of AgentQL’s extraction capabilities.
• This module abstracts the extraction logic triggered based on the provided ‘prompt’ and ‘url’ parameters.
c. Client/Integration Points:
• External tools such as Claude, Cursor, and Windsurf. Their configurations (as seen in the README) show they launch or integrate with the MCP server via command line (using npx) and environment variables.
• Each client sends task requests to the MCP server, and those requests are handled via a standardized MCP communication channel.
d. Debugging & Development Tools:
• The MCP Inspector, launched via “npm run inspector”, helps debug stdio communication and monitor the MCP server interactions.
• CI/CD pipelines illustrated by the various GitHub workflows (CI testing, security, vulnerability scanning, publishing) ensure code quality and secure deployment.
e. Deployment & Build Infrastructure:
• Dockerfile and Makefile points to containerization and build automation.
• Configuration files such as tsconfig.json and package.json represent development/linting settings and dependency management.