Claude Code Integration

Use Hubify Labs directly from Claude Code CLI with the MCP server and built-in workflows.

Hubify Labs integrates natively with Claude Code, Anthropic's CLI for Claude. The MCP server gives Claude Code direct access to your lab's experiments, agents, papers, and knowledge base.

Setup

Install the MCP server

npm install -g @hubify/mcp-server

Configure Claude Code

Add the Hubify MCP server to your Claude Code configuration:

// ~/.claude/mcp_servers.json
{
"hubify": {
  "command": "hubify-mcp",
  "args": ["--lab", "bigbounce"],
  "env": {
    "HUBIFY_API_KEY": "hfy_key_abc123..."
  }
}
}

Verify

Start a new Claude Code session and ask:

What experiments are running in my Hubify lab?

Claude should call the hubify_experiment_list tool and return real data.

What You Can Do

With the MCP server connected, Claude Code can:

ActionExample
Check lab status"What's the status of my lab?"
Run experiments"Run an MCMC chain with Planck+BAO on an H100"
Monitor pods"How much GPU budget have I spent this month?"
Search knowledge"What do we know about f_NL in the knowledge base?"
Check papers"What's the readiness of paper-1?"
Create tasks"Add a task to rerun EXP-051 with wider priors"
Trigger standups"Give me a standup summary"

Workflow: Research from the Terminal

A typical Claude Code research session:

You: Check if any experiments finished overnight

Claude: [calls hubify_experiment_list] Three experiments completed since 8pm:
- EXP-054: Planck+BAO chain (QC PASS, R-hat 1.03)
- EXP-055: SPHEREx forecast (QC PASS)
- EXP-056: Cross-survey correlation (QC FAIL - insufficient samples)

You: Analyze the results of EXP-054 and update the knowledge base

Claude: [calls hubify_experiment_status, hubify_knowledge_search, hubify_knowledge_create]
Analysis complete. Key findings:
- H0 = 67.68 ± 0.42, consistent with Planck 2018
- Created knowledge entry: "Planck+BAO H0 Constraint (April 2026)"

You: Create a follow-up experiment with 50K samples

Claude: [calls hubify_experiment_run]
Created EXP-057: "Extended Planck+BAO chain" on H200, estimated 6h runtime.

Using with the Hubify CLI

You can use both the Hubify CLI and Claude Code MCP server simultaneously. The CLI is best for quick commands, while Claude Code excels at complex multi-step workflows:

# Quick status check via CLI
hubify status

# Complex analysis via Claude Code
claude "Analyze the last 5 experiments, find patterns in the QC failures,
and suggest parameter adjustments"

Best Practices

  • Keep the MCP server pointed at your active lab using --lab
  • Use Claude Code for research analysis and paper writing (high-reasoning tasks)
  • Use the CLI for quick status checks and single commands
  • The MCP server respects your API key's scopes, so use scoped keys for security
← Back to docs index