Skip to content

Create Tenant

Create a tenant for an agent's MCP Server.

POST /agents/{agentId}/mcpservers/{mcpServerId}/tenants


agentId string Required

The agent id

mcpServerId string Required

The ID of the MCP Server to create a tenant for.



tenant object Required

An object where each key is the tenant identifier (typically an email) which maps to a user profile on the OAuth server, and the value is the database context scope for that tenant (e.g., {"email@example.com": {"organisationId": 1}}).


Request
import Inconvo from "@inconvoai/node";
const inconvo = new Inconvo({
apiKey: process.env.INCONVO_API_KEY
});
const tenant = await inconvo.agents.mcpServers.tenants.create(
"mcp_abc123",
{
agentId: "agt_123",
tenant: {
"user@example.com": {
organisationId: 1
}
}
}
);
console.log(tenant);
Response
{
"user@example.com": {
"organisationId": 1
}
}
curl -X POST "https://app.inconvo.ai/api/v1/agents/agt_123/mcpservers/mcp_abc123/tenants" \
-H "Authorization: Bearer $INCONVO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"user@example.com": {
"organisationId": 1
}
}'
Response
{
"user@example.com": {
"organisationId": 1
}
}