Twitter Search via Xquik MCP¶
Xquik exposes a remote MCP server for X post search, user lookup, monitoring, webhooks, and write actions. Langroid can use that server directly through its MCP support, so no custom Langroid tool is required.
Xquik is a third-party service. Review its terms, privacy policy, and API key handling before sending keys or search queries to the remote MCP endpoint.
Setup¶
Create an API key in the Xquik dashboard, then export it before running the example:
The example connects to the remote Streamable HTTP MCP endpoint:
from fastmcp.client.transports import StreamableHttpTransport
transport = StreamableHttpTransport(
url="https://xquik.com/mcp",
headers={"x-api-key": api_key},
)
Run the Example¶
You can pass a query and result limit:
The default query uses X advanced search syntax.
The script loads the Xquik MCP tools with get_tools_async, enables them on a
ChatAgent, and asks the agent to search X for matching posts.
See the full example in examples/mcp/xquik-twitter-search.py.