MCP servers
aiXplain Marketplace exposes MCP servers for selected model, tool, and integration assets.
This allows external MCP clients to connect to aiXplain-hosted endpoints with a single PAYG API key, instead of running and maintaining separate MCP servers for each asset.
Before you start
Create a PAYG API key in aiXplain Console. Use that key in the Authorization header for every MCP request.
Find an asset ID or path
You can identify the asset you want to expose in either of these ways:
- Browse the Marketplace in aiXplain Studio and copy the asset ID or asset path from the asset you want to expose over MCP.
- Use the SDK search methods to find a matching model, tool, or integration and then use its
idorpath.
from aixplain import Aixplain
aix = Aixplain(api_key="YOUR_API_KEY")
models = aix.Model.search(query="gpt-4o-mini", page_size=5)
tools = aix.Tool.search(q="tavily", page_size=5)
integrations = aix.Integration.search(q="slack", page_size=5)
for model in models:
print(model.id, getattr(model, "path", None), model.name)
for tool in tools:
print(tool.id, getattr(tool, "path", None), tool.name)
for integration in integrations:
print(integration.id, getattr(integration, "path", None), integration.name)
Endpoint format
Use the aiXplain-hosted MCP endpoint for the asset you want to expose. The asset can be an ID or a URL-encoded Marketplace path:
https://models-mcp.aixplain.com/mcp/<AIXPLAIN_ASSET_ID_OR_PATH>
Note: We verified live that both URL-encoded paths such as
openai%2Fgpt-4o-mini%2Fopenaiand raw slash-separated paths such asopenai/gpt-4o-mini/openaiwork. Underscore-substituted paths do not. We recommend URL-encoded paths as the canonical form.
All MCP requests must include your PAYG API key:
{
"headers": {
"Authorization": "Bearer <AIXPLAIN_APIKEY>",
"Accept": "application/json, text/event-stream"
}
}
Install in an MCP client
Add an MCP server entry in your client configuration and point it to the aiXplain-hosted endpoint for the target asset.
Example using the real openai/gpt-4o-mini/openai model path:
{
"gpt4o_mini": {
"url": "https://models-mcp.aixplain.com/mcp/openai%2Fgpt-4o-mini%2Fopenai",
"headers": {
"Authorization": "Bearer <AIXPLAIN_APIKEY>",
"Accept": "application/json, text/event-stream"
}
}
}
Model example
Use a model asset ID or encoded model path when you want your MCP client to call a hosted aiXplain model through MCP.
{
"gpt4o_mini": {
"url": "https://models-mcp.aixplain.com/mcp/openai%2Fgpt-4o-mini%2Fopenai",
"headers": {
"Authorization": "Bearer <AIXPLAIN_APIKEY>",
"Accept": "application/json, text/event-stream"
}
}
}
Typical use cases:
- Add a hosted LLM to an MCP-capable assistant
- Route speech, vision, or language model calls through aiXplain-hosted infrastructure
- Swap model assets without reworking client-side MCP wiring
Tool example
Use a tool asset ID or encoded tool path when you want your client to access a Marketplace tool through MCP.
{
"tavily_search": {
"url": "https://models-mcp.aixplain.com/mcp/tavily%2Ftavily-web-search%2Ftavily",
"headers": {
"Authorization": "Bearer <AIXPLAIN_APIKEY>",
"Accept": "application/json, text/event-stream"
}
}
}
Typical use cases:
- Expose search, retrieval, or utility tools to an MCP-enabled agent
- Reuse Marketplace tools from external clients without standing up custom infrastructure
Integration example
Use an integration asset ID when you want your client to access an aiXplain integration through MCP. Current verified examples in our codebase use integration IDs.
{
"slack_integration": {
"url": "https://models-mcp.aixplain.com/mcp/686432941223092cb4294d3f",
"headers": {
"Authorization": "Bearer <AIXPLAIN_APIKEY>",
"Accept": "application/json, text/event-stream"
}
}
}
Typical use cases:
- Connect external MCP clients to systems such as Slack, CRM, or internal tools
- Reuse aiXplain-hosted integrations with the same authentication pattern as models and tools
Notes
- Get your API key from Console > Settings > Keys. MCP access uses a PAYG API key.
- Replace
<AIXPLAIN_ASSET_ID_OR_PATH>with the specific Marketplace asset you want to expose. - Replace
<AIXPLAIN_APIKEY>with an aiXplain PAYG API key that has access to the target asset. - The same MCP endpoint pattern applies across supported models, tools, and integrations.
- Marketplace paths must be URL-encoded before you append them to
/mcp/. text/event-streamsupport allows MCP clients that rely on streaming responses to work against supported aiXplain-hosted assets.