mcp-integration
Integrate with the Model Context Protocol — its primitives (tools, resources, prompts), transports, auth, and debugging. Use when connecting agents to external data and capabilities through this open protocol.
- License 许可
- MIT
- 最近更新
- 2026-11-07
- Stars
- ★ 0
- Forks
- 1
01 前言 Front Matter
- name
- mcp-integration
- category
- ai-research
- description
- Integrate with the Model Context Protocol — its primitives (tools, resources, prompts), transports, auth, and debugging. Use when connecting agents to external data and capabilities through this open protocol.
03 SKILL.md 正文
Model Context Protocol (MCP) Integration
MCP is an open protocol for connecting AI agents to external capabilities: a standard way for "servers" to expose tools, data, and prompts that any compliant client can use. Learn the primitives once, integrate with anything.
Overview
MCP separates concerns: servers expose capabilities; clients (agents, apps) consume them; the protocol defines how they talk. A server offers three primitives — tools (actions the model can invoke), resources (data the model can read), and prompts (reusable prompt templates). Transports carry the messages (stdio for local, HTTP-based for remote). Because it's a standard, one client works with many servers, and capabilities compose without custom glue code per integration.
When to use
- Giving an agent access to external systems (files, databases, APIs, services) through a standard interface.
- Building a server that exposes your system's capabilities to any MCP-compatible agent.
- Choosing between a custom integration and a protocol-based one (prefer the protocol when clients vary).
- Debugging a misbehaving MCP connection: handshake, capability, or transport issues.
Core concepts
- Tools: executable functions a server exposes — with names, descriptions, and input schemas. The model's action interface. Design them like good APIs: narrow, typed, documented.
- Resources: readable data — files, records, query results — exposed at URIs the model can fetch. The model's read interface; separate from tools because reading isn't acting.
- Prompts: server-defined prompt templates with parameters. Let servers ship best-practice prompts for their own domain.
- Transports: stdio (server as a subprocess — simple, local) vs. networked HTTP transports (remote servers, multi-client). Choose by deployment: local tools → stdio; shared services → networked.
- Capability negotiation: client and server agree on what's supported at handshake. Check negotiated capabilities before assuming a feature exists.
- Auth: networked servers need authentication — tokens, OAuth flows — scoped to least privilege. Never put credentials in the protocol messages themselves beyond the auth layer.
Practical workflow
- Decide: consume or provide? Consuming = configure a client with server endpoints. Providing = implement the three primitives for your system.
- As a consumer: configure servers, verify the handshake, list exposed tools/resources, and test each tool standalone before agent use.
- As a provider: expose tools with clean schemas, resources with sensible URIs, and prompts for your common workflows. Start with read-only.
- Test the round trip: client lists capabilities → invokes tool → reads resource → uses prompt. Verify each primitive independently.
- Harden: auth on networked servers, input validation on tools, rate limits, and logging of every invocation.
- Debug systematically: transport up? handshake complete? capabilities negotiated? tool schema valid? — in that order.
Integration checklist:
[ ] Transport chosen (local stdio vs networked) and working
[ ] Handshake + capability negotiation verified
[ ] Tools listed, schemas inspected, each tested standalone
[ ] Resources readable at their URIs
[ ] Auth configured with least-privilege scopes (networked)
[ ] Invocation logging enabled
Common pitfalls
- Assuming capabilities: calling a tool the server didn't advertise. Always list and verify after handshake.
- No auth on networked servers: exposing tools over the network without authentication. Treat it like any public API.
- Tools that are too broad: one tool that does everything defeats the protocol's composability. Keep tools narrow.
- Skipping standalone tests: wiring an untested server into an agent and debugging both at once. Test the server alone first.
- Credential leakage: embedding secrets in configs checked into repos. Use env vars and secret stores.
- No versioning: changing tool schemas without versioning breaks clients. Version your server's interface.
04 同仓库更多 Skills
web-scrape
Turn web pages into LLM-ready markdown via the Firecrawl API (renders JS, anti-bot handling). Use when browser_open/fetch fails on JS-heavy pages, or when you need clean markdown/structured extraction from a site. Requires FIRECRAWL_API_KEY.
design-taste-frontend
tasteskill v2, the anti-slop frontend skill. Art direction for websites, distilled from a study of 247 curated gallery sites (One Page Love, Awwwards Sites of the Day). Deals researched directions (idea, composition, type, palette, photographs, section blueprints) from a library, enforces a strict no-slop house style with a real-browser inspector, and runs a look-and-fix loop on screenshots. Use this whenever you build, design, redesign, restyle, polish or review a landing page, marketing site, portfolio, product page, one-pager, hero or any public-facing web page, in any stack (HTML/CSS, React, Next.js, Vue, Svelte, Astro, Tailwind) — also when the user says a page looks generic, templated, "AI-made", sloppy, or asks to make it look designed, premium, award-level or less like every other site. Not for dashboards or app screens.
test-driven-development
Use when implementing any feature or bugfix, before writing implementation code
systematic-debugging
Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes
requesting-code-review
Use when completing tasks, implementing major features, or before merging to verify work meets requirements
brainstorming
You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation).