Skip to content

MCP Server Documentation#8

Open
Baldur-Hua-ai20labs wants to merge 5 commits into
zerogpu:mainfrom
Baldur-Hua-ai20labs:mcp-server-doc
Open

MCP Server Documentation#8
Baldur-Hua-ai20labs wants to merge 5 commits into
zerogpu:mainfrom
Baldur-Hua-ai20labs:mcp-server-doc

Conversation

@Baldur-Hua-ai20labs

@Baldur-Hua-ai20labs Baldur-Hua-ai20labs commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds ZeroGPU MCP integration documentation.

Details

  • Discovered all available MCP tools dynamically via the ZeroGPU MCP endpoint
  • Documented 11 tools with descriptions, parameters, and examples
  • Added authentication and connection examples using placeholders
  • Included a worked example for the summarize tool
  • Integrated page into navigation and docs.json

Notes

  • Tool definitions were retrieved and validated via live MCP calls
  • No credentials are included in the documentation

jira

Summary

Adds a cookbook demonstrating how to combine ZeroGPU's IAB classifier with Claude to generate targeted marketing copy from raw content.

Details

  • Uses zlm-v1-iab-classify-edge to extract:
    • IAB categories
    • audience segments
    • confidence scores
  • Demonstrates a full pipeline:
    • classification → generation → multi-format output
  • Includes a copy-pasteable user prompt with no hidden steps
  • Shows three distinct outputs:
    • Ad Brief
    • Newsletter Blurb
    • Content Pitch
  • Provides annotated code with clear integration points for:
    • content ingestion (RSS, CMS, scraper)
    • output routing (ads, email, CMS)
  • Adds "Go deeper" section for monetization and personalization pipelines

Notes

  • Example outputs explicitly use classification signals
  • No credentials included in the documentation
  • Page follows cookbook skill format and is integrated into navigation

jira

Summary by CodeRabbit

  • New Features

    • Added an “MCP Server” integration card linking to new MCP documentation.
    • Added a new cookbook recipe for turning content into targeted Claude copy using IAB classification (Ad Brief, Newsletter Blurb, Content Pitch).
  • Documentation

    • Extended docs navigation to include the MCP integration and the new targeted-copy cookbook entry.
    • Published an MCP guide covering streamable HTTP connection, required headers, MCP handshake/session flow, available zerogpu_* tools, worked examples, and troubleshooting.

@coderabbitai

coderabbitai Bot commented Jun 15, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: e9eb8273-6644-4e99-90f6-b6cf7fa9f900

📥 Commits

Reviewing files that changed from the base of the PR and between d273616 and 0b67646.

📒 Files selected for processing (1)
  • cookbook/claude-iab-targeted-copy.mdx
✅ Files skipped from review due to trivial changes (1)
  • cookbook/claude-iab-targeted-copy.mdx

📝 Walkthrough

Walkthrough

Adds two new documentation artifacts: an MCP Server integration page (integrations/mcp.mdx) covering auth, 11 zerogpu_* tools, worked examples, and troubleshooting; and a Claude IAB targeted copy cookbook recipe (cookbook/claude-iab-targeted-copy.mdx) demonstrating a pipeline combining ZeroGPU's classifier with Claude tool use. Both are registered in navigation and linked from their respective index pages.

Changes

MCP Server Integration Documentation

Layer / File(s) Summary
Navigation registration and index card
docs.json, integrations/index.mdx
Inserts integrations/mcp into the Integrations nav group and adds an MCP Server <Card> (with icon and description) to the Editor & Agent Integrations <CardGroup>.
Page frontmatter, intro, and authentication setup
integrations/mcp.mdx
Defines MDX frontmatter, introductory MCP/ZeroGPU positioning, Overview section with video placeholder, prerequisites, steps to obtain an API key and project ID, and remote server header configuration with a Claude Code example.
First request walkthrough and tool conventions
integrations/mcp.mdx
Documents the curl-based initialize/mcp-session-id flow and zerogpu_health check with an example response shape; introduces MCP tool naming, arguments object, and auto-invocation conventions.
Full zerogpu_* tool catalog
integrations/mcp.mdx
Documents all 11 zerogpu_* tools (zerogpu_health, zerogpu_summarize, zerogpu_classify_iab, zerogpu_classify_zero_shot, zerogpu_classify_structured, zerogpu_extract_entities, zerogpu_extract_json, zerogpu_redact_pii, zerogpu_extract_pii, zerogpu_generate_followups, zerogpu_chat), each with required/optional arguments and output shape.
Worked example, patterns, reference table, troubleshooting, and conclusion
integrations/mcp.mdx
Provides a worked zerogpu_summarize example, usage/savings output description, patterns and recipes, a consolidated tool reference table, troubleshooting for common HTTP/session/tool errors, and a conclusion <CardGroup> linking to Model Catalog, API Reference, Cookbook, and Discord.

Claude IAB Targeted Copy Cookbook Recipe

Layer / File(s) Summary
Navigation registration and cookbook card
docs.json, cookbook/index.mdx
Adds cookbook/langchain-resume-screening and cookbook/claude-iab-targeted-copy entries to Cookbook navigation; inserts a new recipe Card in the integrations/plugins <CardGroup> of the cookbook homepage.
Recipe intro, installation, and environment setup
cookbook/claude-iab-targeted-copy.mdx
Introduces the end-to-end pipeline combining ZeroGPU's IAB classifier with Claude to generate Ad Brief, Newsletter Blurb, and Content Pitch outputs from raw article content; documents installation and environment variables for ZeroGPU and Anthropic APIs.
ZeroGPU classification helper function
cookbook/claude-iab-targeted-copy.mdx
Implements classify_iab(content) helper that sends article text to ZeroGPU's IAB classifier endpoint, validates HTTP response, and returns JSON classification signals; includes example input/output payloads.
Claude tool-use integration and generate_copy function
cookbook/claude-iab-targeted-copy.mdx
Defines system prompt requiring Claude to call classify_iab and generate three outputs using returned category/segment/score signals; introduces CLASSIFY_TOOL definition and implements generate_copy(article) function with tool-use loop that executes classification, appends results to history, and returns both signals and final text; includes full worked example.
Helper functions, routing patterns, and conclusion
cookbook/claude-iab-targeted-copy.mdx
Adds parse_outputs(text) to split Claude's response into labeled sections and run_pipeline(article) orchestration function; provides confidence-threshold routing snippet for conditional content routing; concludes with extensions (metadata, personalization, batching, Batch API) and component highlights.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

  • zerogpu/docs#4: Both PRs update docs.json navigation and cookbook homepage by adding new MDX recipe cards; retrieved PR adds LangChain resume screening recipe while this PR adds Claude IAB targeted copy recipe.

Poem

🐇 Hoppity-hop, the MCP tools arrive with flair,
Eleven zerogpu_* friends beyond compare!
Claude and IAB blend in cookbook delight,
Authentication headers, classification tight.
The rabbit hops through docs with a joyful bounce—
Two new features that make your inference pounce! 🚀

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Title check ⚠️ Warning The title 'MCP Server Documentation' is partially related to the changeset but does not reflect the main scope of changes, which includes both MCP Server documentation and an IAB Classifier cookbook recipe. Update the title to reflect both major additions, such as 'Add MCP Server documentation and IAB classifier cookbook' to accurately represent the complete changeset.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs.json`:
- Around line 104-107: The integrations entries in docs.json are not in
alphabetical order by slug. Reorder the entries following integrations/index so
they appear in alphabetical sequence: integrations/claude-code-plugin should
come first, followed by integrations/langchain, then integrations/mcp. This
ensures the nav group maintains the documented alphabetical ordering rule for
integration slugs after the index entry.

In `@integrations/mcp.mdx`:
- Around line 11-19: The integration page is missing the required `## Cookbook`
section that should be included in all integration pages according to the
template guidelines. Add a `## Cookbook` section after the `## Overview` section
in the integrations/mcp.mdx file. Include the heading and add the placeholder
text "Cookbook coming soon." as the content, following the standard integration
page structure even when the cookbook content is not yet available.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 6530e6da-1217-41f0-b4b7-07e9e3318157

📥 Commits

Reviewing files that changed from the base of the PR and between c8215ea and 598d1a8.

📒 Files selected for processing (3)
  • docs.json
  • integrations/index.mdx
  • integrations/mcp.mdx

Comment thread docs.json Outdated
Comment thread integrations/mcp.mdx

@amaan-ai20 amaan-ai20 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Please make the following changes, and re-request view once, cookbook and everything are in place.

Comment thread integrations/mcp.mdx
}
}
}
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Show how it's created on Claude Desktop. Show, the location of the file as well where to save this. Mention it in the docs

Comment thread integrations/mcp.mdx
"price_table_version": "2026-05-26-2"
}
}
```

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Use longer text so that, we can show how summary model works.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@cookbook/claude-iab-targeted-copy.mdx`:
- Around line 72-84: The requests.post() call to the ZeroGPU API endpoint at
"https://api.zerogpu.ai/v1/responses" lacks a timeout parameter, which can cause
indefinite hangs on network issues. Add a timeout parameter to the
requests.post() call with an appropriate duration (e.g., 30 seconds) to prevent
the notebook from becoming stuck during transient network problems.
- Around line 208-233: The while True loop in the message creation flow has no
iteration limit, allowing it to run indefinitely if the model continues
returning "tool_use" as the stop reason. Add an iteration counter before the
loop (initialized to a starting value), increment it at the beginning of each
iteration, and add a break condition that exits the loop when the counter
reaches a reasonable maximum threshold (such as 10) to prevent runaway retries
and cost overruns. This bounds the loop in the section that calls
client.messages.create() and processes resp.stop_reason.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 85ec67b5-f7b5-4883-b1c6-bda41a71b898

📥 Commits

Reviewing files that changed from the base of the PR and between 598d1a8 and d273616.

📒 Files selected for processing (3)
  • cookbook/claude-iab-targeted-copy.mdx
  • cookbook/index.mdx
  • docs.json
✅ Files skipped from review due to trivial changes (2)
  • cookbook/index.mdx
  • docs.json

Comment thread cookbook/claude-iab-targeted-copy.mdx
Comment thread cookbook/claude-iab-targeted-copy.mdx Outdated
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