Skip to main content
Glama
zaidmukaddam

Scira AI MCP Server

by zaidmukaddam
people.ts1.63 kB
import { z } from "zod"; import { type InferSchema } from "xmcp"; import { headers } from "xmcp/headers"; export const schema = { query: z.string().describe("The query to search for"), }; export const metadata = { name: "people", description: "Search for people", annotations: { title: "Search for people", readOnlyHint: true, destructiveHint: false, idempotentHint: true, }, }; export default async function peopleSearch({ query }: InferSchema<typeof schema>) { const headerlist = headers(); const apiKey = headerlist["x-api-key"] || (headerlist["Authorization"] as string).replace("Bearer ", "") as string; const response = await fetch(`https://api.scira.ai/api/people`, { method: "POST", headers: { "Content-Type": "application/json", "x-api-key": apiKey as string, }, body: JSON.stringify({ query: query }) }) if (!response.ok) { return { content: [ { type: "text", text: "Error: " + response.statusText } ], }; } const data = await response.json(); console.log(data) if (data.error) { return { content: [ { type: "text", text: "Error: " + data.error } ], }; } const profile = data.profile.name + "\n" + data.profile.x + "\n" + data.profile.linkedin + "\n" + data.profile.github + "\n" + data.profile.website + "\n" + data.profile.bio return { content: [ { type: "text", text: profile } ], }; }

Latest Blog Posts

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/zaidmukaddam/scira-mcp'

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