Skip to main content
Glama
adamanz

Apollo.io MCP Server

by adamanz

get_person_email

Retrieve email addresses for individuals using their Apollo.io person ID to facilitate direct communication and outreach.

Instructions

Get email address for a person using their Apollo ID

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
apollo_idYesApollo.io person ID

Implementation Reference

  • The `getPersonEmail` method that implements the core tool logic: fetches email addresses for a person using Apollo.io person ID via direct API call to add to prospects endpoint.
    async getPersonEmail(apolloId: string): Promise<any> { try { if (!apolloId) { throw new Error('Apollo ID is required'); } const baseUrl = `https://app.apollo.io/api/v1/mixed_people/add_to_my_prospects`; const payload = { entity_ids: [apolloId], analytics_context: 'Searcher: Individual Add Button', skip_fetching_people: true, cta_name: 'Access email', cacheKey: Date.now() }; const response = await axios.post(baseUrl, payload, { headers: { 'X-Api-Key': this.apiKey, 'Content-Type': 'application/json' } }); if (!response.data) { throw new Error('No data received from Apollo API'); } const emails = (response?.data?.contacts ?? []).map((item: any) => item.email); return emails; } catch (error: any) { console.error(`Error getting person email: ${error.message}`); return null; } }
  • Input schema definition for the 'get_person_email' tool, specifying required 'apollo_id' parameter.
    inputSchema: { type: 'object', properties: { apollo_id: { type: 'string', description: 'Apollo.io person ID' } }, required: ['apollo_id'] }
  • src/index.ts:186-199 (registration)
    Registration of the 'get_person_email' tool in the MCP server's listTools handler, including name, description, and schema.
    { name: 'get_person_email', description: 'Get email address for a person using their Apollo ID', inputSchema: { type: 'object', properties: { apollo_id: { type: 'string', description: 'Apollo.io person ID' } }, required: ['apollo_id'] } },
  • src/index.ts:282-289 (registration)
    Dispatch handler in MCP callToolRequest that invokes the ApolloClient.getPersonEmail method for 'get_person_email' tool.
    case 'get_person_email': { const result = await this.apollo.getPersonEmail(args.apollo_id as string); 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/adamanz/apollo-io-mcp-server'

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