Skip to content

docs: add user guide for the Oumi MCP server#2374

Merged
aniruddh-alt merged 4 commits intomainfrom
ani/mcp-docs
Apr 17, 2026
Merged

docs: add user guide for the Oumi MCP server#2374
aniruddh-alt merged 4 commits intomainfrom
ani/mcp-docs

Conversation

@aniruddh-alt
Copy link
Copy Markdown
Contributor

Description

Adds docs/user_guides/mcp.md — a dedicated user guide for the Oumi MCP server. Also wires it into the User Guides toctree in docs/index.md.

This is a targeted replacement for the MCP section currently proposed in #2372. In that PR the MCP page lists tool names (launch_job, poll_status, fetch_logs, list_running_jobs, list_completed_jobs) that don't exist in src/oumi/mcp/server.py, omits 6 tools that do exist, describes a "Prompts" primitive the server doesn't register, and documents an OUMI_LOG_LEVEL=DEBUG env var that no code reads. A user who tries to follow the page from an MCP-capable assistant hits "unknown tool" errors immediately.

This PR rewrites the page from scratch against the actual server:

  • Accurate tool table (15 tools) that matches the @mcp.tool() registrations in src/oumi/mcp/server.py.
  • Accurate resource table covering both guidance://* and jobs://* URIs.
  • Per-client setup snippets for Claude Desktop, Claude Code, and Cursor, plus a note on selecting a specific Python environment.
  • A "When to use it" framing up front so users know whether they want the MCP server or just the CLI.
  • A representative end-to-end cloud-training flow via the actual tool names.
  • Safety section documenting the dry-run default, automatic pre-flight on cloud launches, and the down_cluster confirmation gate.
  • Troubleshooting grounded in real behavior (stdio + stderr logging, sky check, in-process job registry, client log paths).
  • Links to src/oumi/mcp/ so contributors can jump to the source.

Once this lands, #2372 can drop its MCP section to avoid conflicts.

Related issues

Fixes # (none — doc-only)

Before submitting

  • This PR only changes documentation.
  • Did you read the contributor guideline Pull Request guidelines?
  • Did you link the issue(s) related to this PR in the section above?
  • Did you add / update tests where needed? (N/A — docs only)

Introduces docs/user_guides/mcp.md covering:
- When to use the MCP server vs. the CLI
- Installation and client setup (Claude Desktop, Claude Code, Cursor)
- Accurate tool and resource catalogs that match src/oumi/mcp/server.py
- Path handling, safety gates, and a representative cloud-training flow
- Troubleshooting grounded in the server's actual behavior (stdio + stderr logs)

Wires the new page into the User Guides toctree.
@aniruddh-alt aniruddh-alt requested a review from oelachqar April 17, 2026 20:35
- Replace the nonexistent `oumi[cloud]` / `oumi[gpu]` install hint with
  the real per-provider extras (`oumi[aws|azure|gcp|kubernetes|lambda|
  nebius|runpod]`) that SkyPilot actually needs, mirroring the launch
  guide.
- Stop claiming path-sensitive tools accept `oumi://` URIs. `resolve_
  config_path` in `src/oumi/mcp/config_service.py` only handles local
  filesystem paths; rewrite Path Handling to separate the read-only
  bundled-config tools (`search_configs`, `get_config`, `list_
  categories`) from the path-sensitive ones (`run_oumi_job`, `validate_
  config`, `pre_flight_check`).
- Rewrite "job_id not found" recovery. The registry in
  `src/oumi/mcp/job_registry.py` is persistent (`~/.oumi/mcp/oumi-jobs
  .json`), and `_fetch_cloud_status_direct` matches on `status.id`, not
  `status.name`. Point users at `list_jobs` to recover the cloud
  provider's job ID, and at `~/.oumi/mcp/job-logs/<job_id>/` for local
  logs.
- Drop the fabricated `oumi-mcp --help` instruction — `main()` takes no
  arguments.
The previous tip told users to export credentials in ~/.zshrc or
~/.bashrc. That only works for terminal-launched clients (Claude Code);
macOS GUI apps like Claude Desktop and Cursor are started by launchd
and never source shell rc files, so the advice would silently fail.

Switch to recommending the MCP config's own `env` block, which every
stdio-launching client supports, and add a short warning about not
committing secrets into the client config.
Drop the registry-vs-runtime architectural digression; users in this
failure path just need to know to call list_jobs and where local logs
live.
@aniruddh-alt aniruddh-alt marked this pull request as ready for review April 17, 2026 21:22
@aniruddh-alt aniruddh-alt added this pull request to the merge queue Apr 17, 2026
Merged via the queue into main with commit 4b4b434 Apr 17, 2026
7 checks passed
@aniruddh-alt aniruddh-alt deleted the ani/mcp-docs branch April 17, 2026 21:23
@gitar-bot
Copy link
Copy Markdown

gitar-bot bot commented Apr 17, 2026

Important

You are using the Gitar free plan. Upgrade to unlock code review, CI analysis, auto-apply, custom automations, and more.

Gitar

Comment thread docs/user_guides/mcp.md
From the project directory:

```bash
claude mcp add oumi oumi-mcp
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: The claude mcp add command in the documentation is likely missing the required -- separator before the server command oumi-mcp.
Severity: MEDIUM

Suggested Fix

Update the documentation to include the -- separator in the claude mcp add command. The corrected command should be claude mcp add oumi -- oumi-mcp to ensure it works reliably.

Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent. Verify if this is a real issue. If it is, propose a fix; if not, explain why it's
not valid.

Location: docs/user_guides/mcp.md#L68

Potential issue: The documentation for the Claude Code CLI setup provides an incorrect
command. The example `claude mcp add oumi oumi-mcp` is missing the required `--`
separator before the server command. Official Claude Code documentation and standard CLI
practices indicate that for stdio-based servers, the syntax should be `claude mcp add
<name> -- <command>`. The double-dash separator is used to distinguish CLI options from
the command to be executed. Omitting it is likely to cause the command to fail for users
following the guide.

Did we get this right? 👍 / 👎 to inform future reviews.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants