Skip to main content
Glama
namabile

Malloy MCP Server

by namabile

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
MALLOY_PUBLISHER_ROOT_URLNoURL of the Malloy Publisher APIhttp://localhost:4000

Capabilities

Features and capabilities supported by this server

CapabilityDetails
tools
{
  "listChanged": false
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}
experimental
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
execute_malloy_queryA

Execute a Malloy query.

This tool connects to the Malloy Publisher API (default: http://localhost:4000/api/v0)
and executes a Malloy query against a model.

Args:
    project_name: The name of the project, defaults to "home"
    package_name: The name of the package containing the model
    model_path: The path to the model within the package
    query: The Malloy query string to execute (mutually exclusive with query_name)
    source_name: Name of the source in the model (required when using query_name)
    query_name: Name of a query to execute on a source
        (mutually exclusive with query)
    version_id: Version ID of the package

Returns:
    Any: Query execution result with structure:
        {
            "data_styles": Object containing style information
            "model_def": Object containing model definition
            "query_result": Array of result objects
        }

Raises:
    MalloyError: If query execution fails or parameters are invalid
        Error codes:
        - QUERY_EXECUTION_ERROR: Error during query execution
        - CONNECTION_ERROR: Error connecting to Malloy Publisher API

Example:
    ```python
    # Example 1: Direct query
    result = await execute_malloy_query(
        project_name="home",
        package_name="sales",
        model_path="sales.malloy",
        query="query: orders -> { aggregate: count() }"
    )

    # Example 2: Named query
    result = await execute_malloy_query(
        project_name="home",
        package_name="sales",
        model_path="sales.malloy",
        source_name="orders",
        query_name="top_customers"
    )
    ```
list_projectsA

List available projects.

This tool doesn't require any input parameters.

Returns:
    list[Project]: List of Malloy projects
list_packagesC

List packages for a project.

Args:
    project_name: The name of the project to list packages for, defaults to "home"

Returns:
    list[Package]: List of Malloy packages
list_modelsA

List models for a package.

Args:
    project_name: The name of the project, defaults to "home"
    package_name: The name of the package to list models for

Returns:
    List[Model]: List of Malloy models
get_modelA

Get details for a specific model.

Args:
    project_name: The name of the project, defaults to "home"
    package_name: The name of the package
    model_path: The path to the model

Returns:
    CompiledModel: The compiled Malloy model

Prompts

Interactive templates invoked by user choice

NameDescription
create_malloy_queryCreate a Malloy query from a natural language prompt.

Resources

Contextual data attached and managed by the client

NameDescription
projects://home

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/namabile/malloy-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server