Skip to main content
Glama

Jina Free MCP

by ubuygold
index.test.ts950 B
import { test, expect } from "bun:test"; import { readWebpageContent } from "./index"; // Test case for a successful fetch. We use a stable and simple page. // We increase the timeout because network requests can be slow. test("should read content from a valid URL", async () => { const content = await readWebpageContent("https://example.com"); expect(content).toBeString(); // Jina reader API returns plain text. Let's check for a known string. expect(content).toContain("Example Domain"); }, 20000); // 20-second timeout for the network request // Test case for a URL that results in a fetch error (e.g., 404) test("should throw an error for a non-existent page", async () => { // This URL is syntactically valid but points to nothing. // Jina's service should return an error. const promise = readWebpageContent("https://domain.invalid/"); await expect(promise).rejects.toThrow(); }, 20000); // Also give this a longer timeout

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/ubuygold/jina-free-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server