agentsclimarketplace

Anthropic mcp

Skill 0xgetz/xi-agent-skills/mcp-skills/anthropic-mcp

Skills and connected MCP server documentation exported from my agent.

Install
npx -y skills add 0xgetz/xi-agent-skills --skill anthropic-mcp

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

2 things to look at

  • no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
  • 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its author says it does

Copied from the file, not written here

Use the Anthropic MCP integration to call Claude models for completions. Activate when the user wants to call Claude models for completions via Anthropic, including discovering the right tool, building parameters, and handling results.

SKILL.md

4.3 KB, as published. Nobody here has run it

Anthropic MCP Integration

Overview

This skill covers working with the Anthropic integration via the MCPClient from lib.gumloop_mcp. The MCPClient wraps the Gumloop MCP transport layer with automatic retries, error handling, and typed responses. Use it for all Anthropic Claude API operations.

When to use this skill

Activate when the user wants to query, create, update, or manage Anthropic Claude API using the Gumloop MCP connection to anthropic.

Client Setup

from lib.gumloop_mcp import MCPClient

client = MCPClient()
# The client auto-resolves credentials from the agent's connected integrations.
# No API keys or tokens to configure manually.

Error Handling & Retries

All MCP calls should use this pattern:

def safe_call(client, server, tool, params, max_retries=3):
    """Call an MCP tool with retry and error handling."""
    import time
    for attempt in range(max_retries):
        try:
            result = client.call(server, tool, params)
            error = getattr(result, 'error', None)
            if error:
                if attempt < max_retries - 1:
                    time.sleep(2 ** attempt)
                    continue
                raise RuntimeError('MCP call failed: ' + str(error))
            return result
        except Exception as exc:
            if attempt < max_retries - 1:
                time.sleep(2 ** attempt)
                continue
            raise

GET-First Pattern

Always read the current state before modifying:

# Fetch current state first with retry
current = safe_call(client, 'anthropic', 'list_models', 'list_models', {})
print('Current state:', current)

Read Operations

from lib.gumloop_mcp import MCPClient

client = MCPClient()

# Fetch data with retry
result = safe_call(client, 'anthropic', 'list_models', 'list_models', {})
print('Result:', result)

Write Operations

Always read the current state first (GET-first) before modifying. For destructive operations, call confirm_destructive() or await_confirm() first.

from lib.gumloop_mcp import MCPClient

client = MCPClient()

# Read current state first
current = safe_call(client, 'anthropic', 'list_models', 'list_models', {})
print('Current state:', current)

# Now create/update
result = safe_call(client, 'anthropic', 'create_message', 'create_message', {'model': 'claude-3-opus-20240229', 'max_tokens': 1024, 'messages': [{'role': 'user', 'content': 'Write a poem about AI'}]})
print('Write completed:', result)

Artificial API / REST Fallback

If the native Gumloop anthropic connection is unavailable, fall back to the raw REST API:

import os
import requests

# Get API key from bound secrets
api_key = os.environ.get('FALLBACK_API_KEY')
if not api_key:
    raise RuntimeError('Missing FALLBACK_API_KEY - use bind_env_vars first')

# Call the native REST API directly
response = requests.get(
    'https://docs.anthropic.com/',
    headers={'Authorization': 'Bearer ' + api_key, 'Accept': 'application/json'}
)
response.raise_for_status()
data = response.json()

Safety Notes

  • Always read first before modifying any resource (GET-first pattern).
  • Confirm destructive operations: deletes, destroys, removals, and any irreversible actions must be confirmed with the user.
  • Never log credentials: MCPClient handles auth transparently. Do not print or log secrets.
  • Respect rate limits: Use the retry pattern above. Back off exponentially on 429 responses.
  • Paginate large sets: Use limit, page, or cursor parameters where available.
  • Idempotency: Write/create calls should be idempotent when possible to avoid duplicates on retry.

API Documentation

  • Service: anthropic
  • MCPClient docs: Gumloop MCP SDK
  • Native API reference: https://docs.anthropic.com/
  • Tool discovery: Use safe_call(client, 'anthropic', 'tool_discovery', {}) to list available tools at runtime.

This skill is part of the Gumloop MCP integration suite. Tool names and schemas vary by deployment. Always rely on live discovery, not assumptions.

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.