Intermediate11 min

Connecting Tools With MCP

Out of the box an agent can read files and run shell commands. MCP (the Model Context Protocol) is the open standard that lets it reach further: into your database, your GitHub issues, your browser, your design files. An MCP server exposes a set of tools, and once connected, your agent can call them as naturally as it edits a file.

Step 1: Understand what a server gives you

Each MCP server adds capabilities. A GitHub server lets the agent read and comment on issues and PRs. A Playwright server lets it drive a real browser to test your app. A Postgres server lets it query your database safely. You pick the ones that match your stack.

MCP serverWhat the agent can do
GitHubRead issues, open and review PRs
PlaywrightClick through your app in a real browser
PostgresRun read-only queries against your DB
FilesystemReach files outside the project root, scoped

Step 2: Add a server

In Claude Code you add a server with the mcp command. In Cursor you add it in settings under MCP. Either way you point at a server package or URL and the agent picks up the new tools.

claude - app
# add the GitHub MCP server
$claude mcp add github -- npx -y @modelcontextprotocol/server-github
Added MCP server 'github'. 7 tools available.
$/mcp
Connected: github (7 tools), playwright (5 tools)
$

Step 3: Use the new powers in a prompt

Once connected, you just ask. The agent figures out which tool to call. For example, with the GitHub and Playwright servers attached, you can hand it an issue and let it close the loop end to end.

mcp-prompt.txt
Read GitHub issue #214, reproduce the bug by clicking through the app
with the browser tool, fix it, and confirm the steps in the issue now pass.
MCP servers run with real permissions
An MCP server can take real actions: write to a database, post to GitHub. Only add servers you trust, prefer read-only or scoped credentials, and review what tools each server exposes before connecting it.
Model Context ProtocolThe open standard for connecting agents to tools and data, with a directory of official servers.modelcontextprotocol.io

Hands-on tasks