keybase_lookup
Look up Keybase usernames to verify identities and gather open-source intelligence for security research and data analysis.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| username | Yes | Keybase username to lookup |
Implementation Reference
- src/tools/keybase.ts:12-47 (handler)The lookup method in KeybaseApiClient handles the logic for querying the Keybase API and formatting the response.
async lookup(username: string): Promise<any> { try { const data = await this.fetch<any>("", { method: "GET", }, { usernames: username, }); if (data.status.code !== 0 || !data.them?.[0]) { return { found: false, message: "User not found" }; } const user = data.them[0]; const proofs = user.proofs_summary?.all || []; const linkedAccounts = proofs.map((p: any) => ({ type: p.proof_type, username: p.nametag, url: p.service_url, state: p.state })); return { found: true, id: user.id, username: user.basics?.username, fullName: user.profile?.full_name, location: user.profile?.location, bio: user.profile?.bio, linkedAccounts: linkedAccounts, publicKeys: user.public_keys }; } catch (error) { if (error instanceof McpError) throw error; throw new McpError(ErrorCode.InternalError, `Keybase error: ${(error as Error).message}`); } } - src/index.ts:463-470 (registration)Registration of the keybase_lookup tool in the main server file, which calls the KeybaseApiClient.lookup method.
server.tool( "keybase_lookup", { username: z.string().describe("Keybase username to lookup") }, async ({ username }) => { const result = await keybaseClient.lookup(username); return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }], };