This project is a Model Context Protocol (MCP) Server for Metaso Search (秘塔搜索). It enables AI assistants (like Claude, Cursor) to perform real-time web searches, read web pages, and conduct intelligent Q&A using Metaso's API.
Key Technologies:
- Language: TypeScript
- Runtime: Node.js
- Framework:
@modelcontextprotocol/sdk - HTTP Client:
axios - Validation:
zod
The server exposes three main tools:
metaso_search: Multi-dimensional search (webpage, document, paper, image, video, podcast).metaso_reader: Reads and parses web page content (Markdown/JSON).metaso_chat: Intelligent Q&A using models likeds-r1(DeepSeek-R1),fast, andfast_thinking.
The entry point is src/index.ts, which sets up the MCP server, validates environment variables, and handles tool execution.
- Node.js (>=18.0.0)
- NPM
- Install Dependencies:
npm install - Build:
npm run build(Runstsc) - Development:
npm run dev(Runstsc --watch) - Start:
npm start(Runsnode dist/index.js) - Clean:
npm run clean
The server requires environment variables to function:
METASO_API_KEY: (Required) Your Metaso API Key.METASO_BASE_URL: (Optional) API base URL (default:https://metaso.cn/api/v1).METASO_DEFAULT_MODEL: (Optional) Default QA model (default:ds-r1).
- Code Style: TypeScript strict mode is likely enabled (inferred from standard MCP templates).
- Error Handling: Custom error handling for Axios requests and tool execution.
- Input Validation: Uses Zod schemas for all tool inputs and API responses.