metaso-api-integration

metaso-api-integration is a cursor rule for Cursor from SecretRichGarden/metasota-API-MCP. It costs 12 tokens per session (987 once invoked), scanned A, original, Apache-2.0.

Coding rules for connecting an application to the Metaso Search API, a web service for searching and reading online material.

In plain words
What is it for?
Use them to implement search, webpage reading, and chat-completion requests, including searches scoped to webpages, papers, images, videos, or podcasts.
Why use it?
They define the required authentication, request format, time limits, endpoints, and response formats needed for consistent integrations.

Cursor rule for Cursor

Written for Cursor: installed under .cursor/.

Good fit Use them to implement search, webpage reading, and chat-completion requests, including searches scoped to webpages, papers, images, videos, or podcasts.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/secretrichgarden/metasota-api-mcp/metaso-api-integration
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/SecretRichGarden/metasota-API-MCP

Made for: Cursor.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for metaso-api-integration

README.md
[![agentmods](https://agentmods.dev/badge/rules/secretrichgarden/metasota-api-mcp/metaso-api-integration/github.svg)](https://agentmods.dev/rules/secretrichgarden/metasota-api-mcp/metaso-api-integration)
Your own site
<a href="https://agentmods.dev/rules/secretrichgarden/metasota-api-mcp/metaso-api-integration"><img src="https://agentmods.dev/badge/rules/secretrichgarden/metasota-api-mcp/metaso-api-integration/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for metaso-api-integration

Your own site · 80×15
<a href="https://agentmods.dev/rules/secretrichgarden/metasota-api-mcp/metaso-api-integration"><img src="https://agentmods.dev/badge/rules/secretrichgarden/metasota-api-mcp/metaso-api-integration.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 12 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 987 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00012 $0.00987
Opus 5 $0.00006 $0.00494
Sonnet 5 $0.00002 $0.00197
Haiku 4.5 $0.00001 $0.00099

Measured 9d ago against content hash f1b920cb5f71, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

metaso-api-integration scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

- Use `axios.create()` to configure a reusable instance with base headers
.cursor/rules/metaso-api-integration.mdc · 120 lines

How it starts

The opening of the file, as written. The whole thing — 120 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Metaso API Integration

API Configuration

  • Base URL: https://metaso.cn/api/v1
  • Authentication: Bearer token via Authorization: Bearer ${API_KEY} header
  • API Key: Must be provided via METASO_API_KEY environment variable
  • Timeout: 30 seconds (30000ms) for all API requests
  • Use axios.create() to configure a reusable instance with base headers

API Endpoints

Search Endpoint

  • Path: /search
  • Method: POST
  • Required Parameters:
    • q (string): Search query keywords
  • Optional Parameters:
    • scope (string): Search scope - webpage, document, paper, image, video, podcast
    • includeSummary (boolean): Enable summary-based recall enhancement
    • includeRawContent (boolean): Fetch original webpage content
    • size (number): Number of results to return (default: 10)
    • conciseSnippet (boolean): Return concise original text snippets

Reader Endpoint

  • Path: /reader
  • Method: POST
  • Required Parameters:
    • url (string): URL to read
  • Response Format: Controlled by Accept header
    • Accept: text/plain → Returns Markdown
    • Accept: application/json → Returns JSON

Chat Completions Endpoint

  • Path: /chat/completions
  • Method: POST
  • Models: ds-r1 (deepseekr1), fast, fast_thinking
  • Supports: Streaming responses (stream: true)
  • Scopes: document, scholar, video, podcast (for RAG-based Q&A)

Response Schema Validation

  • Always validate API responses using Zod schemas
  • Expected response structure:
{
  code: number,  // 0 indicates success
  data: {
    results: Array<{
      title: string,
      url: string,
      content?: string,
      rawContent?: string
    }>,
    summary?: string
  }
}
  • Check code !== 0 and throw appropriate errors
  • Handle optional fields gracefully (use .optional() in Zod schemas)

Error Handling Patterns

  • Catch AxiosError specifically to extract HTTP status and response data
  • Provide meaningful error messages: API请求失败: ${status} - ${message}
  • Always validate response schema before processing data
  • Log detailed errors to stderr for debugging
  • Return user-friendly error messages in MCP tool responses

Read the full file on GitHub · 120 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 9d ago First seen · 120 lines · 12 tokens per session scan A f1b920cb5f71

Subscribe to this mod's changes

metaso-api-integration is a cursor rule published in the GitHub repository SecretRichGarden/metasota-API-MCP (2 stars, last pushed 6mo ago), licensed Apache-2.0. It adds 12 tokens to every session and 987 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.