connect-mcp-server
ronnycoding/.claude
HTTP, stdio 및 SSE 전송 방식을 사용하여 MCP(Model Context Protocol) 서버를 Claude Code에 연결하는 방법에 대한 가이드입니다. 설치, 구성, 인증, 환경 변수 및 보안에 대해 다룹니다. 사용자가 MCP 서버에 연결하거나, 연동 기능을 추가하거나, 외부 서비스를 구성하거나, MCP, 서버, 연동 기능 또는 외부 도구를 언급할 때 이 가이드를 활용하십시오.
...모든 것을 확장하십시오소개 connect-mcp-server
`connect-mcp-server` 스킬은 MCP(Model Context Protocol) 서버와 Claude Code 간의 원활한 통합을 가능하게 하여, AI 어시스턴트를 외부 서비스 및 데이터 소스에 연결하는 표준화된 방법을 제공합니다. 이 스킬은 복잡한 수동 설정 없이도 여러 플랫폼의 도구, 리소스 및 프롬프트에 접근하고 관리해야 하는 과제를 해결합니다. HTTP, stdio 및 (사용 중단된) SSE 전송 방식을 지원함으로써, 사용자는 로컬 및 원격 서버에 모두 효율적으로 연결할 수 있으며, API, 데이터베이스 및 생산성 도구와의 상호 작용을 간소화할 수 있습니다.
이 스킬의 주요 기능으로는 유연한 전송 프로토콜 옵션이 있으며, 클라우드 기반 서비스의 경우 HTTP, 로컬 서버의 경우 stdio, 레거시 사용 사례의 경우 SSE를 통해 연결할 수 있습니다. 또한 서버 추가, 인증 헤더 또는 환경 변수 구성, 올바른 설정을 확인하기 위한 연결 테스트를 수행하는 명령어를 제공합니다. 사용자는 간단한 접두사를 사용하여 Claude Code를 통해 MCP에서 제공하는 도구, 리소스 및 프롬프트에 액세스할 수 있으며, 이를 통해 GitHub 이슈 생성, Notion 페이지 관리 또는 사용자 지정 API와의 상호 작용과 같은 작업을 원활하게 수행할 수 있습니다. 이 스킬은 OAuth 2.0 인증, 로컬 시스템 통합, 로컬 서버용 오프라인 작동을 지원하여 다양한 개발 및 운영 시나리오를 포괄적으로 커버합니다.
이 스킬은 외부 서비스를 Claude Code 워크플로우에 통합해야 하는 개발자, 데이터 엔지니어 및 AI 애호가에게 이상적입니다. 프로젝트 수준, 사용자 수준 및 로컬 범위를 지원하여 다양한 협업 및 배포 요구 사항을 충족시킵니다. 사용 사례로는 프로젝트 관리 작업 자동화, 연결된 서비스에서 데이터 조회 및 업데이트, 자체 개발 API와의 통합, AI 기능 강화를 위한 로컬 시스템 유틸리티 활용 등이 있습니다. MCP 서버 연결을 간소화함으로써, 이 스킬은 사용자가 Claude Code의 기능을 확장하고 여러 플랫폼에 걸쳐 AI 기반 워크플로를 효율화할 수 있도록 지원합니다.
자주 묻는 질문
원격 서비스에는 어떤 전송 방식을 사용해야 하나요?
HTTP 전송 방식은 JSON-RPC를 지원하고, 네트워크 간에 작동하며, OAuth 2.0을 지원하므로 원격 클라우드 기반 서비스에 권장됩니다.
네트워크에 접속하지 않은 상태에서도 로컬에서 MCP 서버를 실행할 수 있나요?
예, stdio 전송 방식을 사용하면 시스템에 직접 액세스하고 오프라인 기능을 활용하여 로컬 서버를 실행할 수 있습니다.
API 키나 토큰이 필요한 MCP 서버에 어떻게 인증하나요?
HTTP 서버의 경우 HTTP 헤더를, stdio 서버의 경우 환경 변수를 사용하여 자격 증명을 제공할 수 있습니다. OAuth 인증은 Claude Code의 `/mcp` 명령어를 사용하여 완료할 수 있습니다.
SSE 전송 방식은 여전히 지원되나요?
SSE 전송 방식은 더 이상 권장되지 않으며, 새로운 통합의 경우 대신 HTTP 서버를 사용하는 것이 권장됩니다.
로컬 서버를 사용할 때 Windows에서 특별한 구성이 필요한가요?
네, Windows에서 npx 명령을 사용할 때는 `cmd /c`로 감싸고, 명령을 지정하기 전에 `--` 구분자를 사용해야 합니다.
Connect MCP Server Guide
This skill helps you connect MCP (Model Context Protocol) servers to Claude Code, enabling integrations with external services like GitHub, Notion, databases, project management tools, and custom APIs.
Quick Start
When connecting an MCP server, follow this workflow:
- Identify the server - Which service do you want to integrate?
- Choose transport - HTTP (remote), stdio (local), or SSE (deprecated)
- Gather credentials - API keys, tokens, or OAuth requirements
- Select scope - Local (default), project (.mcp.json), or user (cross-project)
- Add server - Use
claude mcp addcommand - Authenticate - Use
/mcpin Claude Code for OAuth - Test connection - Verify server status and available tools
- Use resources/prompts - Access via
@and/prefixes
What is MCP?
Model Context Protocol (MCP) is a standard for connecting AI assistants to external services and data sources. MCP servers provide:
- Tools: Functions Claude can execute (e.g., create GitHub issue)
- Resources: Data Claude can reference (e.g., @github:issue://123)
- Prompts: Pre-built commands (e.g., /mcp__github__review-pr)
Transport Protocols
1. HTTP Servers (Recommended)
Best for: Remote cloud-based servicesProtocol: HTTP/HTTPS with JSON-RPC
Basic syntax:
claude mcp add --transport http <name> <url>
Examples:
Notion integration:
claude mcp add --transport http notion https://mcp.notion.com/mcp
GitHub integration:
claude mcp add --transport http github https://mcp.github.com
Custom API with authentication:
claude mcp add --transport http secure-api https://api.example.com/mcp \ --header "Authorization: Bearer your-token-here"Multiple headers:
claude mcp add --transport http api https://api.example.com/mcp \ --header "Authorization: Bearer token" \ --header "X-API-Version: v2"
Advantages:
- No local installation required
- Works across networks
- Managed by service provider
- Automatic updates
- OAuth 2.0 support
2. Stdio Servers (Local)
Best for: Local tools requiring system accessProtocol: Standard input/output (stdin/stdout)
Basic syntax:
claude mcp add --transport stdio <name> <command> [args...]
Examples:
Using npx (recommended for Node.js servers):
claude mcp add --transport stdio filesystem -- npx -y @modelcontextprotocol/server-filesystem /path/to/allowed/directory
With environment variables:
claude mcp add --transport stdio airtable \ --env AIRTABLE_API_KEY=your-key-here \ -- npx -y airtable-mcp-server
Direct executable:
claude mcp add --transport stdio custom-server -- /usr/local/bin/my-server --arg1 value1
Windows-specific (requires cmd /c wrapper):
claude mcp add --transport stdio github-local -- cmd /c npx -y @modelcontextprotocol/server-github
Python server:
claude mcp add --transport stdio python-server -- python3 /path/to/server.py
Advantages:
- Direct file system access
- No network latency
- Full control over installation
- Works offline
- Can integrate system utilities
Important notes:
- The
--separator is required before the command - Use
-yflag with npx to auto-install - Windows requires
cmd /cwrapper for npx
3. SSE Servers (Deprecated)
Status: Deprecated - use HTTP servers instead
Syntax (if needed):
claude mcp add --transport sse <name> <url>
Note: SSE (Server-Sent Events) transport is being phased out. Migrate to HTTP servers where available.
Configuration Scopes
Local Scope (Default)
Storage: User settings (not shared)Use for: Personal project-specific servers
claude mcp add --transport http notion https://mcp.notion.com/mcp
No --scope flag means local scope.
Project Scope
Storage: .mcp.json in project root (shared via git)Use for: Team-wide integrations
claude mcp add --transport http github https://mcp.github.com --scope project
Creates: .mcp.json file:
{ "mcpServers": { "github": { "type": "http", "url": "https://mcp.github.com" } }}Important: Claude Code prompts for approval before using project-scoped servers from .mcp.json files for security.
User Scope
Storage: User settings (cross-project)Use for: Servers you use across all projects
claude mcp add --transport stdio filesystem \ --scope user \ -- npx -y @modelcontextprotocol/server-filesystem ~/DocumentsAvailable in all projects on your machine.
Manual Configuration (.mcp.json)
HTTP Server Configuration
{ "mcpServers": { "github": { "type": "http", "url": "https://mcp.github.com", "headers": { "Authorization": "Bearer ${GITHUB_TOKEN}", "X-Custom-Header": "value" } }, "notion": { "type": "http", "url": "https://mcp.notion.com/mcp" } }}Stdio Server Configuration
{ "mcpServers": { "filesystem": { "type": "stdio", "command": "npx", "args": [ "-y", "@modelcontextprotocol/server-filesystem", "/path/to/allowed/directory" ] }, "postgres": { "type": "stdio", "command": "npx", "args": ["-y", "@modelcontextprotocol/server-postgres"], "env": { "POSTGRES_CONNECTION_STRING": "${DATABASE_URL}" } }, "custom-python": { "type": "stdio", "command": "python3", "args": ["/path/to/server.py", "--config", "config.json"], "env": { "PYTHONPATH": "/custom/python/path", "API_KEY": "${MY_API_KEY}" } } }}Complete Example with Multiple Servers
{ "mcpServers": { "github": { "type": "http", "url": "https://mcp.github.com", "headers": { "Authorization": "Bearer ${GITHUB_TOKEN}" } }, "filesystem": { "type": "stdio", "command": "npx", "args": [ "-y", "@modelcontextprotocol/server-filesystem", "${HOME}/projects" ] }, "postgres": { "type": "stdio", "command": "npx", "args": ["-y", "@modelcontextprotocol/server-postgres"], "env": { "POSTGRES_CONNECTION_STRING": "${DATABASE_URL:-postgresql://localhost:5432/mydb}" } }, "slack": { "type": "http", "url": "https://mcp.slack.com", "headers": { "Authorization": "Bearer ${SLACK_TOKEN}" } } }}Environment Variables
Variable Expansion
Claude Code supports environment variable expansion:
Syntax:
${VAR}- Expands to environment variable value${VAR:-default}- Uses default if variable not set
Supported locations:
- Command paths
- Arguments
- Environment settings
- HTTP headers
Examples:
{ "mcpServers": { "api": { "type": "http", "url": "https://api.example.com/mcp", "headers": { "Authorization": "Bearer ${API_TOKEN}", "X-Environment": "${ENVIRONMENT:-production}" } }, "local-server": { "type": "stdio", "command": "${HOME}/bin/my-server", "args": ["--config", "${CONFIG_PATH:-/etc/server.conf}"], "env": { "LOG_LEVEL": "${LOG_LEVEL:-info}", "DATA_DIR": "${DATA_DIR}" } } }}Setting Environment Variables
macOS/Linux (.bashrc, .zshrc):
export GITHUB_TOKEN="ghp_your_token_here"export DATABASE_URL="postgresql://user:pass@localhost:5432/db"export API_KEY="your-api-key"
Windows (PowerShell):
$env:GITHUB_TOKEN = "ghp_your_token_here"$env:DATABASE_URL = "postgresql://user:pass@localhost:5432/db"
Session-specific:
# Set variable before running Claude CodeGITHUB_TOKEN=token DATABASE_URL=url claudeAuthentication
OAuth 2.0 (Recommended)
Many cloud-based MCP servers use OAuth 2.0:
Process:
- Add server (no credentials needed initially)
- Start Claude Code
- Type
/mcpcommand - Follow browser login flow
- Tokens stored securely and auto-refreshed
Example:
# Add GitHub serverclaude mcp add --transport http github https://mcp.github.com# In Claude Code session/mcp# Opens browser for GitHub authentication
API Token Authentication
For services using API tokens:
Via header:
claude mcp add --transport http service https://api.example.com/mcp \ --header "Authorization: Bearer your-token"Via environment variable:
# Set environment variableexport SERVICE_TOKEN="your-token"# Add server with variable referenceclaude mcp add --transport http service https://api.example.com/mcp \ --header "Authorization: Bearer ${SERVICE_TOKEN}"
No Authentication
Public or local servers:
claude mcp add --transport http public https://public-api.example.com/mcp
Server Management Commands
List All Servers
claude mcp list
Output:
Configured MCP servers: github (http) - https://mcp.github.com filesystem (stdio) - npx -y @modelcontextprotocol/server-filesystem postgres (stdio) - npx -y @modelcontextprotocol/server-postgresGet Server Details
claude mcp get github
Output:
{ "type": "http", "url": "https://mcp.github.com", "headers": { "Authorization": "Bearer ..." }}Remove Server
claude mcp remove github
Reset Project Approval Choices
claude mcp reset-project-choices
Clears your approval decisions for project-scoped servers.
Check Server Status (In Claude Code)
/mcpShows:
- Connected servers
- Authentication status
- Available tools and resources
Using MCP Resources
Reference Resources with @
Type @ in Claude Code to see available resources:
Format:
@server:protocol://resource/pathExamples:
GitHub issue:
Review the implementation in @github:issue://123Notion page:
Summarize @notion:page://abc123def456File from filesystem server:
Compare @filesystem:file:///project/src/old.js with current implementationDatabase table:
Analyze schema for @postgres:table://usersUsing MCP Prompts
Execute Prompts with /
Type / to discover MCP prompts:
Format:
/mcp__servername__promptname [arguments]Examples:
GitHub PR review:
/mcp__github__review-pr 123Notion page creation:
/mcp__notion__create-page "Project Ideas" "Brainstorming session notes"Database query:
/mcp__postgres__query "SELECT * FROM users WHERE active = true"Output Limits
Default Limits
- Warning threshold: 10,000 tokens
- Default maximum: 25,000 tokens
Configure Output Limit
# Allow larger outputs (50,000 tokens)export MAX_MCP_OUTPUT_TOKENS=50000claude# Or inlineMAX_MCP_OUTPUT_TOKENS=50000 claude
Use when:
- Server returns large datasets
- Processing extensive documents
- Analyzing comprehensive logs
Timeout Configuration
MCP Server Startup Timeout
# 10-second timeout (default is 5 seconds)MCP_TIMEOUT=10000 claudeUse when:
- Server initialization is slow
- Network latency is high
- Complex server setup required
Popular MCP Servers
Official MCP Servers
GitHub:
claude mcp add --transport http github https://mcp.github.com
Tools: Create issues, review PRs, manage repositories
Filesystem:
claude mcp add --transport stdio filesystem -- npx -y @modelcontextprotocol/server-filesystem ~/DocumentsTools: Read/write files, search directories
PostgreSQL:
claude mcp add --transport stdio postgres \ --env POSTGRES_CONNECTION_STRING=postgresql://localhost:5432/db \ -- npx -y @modelcontextprotocol/server-postgres
Tools: Query database, analyze schema
Slack:
claude mcp add --transport http slack https://mcp.slack.com
Tools: Send messages, search history, manage channels
Google Drive:
claude mcp add --transport http gdrive https://mcp.google.com/drive
Tools: Access files, search documents, manage folders
Brave Search:
claude mcp add --transport stdio brave-search \ --env BRAVE_API_KEY=your-key \ -- npx -y @modelcontextprotocol/server-brave-search
Tools: Web search, fact-checking
Git:
claude mcp add --transport stdio git -- npx -y @modelcontextprotocol/server-git
Tools: Repository operations, commit history, diff analysis
Sentry:
claude mcp add --transport http sentry https://mcp.sentry.io \ --header "Authorization: Bearer ${SENTRY_TOKEN}"Tools: Error monitoring, stack trace analysis
Linear:
claude mcp add --transport http linear https://mcp.linear.app
Tools: Issue tracking, project management
Notion:
claude mcp add --transport http notion https://mcp.notion.com/mcp
Tools: Page creation, database queries, content search
Community MCP Servers
Airtable:
claude mcp add --transport stdio airtable \ --env AIRTABLE_API_KEY=your-key \ -- npx -y airtable-mcp-server
MongoDB:
claude mcp add --transport stdio mongodb \ --env MONGODB_URI=mongodb://localhost:27017 \ -- npx -y mongodb-mcp-server
Redis:
claude mcp add --transport stdio redis \ --env REDIS_URL=redis://localhost:6379 \ -- npx -y redis-mcp-server
AWS:
claude mcp add --transport stdio aws \ --env AWS_PROFILE=default \ -- npx -y aws-mcp-server
Enterprise MCP Configuration
Managed MCP Servers
Administrators can deploy centralized configurations:
macOS:
/Library/Application Support/ClaudeCode/managed-mcp.jsonWindows:
C:\ProgramData\ClaudeCode\managed-mcp.jsonLinux:
/etc/claude-code/managed-mcp.jsonAllowlists/Denylists
managed-settings.json:
{ "mcpServers": { "allowlist": ["github", "slack", "notion"], "denylist": ["unapproved-server"] }}Controls which servers users can configure.
Security Considerations
Trust Verification
CRITICAL WARNING: "Use third party MCP servers at your own risk - Anthropic has not verified the correctness or security of all these servers."
Before installing:
- Verify server source (official vs community)
- Review server code if open source
- Check reputation and reviews
- Understand data access requirements
- Review authentication requirements
Prompt Injection Risks
Servers that fetch untrusted content (web search, user input) can expose Claude to prompt injection attacks.
Mitigation:
- Use servers from trusted sources
- Limit server permissions
- Review server behavior regularly
- Monitor for unexpected actions
Credential Management
Best practices:
- Use environment variables for secrets
- Never commit tokens to git (.mcp.json with ${VAR})
- Rotate credentials regularly
- Use least-privilege access tokens
- Enable OAuth when available
Bad practice:
{ "mcpServers": { "api": { "headers": { "Authorization": "Bearer hardcoded-token-123" } } }}Good practice:
{ "mcpServers": { "api": { "headers": { "Authorization": "Bearer ${API_TOKEN}" } } }}Project-Scoped Server Approval
Claude Code prompts before using servers from .mcp.json:
Prompt:
This project wants to connect to the following MCP servers:- github (https://mcp.github.com)- filesystem (local file access)Do you trust these servers?[Allow for this session] [Always allow] [Never allow]Review before approving:
- Server purpose and source
- Data access requirements
- Team trustworthiness
- Security implications
Troubleshooting
Server Not Appearing
Check configuration:
claude mcp listclaude mcp get server-name
Verify:
- Server name is correct
- Configuration syntax is valid
- Environment variables are set
- Server is running (stdio)
Authentication Failing
For OAuth:
/mcpRe-authenticate through browser
For API tokens:
- Verify environment variable is set:
echo $TOKEN_NAME - Check token hasn't expired
- Verify token permissions
Connection Timeout
Increase timeout:
MCP_TIMEOUT=15000 claude
Check:
- Network connectivity
- Server URL is correct
- Server is running and accessible
Tools Not Available
Verify server is connected:
/mcpCheck:
- Server status shows as connected
- Authentication is complete
- Server supports expected tools
Large Output Truncated
Increase output limit:
MAX_MCP_OUTPUT_TOKENS=50000 claude
Alternative:
- Request smaller data chunks
- Use server filtering options
- Paginate results
Windows npx Issues
Use cmd /c wrapper:
claude mcp add --transport stdio server -- cmd /c npx -y package-name
Testing MCP Servers
1. Verify Server Added
claude mcp list
Confirm server appears in the list.
2. Check Server Details
claude mcp get server-name
Verify configuration is correct.
3. Test in Claude Code
Start Claude Code and run:
/mcpConfirm:
- Server shows as connected
- Authentication status is OK
- Tools are available
4. Test Resources
Type @ and verify server resources appear:
@server-name:5. Test Prompts
Type / and verify server prompts appear:
/mcp__server-name__6. Execute Test Command
Try a simple server operation:
/mcp__github__list-reposCommon Use Cases
Development Workflow
GitHub + Filesystem + Git:
# GitHub for issues and PRsclaude mcp add --transport http github https://mcp.github.com# Filesystem for project accessclaude mcp add --transport stdio filesystem -- npx -y @modelcontextprotocol/server-filesystem ~/projects# Git for version controlclaude mcp add --transport stdio git -- npx -y @modelcontextprotocol/server-git
Usage:
- Review code from @filesystem:file://
- Reference issues with @github:issue://
- Check git history with /mcp__git__log
Database Administration
PostgreSQL + MongoDB:
# PostgreSQLclaude mcp add --transport stdio postgres \ --env POSTGRES_CONNECTION_STRING=${DATABASE_URL} \ -- npx -y @modelcontextprotocol/server-postgres# MongoDBclaude mcp add --transport stdio mongodb \ --env MONGODB_URI=${MONGO_URL} \ -- npx -y mongodb-mcp-server
Usage:
- Query data:
/mcp__postgres__query "SELECT ..." - Analyze schema: @postgres:schema://table_name
- Monitor collections: @mongodb:collection://users
Project Management
Linear + Slack + Notion:
# Linear for issuesclaude mcp add --transport http linear https://mcp.linear.app# Slack for communicationclaude mcp add --transport http slack https://mcp.slack.com# Notion for documentationclaude mcp add --transport http notion https://mcp.notion.com/mcp
Usage:
- Create issues:
/mcp__linear__create-issue - Send updates:
/mcp__slack__send-message - Reference docs: @notion:page://abc123
Error Monitoring
Sentry + Logs:
# Sentry for error trackingclaude mcp add --transport http sentry https://mcp.sentry.io \ --header "Authorization: Bearer ${SENTRY_TOKEN}"# Custom log serverclaude mcp add --transport stdio logs -- python3 ~/mcp-servers/log-analyzer.py
Usage:
- Analyze errors: @sentry:issue://ERROR-123
- Search logs:
/mcp__logs__search "authentication failed"
Best Practices Checklist
When connecting an MCP server:
- Server source is trusted and verified
- Transport type matches use case (HTTP for remote, stdio for local)
- Scope is appropriate (local/project/user)
- Credentials use environment variables (not hardcoded)
- Authentication is configured (OAuth or API token)
- Server name is descriptive and unique
- Environment variables are set before adding server
- Configuration is tested (
claude mcp list,/mcp) - Resources and prompts are accessible (@ and /)
- Team is informed (for project-scoped servers)
- Security implications reviewed
- .mcp.json is committed to git (project scope)
- Secrets are NOT committed to git
Key Principles
- Trust first - Only install servers from verified sources
- Environment variables - Use ${VAR} for secrets, never hardcode
- Scope appropriately - Local for personal, project for team, user for cross-project
- OAuth when possible - Prefer OAuth over API tokens for security
- Test thoroughly - Verify connection and tools before relying on server
- Document for team - Explain server purpose in project README
- Monitor access - Review what data servers can access
- Keep updated - Update servers regularly for security patches
- Least privilege - Grant minimum necessary permissions
- Review regularly - Audit configured servers periodically
Workflow Summary
When user asks to connect an MCP server:
- Identify server - Which service/integration is needed?
- Find installation method - Official docs, GitHub, or custom
- Choose transport - HTTP (remote) or stdio (local)?
- Gather credentials - API keys, OAuth setup, connection strings
- Set environment variables - Export secrets before adding server
- Select scope - Local (default), project (team), or user (cross-project)
- Add server - Use
claude mcp addcommand - Verify configuration -
claude mcp listandclaude mcp get - Test connection -
/mcpin Claude Code session - Use server - Access resources (@) and prompts (/)
Remember: MCP servers extend Claude's capabilities by connecting to external services. Always verify server trust, use environment variables for secrets, and test thoroughly before relying on server integrations.
connect-mcp-server 설치
스킬 파일을 다운로드하여 .claude/skills/ 디렉터리에 압축을 풀어주세요.
ZIP 다운로드저장소를 클론하고 스킬 파일을 프로젝트에 복사하세요.
git clone https://github.com/ronnycoding/.claude/blob/main/skills/connect-mcp-server/SKILL.md # Copy SKILL.md to your .claude/skills/ directory
복사





집
