agentleFS
BenPremBenPrem/business-brain/.claude/skills/mcp-integration/SKILL.md

mcp-integration

Skill1 starsChanged 3 months agoMITView on GitHub

Connect an MCP server into your agent surfaces — interactive Claude Code sessions and/or a headless always-on automation box. Triggers on "connect <service>", "add <service> MCP", "wire up <tool>" (task system, email, analytics, chat, GitHub, etc.). Runs the auth decision tree, audits + version-pins community packages, and enforces the verify-through-a-real-call gate. NOT for using an already-connected MCP or building a new server from scratch.

  • Reads credentials

25 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use results-report, daily-coding and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • Galaxy-DawnSkill

    results-report

    This skill should be used when the user asks to "write an experiment report", "summarize experimental results", "do experiment retrospection", "write a results report", "写实验总结报告", "写实验复盘", or mentions turning completed experiment artifacts into a structured, decision-oriented research report. It assumes strict analysis should come from `results-analysis` first.

    Also in 3 projects that use this

  • Clay-HHKSkill

    daily-coding

    Daily coding assistant that auto-triggers when writing/modifying code, providing a core checklist.

    Also in 3 projects that use this

  • Clay-HHKSkill

    kaggle-learner

    This skill should be used when the user asks to "learn from Kaggle", "study Kaggle solutions", "analyze Kaggle competitions", or mentions Kaggle competition URLs. Provides access to extracted knowledge from winning Kaggle solutions across NLP, CV, time series, tabular, and multimodal domains.

    Also in 3 projects that use this

  • kharlamenkodevSkill

    bug-detective

    Also in 3 projects that use this

  • indranilbanerjeeSkill

    review-response

    Draft a reply to one customer review, voice-scored, with escalation flags. \"reply to this 1-star review\"

    Also in 3 projects that use this

  • Google CloudSkill

    citation-verification

    Verify that citations in a document resolve to real records and that claimed titles match. Use before trusting a document's reference list.

    Also in 3 projects that use this

  • +2 more from Clay-HHK

The file

We split this skill into the rules it gives an agent

4 rules. 0 are common, 3 are distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 24 edited versions we read keep these.

  • 3

    Distinctive

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Before trusting any package with a credential:

    line 33
  2. Distinctive:

    Never paste a secret into chat or onto a bare command line (history persists).

    line 40
  3. Distinctive:

    After install, run whatever dependency/vulnerability scan your stack has.

    line 41
  4. Very specific:

    Write/update a memory or reference note per service (reference_<service>_mcp.md): endpoint, auth path, package + pinned version, gotchas …

    line 78

“Common” is measured: kept by at least 6 in 10 of the 24 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

MCP Integration

Wire an external service into the agent stack. Two kinds of surface:

  • Interactive — Claude Code on your main machine; a human is present to click through browser auth.
  • Headless — an always-on automation box or scheduled agent; nobody is there to re-authenticate.

Step 1 — Ask which surface(s)

Interactive only, headless only, or both. Confirm — don't assume.

Step 2 — The auth decision tree

Research the service's MCP offering (WebSearch/WebFetch its docs) and classify:

Service offers…Path
stdio server (npm/pip) taking a token/API key via env varPreferred, especially for headless. No browser, survives reboots, revocable.
remote OAuth server with dynamic client registration (DCR)Native OAuth: claude mcp add --transport http <name> <url>, then authenticate via /mcp.
remote OAuth server without DCRInteractive: register a dev app, pass --client-id/--client-secret --callback-port. Headless: avoid browser-OAuth entirely — find a stdio + token community server instead.

Headless doctrine: for any unattended box, prefer stdio + long-lived token over browser-OAuth frameworks. A server that needs browser re-auth, pairing, or human approval on an unattended machine is a liability — it WILL silently die at the worst time. If the only official option is browser-OAuth, look for a token-based community server (then run Step 3 hard) or skip the integration.

Step 3 — Security gate (mandatory for community packages)

Before trusting any package with a credential:

  1. Audit: npm view <pkg> (maintainer, last publish, weekly downloads); GitHub stars + last commit; read its dependencies for anything hallucinated, typosquatted, or suspicious.
  2. Pin the version — install @x.y.z, never @latest. An auto-updating package holding your credentials is a supply-chain hole.
  3. Least-privilege credential — scoped, revocable, treated like a password. Never paste a secret into chat or onto a bare command line (history persists).
  4. After install, run whatever dependency/vulnerability scan your stack has; report findings and distinguish pre-existing issues from ones the new package introduced.

Step 4 — Install

Interactive (Claude Code):

claude mcp add --transport http --scope user <name> <url>            # DCR OAuth
# or, no-DCR OAuth:
claude mcp add --transport http --scope user --client-id <ID> --client-secret --callback-port 8080 <name> <url>
# or, stdio + token:
claude mcp add <name> -e TOKEN_VAR=<value-from-.env> -- npx <pkg>@<pinned-version>

Then authenticate via /mcp in the session. Two gotchas:

  • Programmatic auth tools that attempt DCR fail on no-DCR servers — use manual /mcp.
  • Tools load only in a session started AFTER auth — fully restart the app.

Headless box: install the stdio server globally with the pinned version, register it with your agent's MCP config using the absolute binary path, and set the real token in the env — a placeholder left in config gets passed literally and fails silently.

Step 5 — THE VERIFICATION GATE (non-negotiable)

"Connected, N tools discovered" ≠ authenticated. Tool discovery is static schema exchange; authentication is only exercised by a real call.

  • mcp list / connection tests confirm wiring, NOT auth.
  • Done = a tool call returns real, recognizable data — a workspace list showing YOUR workspace name, a record you know exists, a message that actually arrives.
  • A config file with a surviving placeholder string will still report "connected." Grep configs for placeholder patterns after setup.
  • Until a real call succeeds, the status is "configured, pending live verification" — never "done", "live", or "shipped."

Step 6 — Record it

Write/update a memory or reference note per service (reference_<service>_mcp.md): endpoint, auth path, package + pinned version, gotchas hit, and the verified-live data point (what call, what data came back, date). Also update the "Tools Connected" list in CLAUDE.md — honestly.

Gotchas (learned the hard way)

  • OAuth-based servers on headless boxes break on token expiry with no one to fix them — this is why the decision tree exists.
  • Extras/plugins for an agent framework can silently downgrade pinned shared dependencies — watch the process on restart after installing.
  • Service managers behave differently over SSH than at the console — manage the agent via its own CLI, not the OS service layer.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.