MCP in Vibe Coding Workflows

Hands-on practice for this lecture. Work through the exercises and quizzes to reinforce what you've learned.

Interactive Workshop

MCP in Claude Code Workflows

Use project-scoped MCP servers in Claude Code for vibe coding — attach database schemas and context resources before asking Claude to do work.

1

claude mcp add --scope project stores config in .claude/mcp.json. Check it into version control and every collaborator gets the server automatically.

json.claude/mcp.json
1{
2  "mcpServers": {
3    "my-db": {
4      "type": "stdio",
5      "command": "node",
6      "args": ["./scripts/mcp-db-server.js"],
7      "env": {
8        "DATABASE_URL": "${DATABASE_URL}"
9      }
10    }
11  }
12}
1 / 2
MCP Client
stdio · connectedclaude-code
add_mcp_server

Simulate adding an MCP server to Claude Code with the right scope

requiredstring
requiredstring

Test Your Understanding

Multiple choice — select an answer to see the explanation.

1 / 3

How do you add a project-scoped MCP server in Claude Code so all collaborators get it automatically?