xbox_lookup
Retrieve Xbox user information by entering a Gamertag to support OSINT investigations and security research.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| gamertag | Yes | Xbox Gamertag to lookup |
Implementation Reference
- src/tools/gaming.ts:41-53 (handler)The handler function 'xboxLookup' that performs the API call to OpenXBL.
async xboxLookup(gt: string): Promise<any> { const apiKey = process.env.OPENXBL_API_KEY; if (!apiKey) throw new McpError(ErrorCode.InvalidRequest, "OPENXBL_API_KEY is not configured"); try { const response = await fetch(`https://xbl.io/api/v2/search/${encodeURIComponent(gt)}`, { headers: { "X-Authorization": apiKey } }); return await response.json(); } catch (error) { throw new McpError(ErrorCode.InternalError, `Xbox Lookup error: ${(error as Error).message}`); } } - src/index.ts:629-638 (registration)Registration of the 'xbox_lookup' tool in the MCP server.
server.tool( "xbox_lookup", { gamertag: z.string().describe("Xbox Gamertag to lookup") }, async ({ gamertag }) => { const result = await gamingClient.xboxLookup(gamertag); return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }], }; } );