username_search
Search for a username across multiple online platforms to identify associated accounts and digital footprints for security research and OSINT investigations.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| username | Yes | Username to search for across platforms |
Implementation Reference
- src/tools/usernames.ts:35-76 (handler)The search() method in UsernameSearchClient executes parallel checks against a list of social media platforms to see if a username exists.
async search(username: string): Promise<any[]> { const results: any[] = []; const timeout = 5000; // Run searches in parallel with a concurrency limit const checkPlatform = async (platform: any) => { const url = platform.url.replace("{}", username); try { const controller = new AbortController(); const id = setTimeout(() => controller.abort(), timeout); const response = await fetch(url, { method: "GET", signal: controller.signal, headers: { "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36" } }); clearTimeout(id); if (response.status === 200) { results.push({ platform: platform.name, url: url, status: "found" }); } } catch (error) { // Ignore errors, just means it's likely not found or blocked } }; // Parallel execution with small batches to avoid being blocked const batchSize = 5; for (let i = 0; i < PLATFORMS.length; i += batchSize) { const batch = PLATFORMS.slice(i, i + batchSize); await Promise.all(batch.map(p => checkPlatform(p))); } return results; } - src/index.ts:401-410 (registration)The "username_search" tool is registered here, delegating the execution to the UsernameSearchClient.search method.
server.tool( "username_search", { username: z.string().describe("Username to search for across platforms") }, async ({ username }) => { const result = await userClient.search(username); return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }], }; } );