Technical reference for the Credible Data MCP server, available at https://<org>.mcp.credibledata.com/mcp.
suggestAnalysis
Translates natural language requests into executable Malloy queries based on your semantic data models.
Parameters:
naturalLanguageQuery (required): The user’s question in natural language (e.g., “What were our top-selling products last year?”)
projectName (optional): Project name to search within. Only use if known from context or explicitly mentioned by user.
packageName (optional): Package name to narrow search scope. Requires projectName.
modelPath (optional): Path to specific .malloy model file (e.g., models/sales_model.malloy). Requires projectName and packageName.
sourceName (optional): Specific source/table within a model. Requires projectName, packageName, and modelPath.
Parameter Dependencies: projectName → packageName → modelPath → sourceName
Scope Strategy: Start broad when uncertain, narrow as you discover structure. If results are insufficient, widen scope by removing parameters from right to left.
Response:
matchingResults: Array of query suggestions with executable Malloy query code and primaryTransactionTable
entities: Available dimensions, measures, views, and columns you can use
docs: Malloy syntax documentation and common errors to avoid
nextSteps: Actionable guidance for refining analysis
Example Request:
curl -X POST "https://your-org.mcp.credibledata.com/mcp" \
-H "Content-Type: application/json" \
-H "Authorization: ApiKey YOUR_API_KEY" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "suggestAnalysis",
"arguments": {
"naturalLanguageQuery": "What are the top 10 products by sales?",
"projectName": "your-project"
}
}
}'
executeQuery
Executes Malloy queries against data models and returns JSON results.
Parameters:
projectName (required): Project containing the model
packageName (required): Package containing the model
modelPath (required): Path to the .malloy model file
query (optional)*: Custom Malloy query code. Do NOT provide sourceName when using this.
queryName (optional)*: Name of predefined query/view to execute
sourceName (optional)*: Source name. Required when using queryName, omit when using custom query.
*Execution Patterns: Use exactly ONE of:
- Custom query: Provide
query parameter only
- Predefined query: Provide both
queryName and sourceName
Response: Returns query results as JSON with data, totalRows, executionTime, and metadata
Deprecated. These tools are only available via the legacy https://<org>.data.credibledata.com/mcp endpoint and will be removed in a future release. Use suggestAnalysis instead.
Navigate the organizational hierarchy to discover available data before analysis.
Tool Hierarchy: listProjects → listPackages → listModels → getModel
listProjects
Lists all projects in your organization.
Parameters: None (organization derived from auth context)
Returns: Array of projects with name and description
getProject
Gets details of a specific project.
Parameters: projectName (required)
listPackages
Lists all packages within a project.
Parameters: projectName (required)
Returns: Array of packages with name, description, and metadata
getPackage
Gets detailed package information including contents.
Parameters: projectName (required), packageName (required)
listModels
Lists all .malloy model files and .malloynb notebooks in a package.
Parameters: projectName (required), packageName (required)
Returns: Array of models with path, type, and metadata
getModel
Gets compiled model content including sources, views, queries, measures, and dimensions.
Parameters: projectName (required), packageName (required), path (required)
Authentication
The MCP server supports two authentication methods:
- OAuth 2.0: For connecting to AI assistants like Claude Desktop. See AI Assistants with MCP.
- API Key: For building your own custom agents with server-to-server communication. Pass as
Authorization: ApiKey YOUR_API_KEY header. See Custom AI Agents.
Configure your MCP client with your organization’s endpoint: https://<org>.mcp.credibledata.com/mcp
Error Handling
The server returns standard MCP error responses for invalid requests, authentication failures, and query execution errors. Refer to the MCP specification for error code details.