mcp-integration

Implement and consume Model Context Protocol servers with typed tool schemas and transports.

15|3|Updated Jul 9, 2026
One-click install
npx skills add https://github.com/kiurakku/cursor-kit-for-ai --skill mcp-integration-kiurakku
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: mcp-integration
Source: https://github.com/kiurakku/cursor-kit-for-ai/tree/main/plugins/integrations/skills/mcp-integration
Command: npx skills add https://github.com/kiurakku/cursor-kit-for-ai --skill mcp-integration-kiurakku

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires @modelcontextprotocol/sdk, zod.

What problem does it solve? Connecting AI agents to external APIs, databases, and filesystems requires a consistent protocol; ad-hoc integrations produce untyped tools, broken auth flows, and unhelpful errors that agents cannot recover from. ## Core Features & Use Cases - Server Implementation: Build MCP servers in TypeScript with the official SDK, defining tools with JSON Schema or Zod validation over stdio or Streamable HTTP transports. - Auth & Error Handling: Implement OAuth, bearer token, or env-var authentication with mcp_auth flows, plus structured error codes (INVALID_PARAMS, RATE_LIMITED) that tell agents how to recover. - Testing & Hardening: Validate tools with the MCP Inspector and automated client tests, then apply production practices like timeouts, idempotency, and least-privilege tool exposure. - Use Case: You want Cursor to query your orders database. Use this Skill to scaffold an MCP server exposing a search_orders tool, configure it in Cursor's mcpServers settings, and verify the full auth and error-handling flow. ## Quick Start Ask the agent to scaffold an MCP server in TypeScript exposing a typed search tool and configure it in Cursor's mcpServers settings.

Frequently Asked Questions about mcp-integration

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I build an MCP server in TypeScript?▼

Use the @modelcontextprotocol/sdk package to create an McpServer instance, register tools with Zod-validated schemas, and connect a StdioServerTransport. Each tool returns content arrays with text, image, or resource types.

What is the difference between stdio and HTTP MCP transport?▼

Stdio runs the server as a local subprocess, is simple, and supports one client per process. Streamable HTTP exposes a /mcp endpoint for remote multi-client deployments but requires auth, TLS, and operational overhead.

How do I configure an MCP server in Cursor?▼

Add an entry to the mcpServers config with the command, args, and env variables for stdio servers, or register a URL with auth headers for remote HTTP servers. Reference secrets via environment variables rather than hardcoding them.

How do I test MCP tools automatically?▼

Use the official MCP Inspector via npx for manual smoke tests, or write automated tests with the SDK Client and StdioClientTransport that call tools and assert on results. Verify tools/list output, invalid parameter handling, and auth gating.

Why does my MCP server mix logs with protocol messages?▼

Stdio transport requires stdout to carry only JSON-RPC messages; any debug prints corrupt the protocol. Send all logging to stderr and never print credentials, since stderr output can still be captured by clients.

How should MCP tools handle errors for AI agents?▼

Return isError true with a structured JSON body containing a code, message, and guidance field. Use codes like INVALID_PARAMS, AUTH_FAILED, RATE_LIMITED, and UPSTREAM_ERROR so agents know whether to fix arguments, re-authenticate, back off, or retry.