AI coding agents come with powerful built-in capabilities, but sometimes you need to extend them further. MCP servers connect agents to external systems like databases and APIs, while skills guide agent behavior through specialized prompts. Knowing when to use each is key to an effective workflow.
Modern AI coding agents are excellent at generating impromptu code and CLI commands on the fly. For many common tasks, you don't need an MCP server because agents already have built-in tools that handle these operations natively:
MCP servers become valuable when you need persistent, specialized integrations - such as connecting to databases, searching with specific APIs, or interacting with platforms like GitHub in a structured way.
Skills (also known as slash commands) are another way to extend AI coding assistants. Unlike MCP servers which provide tool access to external systems, skills inject specialized prompts and workflows that guide the AI's behavior for specific tasks.
Skills can contain hidden prompt injections that may instruct the AI to run destructive commands or even leak sensitive data. Always make sure to read the full contents of the skill file before using them. Try to avoid skills from third-party marketplaces or untrusted sources.
Use Skills when you need to guide the AI's behavior without external access:
Use MCP Servers when you need to connect to external systems:
Claude Code allows you to create custom slash commands by adding markdown files to your project's .claude/commands/ directory:
Review this code for:- Security vulnerabilities- Performance issues- Adherence to our team's coding standards- Test coverage gapsProvide actionable feedback with specific line references.
✅ Figure: Good example - Review skill within Claude Code at `.claude/commands/review.md`
This can then be invoked with /project:review in Claude Code.
MCP servers are configured via JSON configuration files, with the location of them depending on your chosen client, for example, for Claude Desktop:
Location:
~/Library/Application Support/Claude/claude_desktop_config.json%APPDATA%\Claude\claude_desktop_config.json{"mcpServers": {"filesystem": {"command": "npx","args": ["-y", "@modelcontextprotocol/server-filesystem", "/path/to/allowed/files"]},"github": {"command": "npx","args": ["-y", "@modelcontextprotocol/server-github"],"env": {"GITHUB_PERSONAL_ACCESS_TOKEN": "<YOUR_TOKEN>"}},"postgres": {"command": "npx","args": ["-y", "@modelcontextprotocol/server-postgres", "postgresql://localhost/mydb"]}}}