SearchMCP Client SDKs
The official JavaScript/TypeScript SDK makes it simple to integrate SearchMCP into your Node.js apps, agents, and backends. It’s lightweight, type-safe, and generated directly from the OpenAPI spec .
👉 Repo: searchmcp/searchmcp-js
Installation
pnpm add @searchmcp/client
# or
npm install @searchmcp/client
# or
yarn add @searchmcp/client
Requires Node.js 18+ (for native fetch
).
Usage
import { createClient } from "@searchmcp/client";
// Initialize with your API key
const client = createClient(process.env.SEARCHMCP_API_KEY!);
// Run a web search
const res = await client.search({
query: "latest GPU deals",
country: "US",
numberOfResults: 5,
});
console.log(res.status); // "SUCCESS"
console.log(res.results); // array of results
Advanced Options
The createClient
function accepts an optional basePath
argument if you want to target a custom endpoint:
const client = createClient(process.env.SEARCHMCP_API_KEY!, "https://api.searchmcp.io");
Roadmap
- ✅ JavaScript/TypeScript SDK
- ⏳ Python SDK (coming soon)
- ⏳ Other languages (community contributions welcome!)
Generate Your Own SDKs
Because SearchMCP publishes a full OpenAPI spec, you can easily generate SDKs in other languages.
- OpenAPI spec: searchmcp.io/openapi.json
- OpenAPI Generator: github.com/OpenAPITools/openapi-generator
Example:
openapi-generator-cli generate \
-i https://searchmcp.io/openapi.json \
-g python \
-o ./searchmcp-python
Next Steps
- 🔑 Get an API key: /dashboard/keys
- 📖 Explore the API Reference for schemas & endpoints
- 💻 Check out the SDK repo: searchmcp/searchmcp-js
Last updated on