Author an MCP driver (AIP-32)
Use when wrapping an MCP server (local or remote) as a conformant driver for AIP-14 TOOL contracts. The skill produces a frontmatter-only DRIVER.md when standard MCP dispatch suffices.
Process
- Identity: pick
idending in-mcp, setname,description,version,kind: mcp. - Server location: declare
serverperkind:npm—package+argsdocker—image+env(with${secrets.X}substitutions)binary—path+argsremote—url
- Transport:
stdiofor local subprocess,ssefor streaming remote,httpfor request-response remote. - Connect once (during authoring) and run
tools/listto discover available MCP tool names. - Map TOOLs: for each contract-to-implement, pick the matching
MCP tool name. Author
metadata.mcp.tool_name,argument_mapping(when contract input keys differ from MCP arg names),result_extract(when MCP response wraps the contract output). - Auth: if the server needs secrets, declare in
auth.ref→ sibling SECRETS.md, withauth.state.envlisting required env vars. For local servers, secrets are passed viaserver.env. For remote servers, auth is HTTP-style. - Sandbox:
network.egressfor remote,[]for local.policy_tags(self-hosted, third-party-api). - Optional integration: declare
prompts[]for skill_block integration andresources[]for ref_kind integration. - Validate against
MCP.schema.jsonANDDRIVER.schema.json. - Wire:
loadProvider(...); the runtime spawns/connects on first call, lists tools, validates declaredtool_names exist.
Common mistakes
- Hardcoded paths in stdio servers — vendored binaries are
workspace-relative; document this in
server.path. - Missing
tool_namevalidation — server-supplied schemas must match the contract; mismatches MUST fail at registration, not at first call. - Long-lived stdio process leaking tenant state — pass tenant
context in
tools/call.arguments, never bind at spawn. - Remote MCP without TLS — refuse
http://URLs in production.