This repository showcases the powerful integration of Gemini CLI with XPack.AI, demonstrating how you can extend the capabilities of your AI agent by connecting to thousands of ready-to-use tools worldwide. Building upon the robust foundation of the Gemini CLI, this project provides a practical example of configuring its Model Context Protocol (MCP) service to leverage XPack's extensive service marketplace.
Gemini CLI is a command-line AI workflow tool designed to connect to your existing tools, understand your codebase, and accelerate your development workflows. It empowers developers to:
- Query and edit large codebases.
- Generate new applications from various inputs.
- Automate operational tasks.
- Integrate with external capabilities via MCP servers.
XPack.AI is a platform that enables AI agents to connect to a vast ecosystem of global services and tools through a unified Model Context Protocol (MCP). With XPack, you can effortlessly expand your AI agent's functionalities, accessing diverse APIs and services across various domains like finance, logistics, messaging, and more, all in under a minute.
This project focuses on demonstrating how to configure Gemini CLI to utilize XPack as an MCP server. By doing so, your Gemini CLI instance gains immediate access to XPack's rich collection of tools, allowing you to:
- Access a diverse range of services: From financial data to image processing, integrate capabilities that were previously out of reach.
- Accelerate development: Rapidly prototype and build AI-powered solutions by leveraging pre-built tools.
- Streamline workflows: Automate complex tasks by combining Gemini CLI's intelligence with XPack's external service integrations.
This section outlines the basic setup for Gemini CLI. For detailed instructions on Gemini CLI installation and authentication, please refer to the official Gemini CLI documentation.
-
Prerequisites: Ensure you have Node.js version 18 or higher installed.
-
Run the CLI: Execute the following command in your terminal:
npx https://github.com/xpack-ai/gemini-cli
Or install it with:
npm install -g @google/gemini-cli gemini
-
Pick a color theme
-
Authenticate: When prompted, sign in with your personal Google account. This will grant you up to 60 model requests per minute and 1,000 model requests per day using Gemini.
To connect your Gemini CLI to XPack, you need to configure an MCP server entry in your Gemini CLI settings. This allows Gemini CLI to discover and utilize the tools available through XPack.
-
Obtain your XPack Auth Key:
- Visit XPack.AI and sign up for an account.
- Generate your Auth key from your XPack dashboard.
-
Configure Gemini CLI
settings.json:- Create or open the
.gemini/settings.jsonfile in your project's root directory or at the global level (~/.gemini/settings.json). - Add the following
mcpServersconfiguration block, replacingYOUR_XPACK_AUTH_KEYwith your actual XPack Auth key:
{ "mcpServers": { "xpack-mcp-market": { "type": "sse", "url": "https://mcp.xpack.ai/v1/mcp?apikey=YOUR_XPACK_AUTH_KEY" } } } - Create or open the
-
Verify Connection: After configuring, restart your Gemini CLI. You can verify the connection and discovered tools using the
/mcp listcommand within the Gemini CLI:/mcp list
You should see
xpack-mcp-marketlisted with aReadystatus and a list of available tools.
Once the CLI is running, you can start interacting with Gemini from your shell.
You can start a project from a new directory:
cd new-project/
gemini
> Write me a Gemini Discord bot that answers questions using a FAQ.md file I will provideOr work with an existing project:
git clone https://github.com/xpack-ai/gemini-cli
cd gemini-cli
gemini
> Give me a summary of all of the changes that went in yesterday- Explore more XPack Services to discover additional integration possibilities.
- Learn how to contribute to or build from the source.
- Explore the available CLI Commands.
- If you encounter any issues, review the Troubleshooting guide.
- For more comprehensive documentation, see the full documentation.
Head over to the troubleshooting guide if you're having issues.
This section provides practical examples of how users who prefer a CLI-style workflow can leverage Gemini CLI with XPack as an personal AI assistant for various tasks.
Easily analyze YouTube video comments to understand audience sentiment and get suggestions for improving your content.
gemini
> Please use xpack-mcp-server to read the comments on this YouTube video: https://www.youtube.com/watch?v=LPZh9BOjkQs, analyze the sentiment of the feedback, and recommend improvements for the video.Quickly check the latest gold price and discover key factors that may affect future trends.
gemini
> Please use xpack-mcp-server to look up the current real-time price of gold and provide specific factors that may impact its price in the future.Instantly remove the background from any image for clean, professional results.
gemini
> Please use xpack-mcp-server to remove the background from this image (@/docs/assets/xpack/stunning-quality-product.png) .Head over to the Uninstall guide for uninstallation instructions.
For details on the terms of service and privacy notice applicable to your use of Gemini CLI, see the Terms of Service and Privacy Notice.






