-
Notifications
You must be signed in to change notification settings - Fork 781
Cloud docs update, Specifying OpenAI dependency, adding explicit instruction for key #593
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cloud docs update, Specifying OpenAI dependency, adding explicit instruction for key #593
Conversation
WalkthroughAdds OpenAI provider setup to quickstart and cloud docs: secret key snippet, updated install commands using the Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant Dev as Developer
participant CLI as UV (cli)
participant Config as mcp_agent.config.yaml / secrets
participant App as MCPApp / Agent
participant LLM as OpenAIAugmentedLLM
participant Servers as MCP Servers (fetch, filesystem)
Dev->>CLI: uv init / uv add "mcp-agent[openai]"
Dev->>Config: add `mcp_agent.secrets.yaml` (openai: api_key)
Dev->>Config: set execution_engine: asyncio + mcp.servers + default_model
Dev->>App: run example `main.py` / call `finder_agent`
App->>LLM: attach OpenAIAugmentedLLM (uses openai key)
App->>Servers: request fetch file(s)
Servers-->>App: return file contents
App->>LLM: generate summary (call & await)
LLM-->>App: return generated summary
App-->>Dev: output summary/result
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20–30 minutes
Possibly related PRs
Suggested reviewers
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (3)
docs/get-started/quickstart.mdx (3)
31-37: Add a security note about protecting secrets.While the step clearly instructs users to add their API key, consider adding a brief warning to ensure
mcp_agent.secrets.yamlis added to.gitignoreand never committed to version control. This is a best practice callout that protects users from accidentally leaking API keys.For example:
<Step title="Add your model provider key"> In the `mcp_agent.secrets.yaml` in your project directory, add your OpenAI or other model provider key. ```yaml mcp_agent.secrets.yaml openai: api_key: "your-openai-api-key" ``` + ⚠️ **Important:** Never commit this file to version control. Ensure `mcp_agent.secrets.yaml` is added to `.gitignore`. </Step>
62-78: Configuration looks good; verify tool availability.The configuration uses
uvxandnpxto run MCP servers. Ensure the quickstart guide or related docs mention that users need Node.js (for npx) available, or consider providing alternative installation instructions for those without it.
101-134: Example is feature-rich but potentially overwhelming for a quickstart.The example demonstrates multiple advanced features (file access, web fetching, LLM generation, logging) in a single go. While this shows real-world usage and aligns well with the PR's goal of demonstrating practical patterns, consider whether a more minimal "hello world" variant would help beginners get started faster, with this complex example moved to an "Advanced Examples" section.
That said, if this is intentionally designed as a "opinionated quickstart that shows best practices," the code is well-structured and the progression of examples is logical.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
docs/get-started/quickstart.mdx(4 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: checks / test
🔇 Additional comments (4)
docs/get-started/quickstart.mdx (4)
26-26: Verify the[openai]extra is properly defined in the package.The installation commands correctly use the extras syntax. Please confirm that the
mcp-agentpackage'spyproject.tomlorsetup.pydefines the[openai]extra to avoid installation failures for users.Also applies to: 52-52
61-61: LGTM!The addition of code block identifiers (
mcp_agent.config.yaml,mcp_agent.secrets.yaml,main.py) improves clarity and guides users on which files to create or edit.Also applies to: 81-81, 89-89
94-96: Verify the import paths are correct.The imports reference specific classes from the
mcp_agentpackage. Please confirm these paths and class names exist in the current codebase:
mcp_agent.app.MCPAppmcp_agent.agents.agent.Agentmcp_agent.workflows.llm.augmented_llm_openai.OpenAIAugmentedLLMIf any have changed or been renamed, the documentation example will break for users.
136-141: LGTM!The main execution block properly wraps the async code and includes helpful timing information. This integrates well with the
uv run main.pyinstruction that follows.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
docs/get-started/cloud.mdx (1)
36-72: Deployment section could benefit from explicit pre-deployment secrets setup guidance.While line 52 mentions classifying secrets during deployment, the PR objective states "adds a step instructing users to add secrets to the secrets.yaml file." The current text describes runtime classification but doesn't include a clear pre-deployment step showing users how to create and populate
mcp_agent.secrets.yaml. Consider adding an explicit step (e.g., after the directory structure shown in the code group) that guides users through creating the secrets file with examples for common providers like OpenAI.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (6)
README.md(1 hunks)docs/docs.json(1 hunks)docs/get-started/cloud.mdx(6 hunks)docs/get-started/install.mdx(1 hunks)docs/get-started/quickstart.mdx(5 hunks)docs/get-started/welcome.mdx(1 hunks)
✅ Files skipped from review due to trivial changes (1)
- README.md
🚧 Files skipped from review as they are similar to previous changes (1)
- docs/get-started/quickstart.mdx
🔇 Additional comments (7)
docs/get-started/install.mdx (1)
133-133: Navigation link update is consistent across documentation.The link target change from
/get-started/deploy-to-cloudto/get-started/cloudaligns with concurrent updates indocs/get-started/welcome.mdxanddocs/docs.json, ensuring consistent navigation throughout the docs site.docs/get-started/welcome.mdx (1)
79-79: Navigation link consistently updated.The href change to
/get-started/cloudmirrors the updates made indocs/get-started/install.mdxanddocs/docs.json, maintaining consistency across the documentation site structure.docs/docs.json (1)
38-38: Navigation configuration change is consistent with other docs updates.The page reference updated to
"get-started/cloud"aligns with concurrent updates indocs/get-started/install.mdxanddocs/get-started/welcome.mdx, ensuring the navigation menu reflects the new documentation structure.docs/get-started/cloud.mdx (4)
2-34: Clear introduction and context for the cloud platform.The updated title and new "What is MCP-Cloud?" section with video provide good orientation for users. The key benefits summary effectively communicates the value proposition before diving into deployment steps.
73-117: Client connection examples are comprehensive with proper file labels.The addition of
claude_codeto the supported clients (line 84) expands options for users, and the YAML code block is properly labeled withmcp_agent.config.yaml(line 90), aligning with the PR's style improvement to include file names in code snippets. The Python example clearly demonstrates the ServerRegistry pattern.
144-196: Hello World example code needs verification for API correctness.The example is well-structured and properly labeled "main.py", and it demonstrates the OpenAIAugmentedLLM integration as intended. However, several API details need verification:
- Line 157: Does
@app.tool()decorator correctly exposefinder_agentas a callable tool, or should it use a different pattern?- Line 154: Is
MCPApp(name=..., description=...)a supported signature, or should description be passed differently or omitted?- Line 175: Is
llm.generate_str(message=request)the correct parameter name, or should it betext,prompt, or something else?- Line 150: The import
from mcp_agent.core.context import Context as AppContextshould be verified to ensure it's the correct type annotation.These details significantly impact whether users copying this example will have working code.
119-141: Monitoring and management section is clear and well-organized.The tab-based presentation of logging, server management, and workflow inspection commands provides users with practical tools for managing deployed agents.
| Run `uvx mcp-agent deploy <app-name>` after logging in with `uvx mcp-agent login`. The CLI packages your project, provisions secrets, and exposes an MCP endpoint backed by a durable Temporal runtime. See the [Cloud quickstart](https://docs.mcp-agent.com/get-started/ | ||
| cloud) for step-by-step screenshots and CLI output. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The URL for the Cloud quickstart documentation is split across two lines, which will break the link when rendered. The markdown link should be on a single line to function properly:
See the [Cloud quickstart](https://docs.mcp-agent.com/get-started/cloud) for step-by-step screenshots and CLI output.| Run `uvx mcp-agent deploy <app-name>` after logging in with `uvx mcp-agent login`. The CLI packages your project, provisions secrets, and exposes an MCP endpoint backed by a durable Temporal runtime. See the [Cloud quickstart](https://docs.mcp-agent.com/get-started/ | |
| cloud) for step-by-step screenshots and CLI output. | |
| Run `uvx mcp-agent deploy <app-name>` after logging in with `uvx mcp-agent login`. The CLI packages your project, provisions secrets, and exposes an MCP endpoint backed by a durable Temporal runtime. See the [Cloud quickstart](https://docs.mcp-agent.com/get-started/cloud) for step-by-step screenshots and CLI output. |
Spotted by Graphite Agent
Is this helpful? React 👍 or 👎 to let us know.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (6)
README.md(2 hunks)docs/docs.json(1 hunks)docs/get-started/cloud.mdx(6 hunks)docs/get-started/install.mdx(1 hunks)docs/get-started/quickstart.mdx(5 hunks)docs/get-started/welcome.mdx(1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
- docs/get-started/quickstart.mdx
🧰 Additional context used
🪛 markdownlint-cli2 (0.18.1)
README.md
977-977: Bare URL used
(MD034, no-bare-urls)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: checks / test
🔇 Additional comments (9)
docs/get-started/welcome.mdx (1)
79-79: Link restructuring looks good.The updated href to
/get-started/cloudaligns with the navigation restructuring across the documentation.docs/docs.json (1)
38-38: Navigation path updated correctly.The docs.json navigation entry is updated to reflect the new cloud documentation path, maintaining consistency with other file updates in this PR.
docs/get-started/install.mdx (1)
133-133: Cloud deployment link updated.The Next steps link now points to the restructured cloud documentation path, maintaining consistency across the Get Started flow.
README.md (1)
125-125: Cloud documentation link updated.The Cloud Quickstart link now points to the restructured cloud documentation path, consistent with navigation changes across the PR.
docs/get-started/cloud.mdx (5)
2-4: Title and description updates are clear and informative.The new title clarifies the MCP-Cloud product name, and the description accurately conveys the purpose for new users.
16-24: YouTube embed is properly configured.The iframe includes proper accessibility attributes and standard YouTube embedding parameters.
26-32: Key Benefits section clearly communicates platform value.The benefits are well-articulated with appropriate links to supporting documentation. The updates provide better clarity on MCP-Cloud capabilities.
144-190: Hello World example demonstrates OpenAI LLM integration effectively.The code example clearly shows:
- Creating an MCPApp and defining a tool function
- Attaching OpenAIAugmentedLLM to an agent (aligns with PR objective)
- Using fetch and filesystem MCP servers
- Proper async/await patterns and context passing
The example is complete and runnable.
Please verify that the
Context as AppContextimport on line 150 matches the actual export frommcp_agent.core.context. The example passesapp_ctxto the Agent constructor—confirm this parameter name and usage pattern is correct in the framework.
195-195: Deployment command is consistent with the example.The
uvx mcp-agent deploy hello-worldcommand matches the app name defined in the Hello World example, providing clear guidance for users.
| Run `uvx mcp-agent deploy <app-name>` after logging in with `uvx mcp-agent login`. The CLI packages your project, provisions secrets, and exposes an MCP endpoint backed by a durable Temporal runtime. See the [Cloud quickstart](https://docs.mcp-agent.com/get-started/ | ||
| cloud) for step-by-step screenshots and CLI output. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wrap the bare URL in proper markdown link format.
The URL spanning lines 977–978 should be wrapped in markdown link syntax. A bare URL violates the markdown linting rules (MD034).
Apply this diff to fix the bare URL formatting:
- See the [Cloud quickstart](https://docs.mcp-agent.com/get-started/
- cloud) for step-by-step screenshots and CLI output.
+ See the [Cloud quickstart](https://docs.mcp-agent.com/get-started/cloud) for step-by-step screenshots and CLI output.📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| Run `uvx mcp-agent deploy <app-name>` after logging in with `uvx mcp-agent login`. The CLI packages your project, provisions secrets, and exposes an MCP endpoint backed by a durable Temporal runtime. See the [Cloud quickstart](https://docs.mcp-agent.com/get-started/ | |
| cloud) for step-by-step screenshots and CLI output. | |
| Run `uvx mcp-agent deploy <app-name>` after logging in with `uvx mcp-agent login`. The CLI packages your project, provisions secrets, and exposes an MCP endpoint backed by a durable Temporal runtime. See the [Cloud quickstart](https://docs.mcp-agent.com/get-started/cloud) for step-by-step screenshots and CLI output. |
🧰 Tools
🪛 markdownlint-cli2 (0.18.1)
977-977: Bare URL used
(MD034, no-bare-urls)
🤖 Prompt for AI Agents
In README.md around lines 977 to 978 the bare URL split across lines should be
converted into a proper Markdown link; replace the broken bare URL text with a
single inline link using [Cloud
quickstart](https://docs.mcp-agent.com/get-started/cloud) so the link is not
split across lines and conforms to MD034 linting rules.
| <p> | ||
| <a href="https://www.youtube.com/watch?v=0C4VY-3IVNU">Demo ↗</a> | | ||
| <a href="https://docs.mcp-agent.com/get-started/deploy-to-cloud">Cloud Quickstart ↗</a> | | ||
| <a href="https://docs.mcp-agent.com/get-started/cloud">Cloud Quickstart ↗</a> | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm shouldn't it point to QuickStart?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess, what's cloud quickstart?
Originally, it was quickstart with install, cloud quickstart, and quickstart, but quickstart covered both install and cloud deploy.
| title: Deploy to Cloud | ||
| sidebarTitle: "Deploy to Cloud" | ||
| description: "Publish your agent to the Cloud with the CLI." | ||
| title: "MCP-Cloud (mcp-c)" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe title should be Cloud Deployment (mcpc)?
| my_agent_cloud: | ||
| transport: sse | ||
| url: "https://<app_id>.deployments.mcp-agent.com/sse" | ||
| url: "https://<unique_id>.deployments.mcp-agent.com/sse" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why these changes? App id is the correct thing here. Unique id doesn't say much
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's actually not the app_id, it's another unique identifier that isn't used anywhere else.
…ruction for key (lastmile-ai#593) * minor updates to sequencing of docs * install including openai dependency and adding secret * updating mcp-c docs
Summary by CodeRabbit