Skip to main content

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

This tool takes in a list of messages and returns a fast answer in the form of a string as well as relevant sources. For example, if you want a quick summary of the latest news on the stock market, you could call this tool with the argument ["What is the latest news on the stock market?"].

Arguments

Accepts a JSON object with the following properties:
messages
array
required
The list of message strings to research.

Response

Returns a JSON object with the following properties:
status
string
The status of the research operation.
content
string
The quick answer to the research question.
sources
array
The list of sources that were used to answer the research question.
This tool takes in a list of messages and performs deep research on the topic. It returns an answer in the form of a string as well as relevant sources. For example, if you wanted to compare the performance of two different stocks, you could call this tool with the argument ["What is the performance of Tesla and Apple over the last 12 months and how does it project into the future?"].

Arguments

Accepts a JSON object with the following properties:
messages
array
required
The list of message strings to research.

Response

Returns a JSON object with the following properties:
status
string
The status of the research operation.
content
string
The answer to the research question.
sources
array
The list of sources that were used to answer the research question.

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

  • Using an ATXP account
  • Using a Base account
  • Using a Solana account
  • Using a Worldchain account
  • Using a Polygon account
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.
I