Skip to main content

Overview

AgentSource MCP (Model Context Protocol) provides a standardized way to access Explorium’s comprehensive business and contact data. Whether you’re building AI agents, data pipelines, or custom applications, we offer multiple implementation paths to suit your needs.

Available Implementation Methods

OpenAI Integration

Best for: AI-powered applications and conversational agents Build intelligent agents that can automatically discover and use AgentSource tools through OpenAI’s API. Key Features:
  • Automatic tool discovery
  • Natural language queries
  • Built-in response formatting
  • Minimal setup required
Use Cases:
  • Customer service chatbots
  • Sales intelligence assistants
  • Automated research agents
  • Interactive data exploration

Get Started with OpenAI

Python SDK

Best for: Direct programmatic access and custom applications Native Python implementation for developers who need fine-grained control over data access and processing. Key Features:
  • Asynchronous operations
  • Full control over tool execution
  • Ideal for data pipelines
  • Comprehensive error handling
Use Cases:
  • Data enrichment pipelines
  • Batch processing systems
  • Custom analytics tools
  • Integration with existing Python applications

Get Started with Python SDK

LangGraph Integration

Best for: Complex AI workflows and multi-step processes Build sophisticated AI agents with state management and complex decision trees using LangGraph. Key Features:
  • Stateful conversations
  • Multi-step workflows
  • Conditional logic
  • Tool chaining

Get Started with LangGraph

Quick Comparison

Getting Started

Prerequisites

Before implementing AgentSource MCP, ensure you have:
  1. AgentSource API Key - Get your API key
  2. Development Environment - Python 3.8+ recommended
  3. Basic Understanding - Familiarity with REST APIs and async programming

Core Concepts

What is MCP?

Model Context Protocol (MCP) is a standardized protocol that enables AI models and applications to discover and use tools dynamically. With AgentSource MCP, you get:
  • Dynamic Tool Discovery - Tools are discovered at runtime, not hardcoded
  • Standardized Interface - Consistent API across all tools
  • Type Safety - Structured inputs and outputs
  • Streaming Support - Real-time data updates via SSE

Available Tool Categories

Business Intelligence
  • Company search and matching
  • Firmographic enrichment
  • Technology stack analysis
  • Financial metrics (public companies)
  • Competitive landscape insights
Contact Discovery
  • Employee search by role/department
  • Contact information enrichment
  • Professional profile data
  • Work history and experience
  • Social media activity
Market Intelligence
  • Industry trends and statistics
  • Company events and news
  • Website changes monitoring
  • Workforce trend analysis
  • Funding and acquisition data

Common Use Cases

Sales Intelligence

Find prospects at target companies, enrich contact information, and track company events:
  • Identify decision makers at target accounts
  • Get verified email addresses and phone numbers
  • Monitor job changes and company updates
  • Analyze technology stack for better positioning

Market Research

Analyze industries, competitors, and market trends:
  • Company segmentation by size, revenue, location
  • Technology adoption trends
  • Competitive landscape analysis
  • Industry-specific insights

Lead Enrichment

Enhance your CRM data with comprehensive business and contact information:
  • Bulk company matching and enrichment
  • Contact verification and updates
  • Organizational structure mapping
  • Technographic segmentation

Due Diligence

Comprehensive company analysis for investment or partnership decisions:
  • Financial metrics and performance
  • Leadership and organizational changes
  • Technology infrastructure
  • Growth indicators and challenges

Best Practices for Integrating AgentSource MCP

Here are some recommendations for optimal integration of Explorium’s AgentSource MCP server into your AI agent application. Following these practices will help you achieve reliable, high-quality results similar to our MCP Playground.

System Prompt Guidelines

Core Principles Effective MCP performance is highly dependent on your system prompt. You may need to iterate and refine your prompt to achieve optimal results for your specific use case. Reference System Prompt Below is the system prompt used in Explorium’s MCP Playground. This can serve as a baseline for your implementation:
Customization Tips When adapting this system prompt for your application:
  • Replace the date placeholder: Update {currentDateTime} with your actual date/time variable or remove if not needed
  • Adjust the identity: Modify “The assistant is AgentSource” to match your agent’s branding
  • Tailor the workflow: Add or modify workflow steps based on your specific use case
  • Customize response style: Adapt formatting and verbosity requirements to match your application’s UX
  • Add domain-specific instructions: Include any industry or use-case specific guidance relevant to your users

Model Selection

Recommended Models We highly recommend using Claude Sonnet models for optimal performance:
  • Claude 4.6 Sonnet (primary recommendation)
Alternative Models If you need to use alternative models, the following have been tested:
  • OpenAI GPT-5.4
  • OpenAI GPT-5
Note: Results may vary with non-Claude models. We recommend thorough testing if using alternatives.

Model Parameters

Temperature Settings Critical: Use a low temperature setting to ensure reliable MCP tool usage.
  • Recommended range: 0.0 - 0.1
  • Explorium uses: 0.05
  • Why this matters: Higher temperature values may cause the agent to query MCP tools incorrectly or inconsistently

Other Parameters

Consider these additional parameter recommendations:
  • Max tokens: Set appropriately for your use case - we recommend not limiting the number of tokens.
  • Top-p: If used, keep at 0.9 or lower for consistent behavior

Prompt Engineering Best Practices

Tool Calling Instructions

  1. Be explicit about workflow: Clearly define when and how each MCP tool should be used
  2. Handle errors gracefully: Provide clear instructions on error handling and fallback behavior

Response Formatting

  1. Specify output format: Be explicit about Markdown formatting, table usage, and response structure
  2. User experience: Include guidelines on when to wait for user input vs. proceeding automatically

Testing and Iteration

Validation Steps
  1. Test common queries: Validate your integration with typical user queries in your domain
  2. Edge case testing: Test with complex, multi-filter queries
  3. Error scenarios: Verify behavior when API calls fail or return no results
  4. Consistency checks: Run the same query multiple times to ensure consistent behavior
Performance Optimization
  1. Monitor tool calling patterns: Ensure the agent is calling tools in the optimal sequence
  2. Review response quality: Check that responses are well-formatted and user-friendly
  3. Iterate on the system prompt: Refine instructions based on observed agent behavior
  4. A/B test variations: Try different prompt formulations to find what works best for your use case

Common Pitfalls to Avoid

  • ❌ Using high temperature settings (> 0.1)
  • ❌ Exposing internal function names in user-facing responses
  • ❌ Insufficient error handling instructions
  • ❌ Vague or ambiguous workflow instructions

Troubleshooting: tool-call loops (“safety limit” / “recursion limit” errors)

Symptom

Your agent intermittently stops with an error like MCP tool loop hit safety limit, recursion limit reached, or max turns exceeded. The same query sometimes succeeds and sometimes fails.

What’s actually happening

This is not an Explorium error. The Explorium API only returns standard HTTP status codes (see Error Handling). Messages about a “loop”, “safety limit”, “recursion limit”, or “max turns” come from your agent framework, which caps how many tool calls the model may make in a single turn:
  • LangGraph / LangChain → recursion_limit
  • OpenAI Agents SDK → max_turns
  • Custom loops → your own iteration counter
The cap is doing its job — it stops a model that kept calling tools without producing a final answer. The real question is why the model kept calling tools.

Common causes

  1. An intent/interest constraint is treated as an industry. Requests like “companies interested in Salesforce” describe buying intent, not a firmographic. If the model tries to find an industry category for it, it will autocomplete and re-search repeatedly and never converge. Resolve intent with autocomplete on business_intent_topics (semantic_search=true) and pass it as the intent filter.
  2. Industry taxonomy thrash. Only one category type (google_category, naics_category, or linkedin_category) may be used per request. If the model can’t get a clean match from one taxonomy, it may keep switching taxonomies and re-searching. Pin the workflow to a single category type.
  3. Empty enrichment fields misread as failure. fetch-businesses and fetch-prospects return minimal data by design — fields like revenue, employee range, and description are empty until you call enrich-business / enrich-prospects. If your prompt doesn’t make the fetch→enrich split explicit, the model may read the sparse result as a failed search and re-query.
  4. No “stop” condition on empty results. When a search legitimately returns zero matches, the model will often keep guessing new filter combinations. Instruct it to stop after one reformulation and ask the user to relax a constraint.
  5. An outdated or mismatched system prompt. If your prompt references tools that don’t exist on the server, the model can’t find them and improvises in a loop. Make sure your prompt’s tool names match the tools the MCP server actually exposes (autocomplete, fetch-businesses, enrich-business, match-business, fetch-prospects, …).
  6. High temperature or a non-recommended model. Temperatures above ~0.1 and non-Claude models produce inconsistent tool calling. Use a low temperature (Explorium uses 0.05) and a Claude Sonnet model.

How to prevent it

System prompt guardrails (built into the reference system prompt):
  • Never call the same tool twice with identical arguments.
  • Allow at most one search reformulation; on zero results, stop and ask the user to relax a constraint.
  • Treat missing fields from fetch tools as expected — enrich, don’t re-fetch.
  • Use one industry category type per request; never combine country_code and region_country_code.
  • Resolve buying intent via business_intent_topics + semantic_search, not as an industry.
Harness settings:
  • Keep a sane iteration cap — a correct company-list answer needs only a handful of tool calls (a few autocomplete → one fetch → one enrich).
  • Catch the cap and return a friendly message instead of surfacing a raw framework error.
Model parameters:
  • Temperature 0.0–0.1, Claude Sonnet 4.6 and above, and don’t cap max_tokens.

How to debug a loop

  1. Log every tool call with its arguments. A loop almost always shows up as the same tool called repeatedly with near-identical inputs — commonly alternating autocompletefetch-businesses.
  2. Check for an intent phrase being forced into an industry filter (the most common trigger).
  3. Confirm your prompt’s tool names match the server’s tools.
  4. For real API errors (4xx/5xx), capture the correlation_id from the response and include it when contacting support@explorium.ai.

Need Help?

Resources

AgentSource MCP API Reference

Support

What’s Next?

  1. Choose your implementation method based on your use case
  2. Follow the specific guide for detailed instructions
  3. Start with simple queries and gradually increase complexity
  4. Join our community to share experiences and get help
Ready to get started? Choose an implementation guide above orcontact our team for personalized recommendations.