Cohesivity MCP Integration

Give PraisonAI agents managed backend infrastructure through the Cohesivity MCP server

Connect a PraisonAI agent to Cohesivity to discover and provision databases, storage, hosting, authentication, email, and AI APIs.

Diagram

App request

PraisonAI Agent

Cohesivity MCP

Managed backend

Working app

Quick Start

  1. Install MCP support

    Install PraisonAI Agents with the MCP dependency:

    bash
    pip install "praisonaiagents[mcp]"
  2. Connect an agent

    Create cohesivity_agent.py:

    python
    from praisonaiagents import Agent
    from praisonaiagents.mcp import MCP
    
    agent = Agent(
        instructions="Use Cohesivity tools when the task needs backend infrastructure.",
        model="gpt-4o-mini",
        tools=MCP("https://cohesivity.ai/mcp"),
    )
    
    agent.start(
        "Call get_cohesivity_documentation with document=\"offerings\". "
        "List the backend services for a photo-sharing app without changing anything."
    )
  3. Run the agent

    Run the file after configuring your model provider:

    bash
    python cohesivity_agent.py

    The agent connects through Streamable HTTP and receives the Cohesivity tools directly.

Project Configuration

Add Cohesivity to .praisonai/config.yaml when every PraisonAI run in a project should receive its tools:

yaml
mcp:
  servers:
    cohesivity:
      type: remote
      url: https://cohesivity.ai/mcp
      enabled: true

PraisonAI automatically uses Streamable HTTP for the HTTPS endpoint.

Available Tools

The hosted server exposes documentation plus project-management tools:

ToolPurpose
get_cohesivity_documentationRead current documentation and service details
create_tenantCreate a temporary project or an owned project after sign-in
provision_resourceAdd one or more backend resources
tenant_statusInspect lifecycle, limits, and provisioned resources
claim_tenantGenerate the approval link that keeps a temporary project
give_feedbackSend product feedback from an existing project

Creating a project, claiming it, and provisioning resources require explicit user confirmation. A public project starts as a temporary 72-hour tenant unless the user chooses account sign-in.

Best Practices

Ask before changing infrastructure

Get explicit approval for the exact project or resources before the agent passes confirmed: true to a mutating tool.

Protect project credentials

Save returned project credentials as .cohesivity, restrict the file to the current user, add it to .gitignore, and never print or commit it.

Read service details when needed

Use get_cohesivity_documentation before provisioning instead of copying limits or resource options into the agent prompt.

Related