Command Palette

Search for a command to run...

Wander The Code • 10 Guides

Mastering the Model Context Protocol.

10 results
View PDF
MCP Architecture
Architecture

What Is MCP and Why It Matters

Model Context Protocol (MCP) is an open standard created by Anthropic that allows AI assistants to securely connect to external tools and services. Instead of the AI guessing, MCP provides a structured, validated interface to perform actions in the real world.

TermWhat It Means
AI ClientThe IDE extension (e.g., GitHub Copilot, Cline).
MCP HostThe runtime managing server connections inside the IDE.
MCP ServerA process exposing tools (e.g., GitHub server, AWS API server).
Tool CallThe AI invoking a tool and receiving real data.
stdioThe default transport for communication.
Setup

Prerequisites Setup

Before installing MCP servers, ensure the following dependencies exist on your system.

1Python 3.10+

bash
sudo apt update
sudo apt install python3 python3-pip python3-venv -y
python3 --version

2uv (Python Package Manager)

bash
curl -LsSf https://astral.sh/uv/install.sh | sh
source ~/.bashrc
uv --version

3AWS CLI v2

bash
sudo dnf install awscli2 -y # Fedora/RHEL
# OR for Ubuntu/Debian:
# curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
Scroll for more guides
Integration

GitHub MCP Server Setup

Allows AI assistants to manage repositories, create PRs, issues, and read files. Authentication is handled via a Personal Access Token (PAT).

PAT Generation Scopes

  • repo
  • workflow
  • read:org
  • read:user
bash
export GITHUB_PERSONAL_ACCESS_TOKEN="your_token_here"
npx -y @modelcontextprotocol/server-github
Cloud

AWS API MCP Server

A generic bridge to nearly all AWS services using the AWS SDK (Boto3).

bash
aws configure
# Enter Access Key ID, Secret Access Key, Region, Format

Security Options

Start with ReadOnlyAccess. Fine-tune behavior with env vars:

  • READ_OPERATIONS_ONLY=true: Blocks write operations.
  • REQUIRE_MUTATION_CONSENT=true: Requires manual approval.
Configuration

Global Configuration

Create a shared config file at ~/.config/mcp/config.json to persist settings across different IDEs.

json
{
  "mcpServers": {
    "github": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-github"],
      "env": {
        "GITHUB_PERSONAL_ACCESS_TOKEN": "${env:GITHUB_PERSONAL_ACCESS_TOKEN}"
      }
    },
    "awslabs.aws-api-mcp-server": {
      "command": "uvx",
      "args": ["@awslabs/aws-api-mcp-server"],
      "env": {
        "READ_OPERATIONS_ONLY": "true",
        "REQUIRE_MUTATION_CONSENT": "true"
      }
    }
  }
}
Dev Environment

IDE Integration (VS Code & IDX)

Visual Studio Code

Use Cline or Cursor. Project-specific configs go in .vscode/mcp.json using the "servers" key.

Firebase Studio (IDX)

Create .idx/mcp.json using "mcpServers". Set environment variables in .idx/dev.nix.

Automation

Global Init Script (mcp-init)

A convenience script to scaffold MCP configs in any repository with one command.

bash
#!/usr/bin/env bash
# Scaffolds .vscode/mcp.json and .idx/mcp.json
mcp-init [optional_path]

Add this to ~/.local/bin/mcp-init and ensure it's in your PATH.

Usage

Example Prompts

Try these prompts to interact with your newly connected tools.

"GitHub: Create a new branch in 'my-portfolio' called 'update-blog-style'."
"AWS: List all my S3 buckets in the us-east-1 region and tell me which are public."
"Troubleshooting: Check the IAM policy for 'api-executor' if I see a 403 error."
Support

Troubleshooting Guide

Red Dot / Server Offline

Check if environment variables are correctly exported (echo $VARIABLE).

Command Not Found

Ensure uv and Node.js are added to your shell PATH.

Firebase Studio Status

Ensure you click 'Rebuild Environment' after editing dev.nix.