Skip to main content
An mcp declaration defines a named MCP server connection used by imports.
mcp tasks {
    endpoint: "http://localhost:8000/mcp/tasks"
}
Imported tools, prompts, and resources reference that server through the mcp namespace.
tool fetch_task from mcp.tasks.tool.fetch_task
prompt writer_instructions from mcp.tasks.prompt.writer_instructions
resource project_readme from mcp.tasks.resource.project_readme

Authenticated MCP servers

Use headers {} when the MCP server requires authentication or request-scoped metadata.
secrets {
    mcp_token: string
}

mcp summarizer {
    endpoint: "http://localhost:8000/mcp/summarizer"

    headers {
        Authorization: "Bearer {{ secrets.mcp_token }}"
    }
}
Headers can reference runtime values from secrets and input.
mcp internal_tools {
    endpoint: "https://tools.internal.example.com/mcp"

    headers {
        Authorization: "Bearer {{ secrets.internal_tools_token }}"
        X_Workspace_ID: "{{ input.workspace_id }}"
    }
}

Practical guidance

  • Keep one mcp declaration per backend capability domain (tasks, knowledge, crm).
  • Pass credentials through secrets, never hardcode long-lived tokens.
  • Add request-scoped headers (workspace, tenant, user context) when your MCP backend needs routing context.
  • Keep endpoint URLs stable and move environment-specific values to deployment configuration.
Do not hardcode long-lived tokens in .wire files. Pass them through secrets.

See also