Overview

Use the Research MCP server from your ATXP-powered agent to research a topic and present synthesized information.

Example prompts

  • “Research the Kelly Criterion and explain how it can be used to optimally size a position on Polymarket.”
  • “Research the latest news on the US financial sector and its impact on the stock market.”

Tools

Usage

1

Define the Research service

Create a reusable service configuration that points to the MCP server and standardizes how you pass arguments and read results. This lets your agent easily interact with the Research tools in a consistent manner.
const researchService = {
    mcpServer: 'https://research.mcp.atxp.ai/',
    quickResearchToolName: 'research_quick_research',
    deepResearchToolName: 'research_deep_research',
    description: 'ATXP Research MCP server',
    getQuickResearchArguments: (question: string) => ({ messages: [question] }),
    getQuickResearchResult: (result: any) => JSON.parse(result.content[0].text),
    getDeepResearchArguments: (question: string) => ({ messages: [question] }),
    getDeepResearchResult: (result: any) => JSON.parse(result.content[0].text)
  };
2

Create an ATXP client

Create a client using an ATXP account by importing the ATXP client SDK and other dependencies.
// Import the ATXP client SDK
import { atxpClient, ATXPAccount } from '@atxp/client';

// Read the ATXP account details from environment variables
const atxpConnectionString = process.env.ATXP_CONNECTION;

// Create a client using the `atxpClient` function
const client = await atxpClient({
  mcpServer: researchService.mcpServer,
  account: new ATXPAccount(atxpConnectionString),
});
3

Use the Research service in your agent

Call the Research tool by passing your natural‑language instruction as the argument the getArguments method.Read the response using the getResult method.
const question = "What is the latest news on the stock market?";

try {
  const quickResearchResult = await client.callTool({
      name: researchService.quickResearchToolName,
      arguments: researchService.getQuickResearchArguments(question),
  });
  console.log(`${researchService.description} result successful!`);
  console.log('Status:', researchService.getQuickResearchResult(quickResearchResult).status);
  console.log('Content:', researchService.getQuickResearchResult(quickResearchResult).content);
  console.log('Sources:', researchService.getQuickResearchResult(quickResearchResult).sources);
} catch (error) {
  console.error(`Error with ${researchService.description}:`, error);
  process.exit(1);
}
You should see the result of the research printed in your console.