Connect the MultitaskAI MCP server to Gemini API
The Gemini Interactions API can call remote MCP servers as tools. Add MultitaskAI as an mcp_server tool with its URL and your API key in the headers.
Endpoint
Text
https://mcp.multitaskai.com
Steps
- Create an API key in your MultitaskAI account.
- Add an mcp_server tool to your interaction with the endpoint URL and your key in the headers, as below.
- Send the request and check that the model calls MultitaskAI tools in its response.
Python
from google import genai
client = genai.Client()
interaction = client.interactions.create(
model="gemini-3.8-flash",
input="Which MultitaskAI tools can you use?",
tools=[
{
"type": "mcp_server",
"name": "multitaskai",
"url": "https://mcp.multitaskai.com",
"headers": {"Authorization": "Bearer YOUR_API_KEY"},
}
],
)
Authentication
Gemini API sends your MultitaskAI API key in the Authorization header. Create a key in your account and use it in place of YOUR_API_KEY. Keep the key out of files you share or commit.
Text
Authorization: Bearer YOUR_API_KEY
Good to know
- Remote MCP is a feature of the Interactions API and works only with Streamable HTTP servers.
- Server names must not contain a hyphen, so use snake_case such as multitaskai.
- The headers are sent with every request, and allowed_tools can limit which tools the model sees.
- The example is in Python; the Gemini docs also show JavaScript, REST, Java and Go.
Official documentation
The Google MCP documentation covers Gemini API's own settings in detail. See the overview for the endpoint and authentication, and pricing for the daily free requests.