Git-Fg

integrating-mcp

"Provides comprehensive MCP integration guidance for Claude Code plugins. MUST Use when integrating databases via MCP, setting up MCP servers, or configuring connections. Do not use for API integration, web services, or general database access."

Git-Fg 1 Updated 4mo ago

Resources

2
GitHub

Install

npx skillscat add git-fg/thecattoolkit/integrating-mcp

Install via the SkillsCat registry.

SKILL.md

MCP Integration for Claude Code Plugins

Integrate external services into Claude Code plugins using Model Context Protocol (MCP). MCP servers provide secure, structured access to databases, APIs, and other services through a standardized interface.

1. Code Execution Pattern (Recommended)

Instead of direct tool calls, expose code APIs rather than tool call definitions:

{
  "mcpServers": {
    "code-exec": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-code-exec"],
      "env": {
        "SANDBOX_PATH": "/tmp/sandbox"
      }
    }
  }
}

Benefits:

  • Give Claude a sandbox execution environment with filesystem
  • Let Claude write code to make tool calls
  • Elegant, prompt-on-demand pattern (similar to skills)
  • Reduces token overhead

2. Selective Tool Exposure

Only expose essential tools:

{
  "mcpServers": {
    "minimal-db": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-postgres"],
      "env": {
        "MCP_TOOLS": "query,schema"
      }
    }
  }
}

3. Connection Management

  • Pool connections to reuse
  • Lazy load servers only when needed
  • Disconnect inactive servers

Database Integration

Quick Reference

1. Choose Database Type and Configure

  • PostgreSQL: @modelcontextprotocol/server-postgres
  • MySQL: @modelcontextprotocol/server-mysql
  • SQLite: @modelcontextprotocol/server-sqlite

2. Set Environment Variables

export POSTGRES_URL="postgresql://user:pass@host:5432/db?sslmode=require"

3. Add to settings.json

{
  "mcpServers": {
    "postgres": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-postgres", "${POSTGRES_URL}"]
    }
  }
}


Resources

References

Examples