Skip to main content

Official developer SDK for building Marona-compatible apps, tool servers, skills, and workflows.

Project description

Marona SDK

Official developer SDK for building Marona-compatible apps, MCP servers, tool servers, skills, and workflows.

Use marona-sdk when you are building an app that exposes tools to Marona Hub. Use marona when you are building an application or interface that calls a Marona-compatible runtime.

The SDK helps your app expose the Marona standard automatically:

  • GET /health
  • GET /manifest
  • GET /hub-registration
  • POST /mcp/ using the official MCP Python SDK FastMCP
  • tool outputs with status, success, message, content, content_type, presentation_hint, and context

Install

pip install marona-sdk

In requirements.txt:

marona-sdk

Import it as:

from marona_sdk import AgentApp, HostingConfig, success

1. Create An App

Every app needs a unique app ID, also called a slug. Examples:

  • weather-mcp
  • knowledge-mcp
  • company-crm-mcp
from marona_sdk import AgentApp, success

agent_app = AgentApp(
    name="Weather Tools",
    slug="weather-mcp",
    description="Weather lookup tools for agents and AI interfaces.",
    category="Weather",
    visibility="public",
)

Use visibility="public" when the app should be discoverable in Hub. Use visibility="private" when the app is only for the owner's workspace.

2. Add A Tool

@agent_app.tool(
    title="Get forecast",
    description="Return the weather forecast for a city.",
    input_schema={
        "type": "object",
        "properties": {
            "city": {"type": "string"},
        },
        "required": ["city"],
        "additionalProperties": False,
    },
)
def get_forecast(city: str) -> dict:
    return success(
        f"The forecast for {city} is sunny.",
        content=f"The forecast for {city} is sunny.",
        content_type="text",
        presentation_hint="display_as_provided",
        context="Display the forecast directly unless the user asks for another format.",
        data={"city": city, "condition": "sunny"},
    )

3. Run The Server

app = agent_app.create_fastapi_app()

Run locally:

uvicorn examples.hello_server:app --host 127.0.0.1 --port 62900

Inspect:

http://127.0.0.1:62900/health
http://127.0.0.1:62900/manifest
http://127.0.0.1:62900/hub-registration
http://127.0.0.1:62900/mcp/

4. Choose Hosting

Marona supports two hosting models.

Option A: self-hosted

You run the server yourself and register its public MCP URL in Marona Hub.

agent_app = AgentApp(
    name="Weather Tools",
    slug="weather-mcp",
    description="Weather lookup tools.",
    category="Weather",
    hosting=HostingConfig(mode="self_hosted"),
)

Your deployment is responsible for uptime, logs, scaling, secrets, storage, domains, and monitoring. Marona Hub can still list and review the app, and runtime users can discover it after approval.

Option B: Marona-hosted

Marona stores the hosted deployment request and runs the MCP server for you through the Marona hosting control plane. You provide a source, runtime, resource shape, environment, and secret names.

agent_app = AgentApp(
    name="Weather Tools",
    slug="weather-mcp",
    description="Weather lookup tools.",
    category="Weather",
    hosting=HostingConfig(
        mode="marona_hosted",
        source_type="git",
        source_url="https://github.com/example/weather-mcp",
        branch="main",
        entrypoint="uvicorn app:app",
        runtime="python",
        resource_class="shared-small",
        replicas=1,
        storage_gb=1,
        secrets={"OPENAI_API_KEY": "set-in-portal"},
        environment={"LOG_LEVEL": "info"},
    ),
)

Secret values are not exposed in /hub-registration; only configured secret names are shown.

5. Publish To Marona Hub

DeveloperHubClient is for developer workflow commands such as create, sync, submit, and hosted deployment setup.

from marona_sdk import DeveloperHubClient

client = DeveloperHubClient(
    hub_url="https://hub.marona.ai",
    token="DEVELOPER_PORTAL_TOKEN",
)

Apps, devices, bots, and user interfaces should use the separate marona runtime client package.

Create, sync, submit, then request Marona hosting:

detail = await client.create_agent_app(agent_app.hub_registration(
    server_url="https://weather.example.com/mcp/",
    health_check_url="https://weather.example.com/health",
))
await client.sync_agent_app(detail["id"])
await client.submit_agent_app(detail["id"])

deployment = await client.create_hosted_deployment(
    detail["id"],
    source_type="git",
    source_url="https://github.com/example/weather-mcp",
    branch="main",
    entrypoint="uvicorn app:app",
    runtime="python",
    secrets={"OPENAI_API_KEY": "set-in-portal"},
)

Marona returns a hosted domain, MCP URL, health URL, logs URL, metrics URL, and deployment status. Admin operations can activate the hosted deployment into the app’s live MCP endpoint after provisioning passes health checks.

Standard Tool Results

All Marona-compatible tools should return the SDK result shape:

  • status: machine-readable result status
  • success: boolean result success flag
  • message: short user-facing status line
  • content: primary user-facing text or content
  • content_type: provider-neutral content type, such as text, document, message, list, media, or search_results
  • presentation_hint: provider-neutral usage hint, such as display_as_provided
  • context: short guidance for interpreting the result

Provider-specific data should live under generic fields:

  • data: one structured object
  • items: a list of structured objects
  • count: item count when items is used
  • artifacts: generic artifact descriptors
  • job: generic async job metadata

If a tool declares its own output_schema, the SDK merges these standard fields into that schema before exposing /manifest and /hub-registration.

Standard Tool Inputs For User Files

Tools that consume uploaded files should declare the SDK-standard attachments input property. The runtime injects the current conversation files into that array automatically.

from marona_sdk import standard_attachments_property

input_schema = {
    "type": "object",
    "properties": {
        "question": {"type": "string"},
        "attachments": standard_attachments_property(),
    },
    "required": [],
    "additionalProperties": False,
}

Each attachment can include artifact_id, filename, mime_type, kind, url, file_url, content_base64, content, and metadata.

Package Names

  • Python developer SDK: marona-sdk, import marona_sdk
  • Dart developer SDK: marona_sdk, import package:marona_sdk/marona_sdk.dart
  • TypeScript developer SDK: marona-sdk, import from "marona-sdk"
  • Runtime client SDKs: marona

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

marona_sdk-0.1.5.tar.gz (18.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

marona_sdk-0.1.5-py3-none-any.whl (15.3 kB view details)

Uploaded Python 3

File details

Details for the file marona_sdk-0.1.5.tar.gz.

File metadata

  • Download URL: marona_sdk-0.1.5.tar.gz
  • Upload date:
  • Size: 18.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.14

File hashes

Hashes for marona_sdk-0.1.5.tar.gz
Algorithm Hash digest
SHA256 3517eff479ee3a06baf7d81fc6a24c27b580670b4c64f7371300d79d06112b7e
MD5 61820fe8ece10eae249e329b48797387
BLAKE2b-256 f67a4494d7569a9e34aebe3499c248e921111646dc40b0fd55a43bdf5ea7c0bc

See more details on using hashes here.

File details

Details for the file marona_sdk-0.1.5-py3-none-any.whl.

File metadata

  • Download URL: marona_sdk-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 15.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.14

File hashes

Hashes for marona_sdk-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 465ceeaf55707d1ffb97f8ff2bec8a725e48f5168a4c1534285b4e06678fb239
MD5 6e16beaffe7ddeaa62ca90df3a9c9ddc
BLAKE2b-256 69c929386d6398035375574ad3787c37c2c7588569239ccadc6b8b85bd924567

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page