Skip to main content
Glama
CloudWaddie

OSINT MCP Server

unshorten_url

Expand shortened URLs to reveal the original destination for security verification and OSINT research.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYesShortened URL to expand

Implementation Reference

  • The handler method in NetworkAdvClient that performs the actual unshortening by fetching the URL with manual redirect following.
    async unshorten(url: string): Promise<any> {
      try {
        const response = await fetch(url, { redirect: 'manual', method: 'HEAD' });
        const location = response.headers.get('location');
        return {
          shortUrl: url,
          destination: location || url,
          isRedirect: !!location,
          status: response.status
        };
      } catch (error) {
        throw new McpError(ErrorCode.InternalError, `Unshorten error: ${(error as Error).message}`);
      }
  • src/index.ts:686-694 (registration)
    Registration of the 'unshorten_url' tool, which validates input using Zod and calls the netAdvClient.unshorten handler.
    server.tool(
      "unshorten_url",
      { url: z.string().url().describe("Shortened URL to expand") },
      async ({ url }) => {
        const result = await netAdvClient.unshorten(url);
        return {
          content: [{ type: "text", text: JSON.stringify(result, null, 2) }],
        };
      }

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/CloudWaddie/osint-mcp'

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