Skip to content

Conversation

Haniehz1
Copy link
Contributor

@Haniehz1 Haniehz1 commented Sep 16, 2025

Summary by CodeRabbit

  • New Features

    • Added a single-command stock analysis tool that runs an orchestrated, quality-controlled multi-agent workflow and returns a formatted investment report as text.
  • Changes

    • Reports are printed/returned instead of saved to disk.
    • Data gathering moved to a fetch-based pipeline with explicit research→analysis→report stages.
  • Documentation

    • Added Beta deployment guide, integration tips, available-tools section, and example usage.
  • Chores

    • Removed Google Search server configuration.

Copy link

coderabbitai bot commented Sep 16, 2025

Walkthrough

Refactors the MCP Financial Analyzer into an orchestrated AugmentedLLM workflow: adds an @app.tool analyze_stock returning a text report, introduces research/evaluator/analyst/writer agents and an EvaluatorOptimizerLLM controller, wires an Orchestrator (plan_type="full") using fetch servers, removes g-search, and updates CLI to run and print the tool output.

Changes

Cohort / File(s) Summary
Workflow orchestration refactor
examples/usecases/mcp_financial_analyzer/main.py
Replaces file-based flow with an orchestrated pipeline. Adds @app.tool analyze_stock(company_name: str = "Apple") -> str. Renames app instance to unified_stock_analyzer. Introduces agents: research_agent (search_finder), research_evaluator, analyst_agent (financial_analyst), report_writer. Adds research_quality_controller (EvaluatorOptimizerLLM) and an Orchestrator (plan_type="full") using OpenAIAugmentedLLM. Switches agents to server_names=["fetch"], removes g-search usage, and changes output from saved file to returned text. Updates CLI entry to run the tool and print the result.
Config cleanup
examples/usecases/mcp_financial_analyzer/mcp_agent.config.yaml
Removes the mcp.servers.g-search entry (npx g-search-mcp); leaves other servers (fetch, filesystem) unchanged.
Documentation
examples/usecases/mcp_financial_analyzer/README.md
Removes g-search installation block; adds a Beta MCP Agent Cloud deployment guide, secret/key guidance, Claude Desktop & MCP Inspector snippets, documents analyze_stock tool and example usage. Documentation-only edits.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor User
  participant CLI as CLI (main)
  participant App as MCPApp (unified_stock_analyzer)
  participant Tool as analyze_stock
  participant Orch as Orchestrator (full)
  participant C as EvaluatorOptimizerLLM (research_quality_controller)
  participant R as research_agent (search_finder)
  participant E as research_evaluator
  participant A as analyst_agent (financial_analyst)
  participant W as report_writer

  User->>CLI: provide company name
  CLI->>App: app.run(analyze_stock, company)
  App->>Tool: invoke
  Tool->>Orch: run(task)
  Orch->>C: request quality-controlled research
  C->>R: gather data (server_names=["fetch"])
  R-->>C: research results
  C->>E: evaluate results
  E-->>C: rating + feedback
  alt rating < EXCELLENT
    C->>R: iterate with feedback
    R-->>C: improved results
    C->>E: re-evaluate
    E-->>C: rating
  end
  C-->>Orch: verified research
  Orch->>A: produce analysis
  A-->>Orch: analysis
  Orch->>W: write formatted report
  W-->>Orch: final report text
  Orch-->>Tool: report text
  Tool-->>App: return string
  App-->>CLI: result
  CLI-->>User: print report
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Suggested reviewers

  • saqadri
  • andrew-lastmile

Poem

In burrows of code I nibble and peek,
I fetch, vet, and ponder the market's streak.
Research hops, evaluator mends,
Analyst scribbles, writer sends.
A carrot of insight — the report I speak. 🐇📈

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The title succinctly and accurately describes the main purpose of the changeset: enabling MCP Agent Cloud compatibility for the financial analysis example by removing the local g-search server and switching to a fetch-based workflow, updating the config and README, and adding an orchestrated analyze_stock tool; it is specific and relevant to the changes made.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch Haniehz1-patch-12

Tip

👮 Agentic pre-merge checks are now available in preview!

Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.

  • Built-in checks – Quickly apply ready-made checks to enforce title conventions, require pull request descriptions that follow templates, validate linked issues for compliance, and more.
  • Custom agentic checks – Define your own rules using CodeRabbit’s advanced agentic capabilities to enforce organization-specific policies and workflows. For example, you can instruct CodeRabbit’s agent to verify that API documentation is updated whenever API schema files are modified in a PR. Note: Upto 5 custom checks are currently allowed during the preview period. Pricing for this feature will be announced in a few weeks.

Please see the documentation for more information.

Example:

reviews:
  pre_merge_checks:
    custom_checks:
      - name: "Undocumented Breaking Changes"
        mode: "warning"
        instructions: |
          Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).

Please share your feedback with us on this Discord post.


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 3

🧹 Nitpick comments (7)
examples/usecases/mcp_financial_analyzer/main.py (7)

409-411: Hard-coded model; parameterize for cloud deployments

Let operators set the model via environment variable.

-        result = await orchestrator.generate_str(
-            message=task, request_params=RequestParams(model="gpt-4o")
-        )
+        result = await orchestrator.generate_str(
+            message=task,
+            request_params=RequestParams(model=os.getenv("OPENAI_MODEL", "gpt-4o"))
+        )

255-256: EST is wrong half the year; make the report timestamp timezone-aware

Use zoneinfo to render ET correctly (EDT/EST).

-        **Report Date:** {datetime.now().strftime('%B %d, %Y at %I:%M %p EST')}
+        **Report Date:** {datetime.now(ZoneInfo("America/New_York")).strftime('%B %d, %Y at %I:%M %p %Z')}

Add import (see next comment).


8-17: Missing import for timezone fix

Add ZoneInfo import.

 from datetime import datetime
+from zoneinfo import ZoneInfo

34-39: Dead path prep and hidden dependency on output_path inside f-string

  • You compute timestamp/output_path but don’t write files.
  • The writer prompt still interpolates {output_path} inside an f-string (even as a “comment”), forcing that variable to exist unnecessarily.

Either drop the prompt line or make it literal, then remove the unused variables.

-    timestamp = datetime.now().strftime("%Y%m%d_%H%M%S")
-    # output_file = f"{company_name.lower().replace(' ', '_')}_report_{timestamp}.md"
-    output_path = os.path.join(OUTPUT_DIR, f"{company_name.lower().replace(' ', '_')}_report_{timestamp}.md")
+    # Note: file output disabled; results are returned/printed.
@@
-        # - Save to file: {output_path} (COMMENTED OUT - NOW PRINTING RESULTS)
+        # (File saving disabled in this example; results are returned as text.)

And remove unused globals:

-OUTPUT_DIR = "company_reports"
-COMPANY_NAME = "Apple" if len(sys.argv) <= 1 else sys.argv[1]
+# File output disabled; no OUTPUT_DIR needed.

Also applies to: 363-365


22-26: MAX_ITERATIONS defined but unused

Wire it into EvaluatorOptimizerLLM(max_refinements=MAX_ITERATIONS) (see earlier diff), or remove it.


372-385: Optional: give the Orchestrator a name for clearer logs/telemetry

Not required, but helps tracing in cloud runs.

-    orchestrator = Orchestrator(
+    orchestrator = Orchestrator(
+        name="stock_orchestrator",
         llm_factory=OpenAIAugmentedLLM,

54-115: Prompt hygiene: tighten “exact numbers” requirement to avoid hallucinated precision

Given you rely on fetch, instruct agents to quote figures verbatim with source/date and to state “not found” instead of fabricating. Consider adding “do not infer or round; copy from source” to each agent’s instruction.

If helpful, I can propose a compact set of shared prompt rules to include across agents.

Also applies to: 118-183, 194-245, 248-370

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c582491 and c35f5a2.

📒 Files selected for processing (2)
  • examples/usecases/mcp_financial_analyzer/main.py (2 hunks)
  • examples/usecases/mcp_financial_analyzer/mcp_agent.config.yaml (0 hunks)
💤 Files with no reviewable changes (1)
  • examples/usecases/mcp_financial_analyzer/mcp_agent.config.yaml
🧰 Additional context used
🧬 Code graph analysis (1)
examples/usecases/mcp_financial_analyzer/main.py (4)
src/mcp_agent/app.py (2)
  • tool (717-769)
  • run (397-420)
src/mcp_agent/agents/agent.py (1)
  • Agent (62-1162)
src/mcp_agent/workflows/evaluator_optimizer/evaluator_optimizer.py (2)
  • EvaluatorOptimizerLLM (49-478)
  • QualityRating (25-31)
src/mcp_agent/workflows/orchestrator/orchestrator.py (1)
  • Orchestrator (116-716)
🔇 Additional comments (1)
examples/usecases/mcp_financial_analyzer/main.py (1)

388-405: Task text uses controller by name; ensure it matches the component

Once you set name="research_quality_controller", this aligns. Without that, the orchestrator can’t resolve the agent.

Comment on lines +186 to +191
research_quality_controller = EvaluatorOptimizerLLM(
optimizer=research_agent,
evaluator=research_evaluator,
llm_factory=OpenAIAugmentedLLM,
min_rating=QualityRating.EXCELLENT,
)
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

Orchestrator name resolution: give the controller a stable name and wire max refinements

Your task text later refers to research_quality_controller by name, but EvaluatorOptimizerLLM here has no name. Orchestrator resolves by agent.name; this mismatch can break planning/execution. Also, you defined MAX_ITERATIONS but didn’t pass it.

 research_quality_controller = EvaluatorOptimizerLLM(
-        optimizer=research_agent,
-        evaluator=research_evaluator,
-        llm_factory=OpenAIAugmentedLLM,
-        min_rating=QualityRating.EXCELLENT,
+        optimizer=research_agent,
+        evaluator=research_evaluator,
+        llm_factory=OpenAIAugmentedLLM,
+        min_rating=QualityRating.EXCELLENT,
+        max_refinements=MAX_ITERATIONS,
+        name="research_quality_controller",
 )
📝 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.

Suggested change
research_quality_controller = EvaluatorOptimizerLLM(
optimizer=research_agent,
evaluator=research_evaluator,
llm_factory=OpenAIAugmentedLLM,
min_rating=QualityRating.EXCELLENT,
)
research_quality_controller = EvaluatorOptimizerLLM(
optimizer=research_agent,
evaluator=research_evaluator,
llm_factory=OpenAIAugmentedLLM,
min_rating=QualityRating.EXCELLENT,
max_refinements=MAX_ITERATIONS,
name="research_quality_controller",
)
🤖 Prompt for AI Agents
In examples/usecases/mcp_financial_analyzer/main.py around lines 186 to 191, the
EvaluatorOptimizerLLM instance is missing a stable name and the configured
MAX_ITERATIONS value; set the orchestrator name to "research_quality_controller"
via the name parameter and pass the MAX_ITERATIONS constant (or a properly named
max_refinements/max_iterations argument expected by EvaluatorOptimizerLLM) into
the constructor so the orchestrator can be resolved by agent.name and the max
refinement iterations are honored.

Copy link

@coderabbitai coderabbitai bot left a 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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
examples/usecases/mcp_financial_analyzer/README.md (1)

1-1: Doc inconsistency: g-search vs fetch-only cloud flow

The title and earlier setup still position this as “with Google Search” and instruct installing g-search-mcp, but the new cloud section states the agent “uses only the fetch server.” Please reconcile: either split “Local (g-search MCP)” vs “Cloud (fetch)” explicitly, or remove the g-search path if deprecated. Also consider renaming the title to drop “with Google Search.”

Example adjustments (outside changed block):

-# MCP Financial Analyzer with Google Search
+# MCP Financial Analyzer (Local and Cloud)

@@
-Install the g-search-mcp server (from https://github.com/jae-jae/g-search-mcp):
+Optional (Local mode only): Install the g-search MCP server (https://github.com/jae-jae/g-search-mcp).

Also applies to: 65-69, 103-104

🧹 Nitpick comments (4)
examples/usecases/mcp_financial_analyzer/README.md (4)

119-126: Markdown lint fixes: trailing punctuation in heading and missing language for fenced block

  • Remove trailing “:” in the heading (MD026).
  • Add a language to the following fenced block (use “text”) (MD040).
-#### For OpenAI API Key:
+#### For OpenAI API Key
-```
+```text
 Select secret type for 'openai.api_key'

---

`136-155`: **SSE config looks good; add a minor hardening note**

Config is clear and uses an env var for the bearer token. Consider adding a one-liner reminding users to scope/rotate the token and avoid committing this file.


```diff
       "env": {
         "BEARER_TOKEN": "your-mcp-agent-cloud-api-token"
       }
     }
   }
 }
+// Tip: Use a minimally-scoped token, rotate regularly, and do not commit real tokens to VCS.

176-184: Clarify data source to match “fetch-only” claim

This section says “using web search,” but prerequisites say “uses only the fetch server.” Align to avoid confusion.

-– Conducts comprehensive financial research using web search
+– Conducts comprehensive financial research using the MCP fetch server

189-191: Add language to fenced prompt block (MD040)

Specify “text” to satisfy markdownlint and improve rendering.

-```
+```text
 Please analyze Tesla's financial performance and investment outlook.

</blockquote></details>

</blockquote></details>

<details>
<summary>📜 Review details</summary>

**Configuration used**: CodeRabbit UI

**Review profile**: CHILL

**Plan**: Pro

<details>
<summary>📥 Commits</summary>

Reviewing files that changed from the base of the PR and between c35f5a21ed470e968ba5a308cfa382a37e364c06 and 790722d0292bbc61936cc963edd972f29652f5ce.

</details>

<details>
<summary>📒 Files selected for processing (1)</summary>

* `examples/usecases/mcp_financial_analyzer/README.md` (1 hunks)

</details>

<details>
<summary>🧰 Additional context used</summary>

<details>
<summary>🪛 markdownlint-cli2 (0.17.2)</summary>

<details>
<summary>examples/usecases/mcp_financial_analyzer/README.md</summary>

119-119: Trailing punctuation in heading
Punctuation: ':'

(MD026, no-trailing-punctuation)

---

120-120: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

---

189-189: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

</details>

</details>

</details>

</details>

<!-- This is an auto-generated comment by CodeRabbit for review status -->

Comment on lines +100 to +116
## `4` [Beta] Deploy to MCP Agent Cloud

### Prerequisites
This agent is already cloud-compatible with the `@app.tool` decorator and uses only the `fetch` server for web data collection.

### Step 1: Login to MCP Agent Cloud

```bash
uv run mcp-agent login
```

### Step 2: Deploy your agent

```bash
uv run mcp-agent deploy financial-analyzer
```

Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

🧩 Analysis chain

CLI commands may need verification

“uv run mcp-agent login|deploy …” looks plausible, but CLI subcommands/entrypoint names are brittle. Please confirm exact command names and flags.


🌐 Web query:

What are the current mcp-agent CLI subcommands for authentication and deployment, and example invocations (including SSE URL usage) as of September 2025?

💡 Result:

Short answer — common CLI subcommands (Sep 2025) and example invocations:

  1. agentauth-mcp (proxy for connecting MCP clients to remote MCP servers)
  • Subcommands: generate, connect.
  • Examples:
    • Generate local test credentials:
      agentauth-mcp generate. [1]
    • Connect an MCP client to a remote MCP URL with a custom header:
      agentauth-mcp connect https://api.example.com/mcp --header "API-Key:${API_KEY}".
    • Connect using AgentAuth token (set AGENTAUTH_TOKEN in env):
      AGENTAUTH_TOKEN=aa-... agentauth-mcp connect https://api.example.com/mcp. [1]
  1. Using an SSE MCP server URL directly from an MCP client / npx command (common pattern used by mcp-agent and related projects)
  • No special mcp-agent “auth” subcommand — you configure the MCP server entry to use an SSE URL (and headers) or run an npx wrapper that supplies the SSE URL.
  • Examples (mcp_agent.config.yaml / npx style):
    • npx/server invocation embedding SSE URL:
      command: "npx"
      args: ["-y","@modelcontextprotocol/server-sse","https://localhost:8000/sse"]
    • or with token header in config:
      mcp:
      servers:
      sse_server:
      transport: "sse"
      url: "https://localhost:8000/sse"
      headers:
      Authorization: "Bearer your-token"
    • Inline example used by some projects (Agent.ai style):
      args: ["-y","@modelcontextprotocol/server-sse","https://mcp.example.com/YOUR_API_TOKEN_HERE/sse"]. [2][3]
  1. mcp-agent (lastmile-ai) deployment / run commands (common usage patterns)
  • Install and run examples / deploy agent:
    • Install: pip install mcp-agent (or uv add "mcp-agent" / uv run main.py for example apps).
    • Run example app locally:
      uv run main.py
    • Expose an agent as an MCP server by configuring mcp_agent.config.yaml (see SSE/WebSocket/http transports above) and run the app to serve it. [2][3]

Notes / sources

  • agentauth-mcp (CLI: generate, connect; header support examples). [1]
  • mcp-agent docs (config examples showing SSE / headers / transports). [3]
  • Agent.ai / similar projects showing embedding SSE URL into npx args (common invocation pattern). [2]

If you want, I can produce exact copy-paste-ready CLI snippets and a sample mcp_agent.config.yaml that shows auth headers + SSE URL for your environment.


Replace inaccurate CLI examples with agentauth-mcp / SSE-config usage

File: examples/usecases/mcp_financial_analyzer/README.md (lines 100–116) — the shown commands uv run mcp-agent login and uv run mcp-agent deploy … are not standard. Replace with one of the common, copy-paste patterns below:

  • Auth (replace login):

  • SSE config (preferred inline example instead of a “login”): add in mcp_agent.config.yaml:
    mcp:
    servers:
    sse_server:
    transport: "sse"
    url: "https://localhost:8000/sse"
    headers:
    Authorization: "Bearer your-token"

  • Run/deploy (replace deploy): show install + run or service config, e.g.:
    pip install mcp-agent
    uv run main.py
    —or— explain how to expose the agent using the mcp_agent.config.yaml + run command.

🤖 Prompt for AI Agents
In examples/usecases/mcp_financial_analyzer/README.md around lines 100–116 the
README shows nonstandard CLI commands `uv run mcp-agent login` and `uv run
mcp-agent deploy …`; replace them with the suggested agentauth-mcp / SSE-config
patterns: remove the incorrect `uv run mcp-agent` examples, add an auth example
using either `agentauth-mcp connect https://mcp.example.com/sse --header
"Authorization: Bearer ${MCP_TOKEN}"` or an environment variant
`AGENTAUTH_TOKEN=aa-... agentauth-mcp connect https://mcp.example.com/sse`,
include the preferred inline mcp_agent.config.yaml SSE snippet (mcp -> servers
-> sse_server with transport/url/headers Authorization) and replace the `deploy`
example with explicit install + run instructions (e.g., pip install mcp-agent
and uv run main.py) or explain how to start the agent using the provided
mcp_agent.config.yaml so readers have a copy-pasteable auth and run workflow.

Comment on lines +187 to +188
The agent will automatically:
1. Research Tesla's current stock price, earnings, and recent news
Copy link
Contributor

Choose a reason for hiding this comment

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

There's an inconsistency in the example usage section. In line 184, the example shows analyzing Meta:

Please analyze Meta's financial performance and investment outlook.

But in line 188, it states the agent will research Tesla:

1. Research Tesla's current stock price, earnings, and recent news

The company name should be consistent between these lines - either both should reference Meta or both should reference Tesla.

Suggested change
The agent will automatically:
1. Research Tesla's current stock price, earnings, and recent news
The agent will automatically:
1. Research Meta's current stock price, earnings, and recent news

Spotted by Diamond

Fix in Graphite


Is this helpful? React 👍 or 👎 to let us know.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 4

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 790722d and 70f4174.

📒 Files selected for processing (1)
  • examples/usecases/mcp_financial_analyzer/README.md (1 hunks)
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-07-22T18:59:49.368Z
Learnt from: CR
PR: lastmile-ai/mcp-agent#0
File: examples/usecases/reliable_conversation/CLAUDE.md:0-0
Timestamp: 2025-07-22T18:59:49.368Z
Learning: Applies to examples/usecases/reliable_conversation/examples/reliable_conversation/src/**/*.py : Use mcp-agent's Agent abstraction for ALL LLM interactions, including quality evaluation, to ensure consistent tool access, logging, and error handling.

Applied to files:

  • examples/usecases/mcp_financial_analyzer/README.md
🪛 markdownlint-cli2 (0.18.1)
examples/usecases/mcp_financial_analyzer/README.md

114-114: Fenced code blocks should have a language specified

(MD040, fenced-code-language)


183-183: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

🔇 Additional comments (2)
examples/usecases/mcp_financial_analyzer/README.md (2)

101-109: Replace nonstandard CLI: “uv run mcp-agent login/deploy” are likely incorrect

Use AgentAuth or SSE config patterns instead (keep it copy‑pasteable). See prior reviewer’s note; please update accordingly.

Proposed replacements:

# Step 1: Authenticate/connect (example)
agentauth-mcp connect https://[your-agent-server-id].deployments.mcp-agent.com/sse --header "Authorization: Bearer ${MCP_TOKEN}"
# Or with env:
AGENTAUTH_TOKEN=aa-... agentauth-mcp connect https://[your-agent-server-id].deployments.mcp-agent.com/sse

Optionally add the SSE server config in your MCP client:

mcp:
  servers:
    cloud_agent:
      transport: sse
      url: https://[your-agent-server-id].deployments.mcp-agent.com/sse
      headers:
        Authorization: Bearer ${MCP_TOKEN}

To confirm the correct CLI and flags, run this web query:

What are the current mcp-agent CLI subcommands for authentication and deployment, and example invocations (including SSE URL usage) as of September 2025?

132-149: Replace mcp-remote with the official @modelcontextprotocol/server-sse (security advisory)

mcp-remote is a community CLI/proxy and has a 2025 OS command-injection advisory — switch to npx @modelcontextprotocol/server-sse, or if you must keep mcp-remote, pin, audit, and document mitigations.

File: examples/usecases/mcp_financial_analyzer/README.md lines 132-149

       "financial-analyzer": {
         "command": "/path/to/npx",
         "args": [
-        "mcp-remote",
-        "https://[your-agent-server-id].deployments.mcp-agent.com/sse",
-        "--header",
-        "Authorization: Bearer ${BEARER_TOKEN}"
+        "-y",
+        "@modelcontextprotocol/server-sse",
+        "https://[your-agent-server-id].deployments.mcp-agent.com/sse",
+        "--header",
+        "Authorization: Bearer ${BEARER_TOKEN}"
         ],
         "env": {
           "BEARER_TOKEN": "your-mcp-agent-cloud-api-token"
         }
       }

Comment on lines +114 to +118
```
Select secret type for 'openai.api_key'
1: Deployment Secret: The secret value will be stored securely and accessible to the deployed application runtime.
2: User Secret: No secret value will be stored. The 'configure' command must be used to create a configured application with this secret.
```
Copy link

Choose a reason for hiding this comment

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

🧹 Nitpick

Add language to fenced code block (markdownlint MD040)

Specify a language for linting/renderers.

-```
+```text
 Select secret type for 'openai.api_key'
🧰 Tools
🪛 markdownlint-cli2 (0.18.1)

114-114: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

🤖 Prompt for AI Agents
examples/usecases/mcp_financial_analyzer/README.md around lines 114 to 118, the
fenced code block lacks a language specifier which triggers markdownlint MD040;
update the opening fence to include a language token (for example "text" or
"console") so it becomes ```text (or ```console) and leave the block contents
unchanged to satisfy linters and improve renderer behavior.

Comment on lines +170 to +178
### Available Tools

Once deployed, your agent will expose the `analyze_stock` tool, which:
- Takes a company name as input (e.g., "Apple", "Microsoft")
- Conducts comprehensive financial research using web search
- Performs quality evaluation and improvement loops to ensure data accuracy
- Generates professional investment analysis with bull/bear cases
- Returns a complete financial report as formatted text

Copy link

Choose a reason for hiding this comment

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

🧹 Nitpick

Align wording: “web search” → “MCP fetch”

Prerequisites state only the fetch server is used. Adjust for consistency.

- - Conducts comprehensive financial research using web search
+ - Conducts comprehensive financial research using the MCP fetch server (HTTP retrieval)
📝 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.

Suggested change
### Available Tools
Once deployed, your agent will expose the `analyze_stock` tool, which:
- Takes a company name as input (e.g., "Apple", "Microsoft")
- Conducts comprehensive financial research using web search
- Performs quality evaluation and improvement loops to ensure data accuracy
- Generates professional investment analysis with bull/bear cases
- Returns a complete financial report as formatted text
### Available Tools
Once deployed, your agent will expose the `analyze_stock` tool, which:
- Takes a company name as input (e.g., "Apple", "Microsoft")
- Conducts comprehensive financial research using the MCP fetch server (HTTP retrieval)
- Performs quality evaluation and improvement loops to ensure data accuracy
- Generates professional investment analysis with bull/bear cases
- Returns a complete financial report as formatted text
🤖 Prompt for AI Agents
In examples/usecases/mcp_financial_analyzer/README.md around lines 170 to 178,
the tool description incorrectly says it "Conducts comprehensive financial
research using web search" while the prerequisites and architecture use the MCP
fetch server; change the phrase "web search" to "MCP fetch" (or "MCP fetch
server") for consistency and, if there is a prerequisites section elsewhere,
ensure it explicitly mentions the MCP fetch server as the data source so wording
is consistent across the README.

Comment on lines +183 to +186
```
Please analyze Meta's financial performance and investment outlook.
```

Copy link

Choose a reason for hiding this comment

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

🧹 Nitpick

Add language to fenced code block (markdownlint MD040)

Mark the example as text.

-```
+```text
 Please analyze Meta's financial performance and investment outlook.
🧰 Tools
🪛 markdownlint-cli2 (0.18.1)

183-183: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

🤖 Prompt for AI Agents
In examples/usecases/mcp_financial_analyzer/README.md around lines 183 to 186
the fenced code block lacks a language specifier causing markdownlint MD040;
update the fence to include a language (e.g., "text") so it reads ```text before
the content and ``` after to mark the example as plain text.

Comment on lines +187 to +191
The agent will automatically:
1. Research Tesla's current stock price, earnings, and recent news
2. Evaluate data quality and improve if needed
3. Analyze the financial data for investment insights
4. Generate a comprehensive report with recommendations
Copy link

Choose a reason for hiding this comment

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

🧹 Nitpick

Fix entity mismatch: Tesla vs Meta

The narrative should match the Meta prompt above.

-1. Research Tesla's current stock price, earnings, and recent news
+1. Research Meta's current stock price, earnings, and recent news
📝 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.

Suggested change
The agent will automatically:
1. Research Tesla's current stock price, earnings, and recent news
2. Evaluate data quality and improve if needed
3. Analyze the financial data for investment insights
4. Generate a comprehensive report with recommendations
The agent will automatically:
1. Research Meta's current stock price, earnings, and recent news
2. Evaluate data quality and improve if needed
3. Analyze the financial data for investment insights
4. Generate a comprehensive report with recommendations
🤖 Prompt for AI Agents
In examples/usecases/mcp_financial_analyzer/README.md around lines 187 to 191,
the step list references "Tesla" but must match the Meta prompt; replace "Tesla"
with "Meta" and ensure any related phrasing (e.g., stock price, earnings, recent
news) consistently refers to Meta across the four bullets so the narrative
matches the prompt above.

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.

1 participant