# Consulta Única — Pipedream Connect

> Tus consultas gubernamentales, ¡fácil!

- API slug: `consulta_unica` (use in MCP headers and tool keys)
- Auth: API key (Pipedream-managed)
- Categories: Business Management
- Website: https://consultaunica.mx/
- This page (HTML): https://pipedream.com/apps/consulta-unica
- Tools: 3 actions · 0 triggers

## Connect via MCP (recommended)

- Endpoint: `https://remote.mcp.pipedream.net/v3`
- Headers: `Authorization: Bearer <token>` · `x-pd-project-id` · `x-pd-environment` · `x-pd-external-user-id` · `x-pd-app-slug: consulta_unica`

```ts
import { Client } from "@modelcontextprotocol/sdk/client/index.js"
import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js"
import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const accessToken = await pd.rawAccessToken

const transport = new StreamableHTTPClientTransport(
  new URL("https://remote.mcp.pipedream.net/v3"),
  {
    requestInit: {
      headers: {
        Authorization: `Bearer ${accessToken}`,
        "x-pd-project-id": process.env.PIPEDREAM_PROJECT_ID!,
        "x-pd-environment": "production",
        "x-pd-external-user-id": "{external_user_id}", // any stable ID for this user in your system
        "x-pd-app-slug": "consulta_unica",
      },
    },
  },
)

const mcp = new Client({ name: "my-agent", version: "1.0.0" })
await mcp.connect(transport)

const { tools } = await mcp.listTools()

// e.g. run Get Afore Details:
const result = await mcp.callTool({
  name: "consulta_unica-get-afore-details",
  arguments: {
    curp: "CURP",
  },
})
```

Docs: [MCP guide](https://pipedream.com/docs/connect/mcp/developers.md)

## SDK

```ts
import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const result = await pd.actions.run({
  id: "consulta_unica-get-afore-details",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    consulta_unica: { authProvisionId: "apn_xxxxxxx" },
    curp: "CURP",
  },
})
```

Docs: [Managed auth guide](https://pipedream.com/docs/connect/managed-auth/quickstart.md) · [Tools guide](https://pipedream.com/docs/connect/components.md)

## Actions (3)

### `consulta_unica-get-afore-details` — Get Afore Details (Read-only)

Retrieves pension fund (Afore) account details using a Mexican citizen's CURP identification number. Returns Afore provider, contact information, and account status. See the documentation

Full schema: https://pipedream.com/apps/consulta-unica/actions/get-afore-details.md

### `consulta_unica-lookup-phone-number` — Lookup Phone Number (Read-only)

Looks up information about a Mexican phone number using Ifetel database. Returns phone type (mobile/fixed), carrier, and registration details. See the documentation

Full schema: https://pipedream.com/apps/consulta-unica/actions/lookup-phone-number.md

### `consulta_unica-validate-rfc` — Validate RFC (Read-only)

Validates a Mexican Federal Taxpayer Registry (RFC) number. Returns the RFC and its validation status. See the documentation

Full schema: https://pipedream.com/apps/consulta-unica/actions/validate-rfc.md

---

- All apps: https://pipedream.com/apps — index: https://pipedream.com/llms.txt
- Pipedream docs for agents: https://pipedream.com/docs/llms.txt
