How-to guide
How to Connect an MCP Server to Your AI Assistant
Learn what MCP is and how to connect an MCP server safely in Claude, Claude Code, Cursor and VS Code, with least-access permissions, testing and troubleshooting.
- Updated
An MCP server gives an AI assistant a standard, permissioned way to use an app such as Gmail, Google Drive, GitHub or Notion. This guide explains what MCP is, how to connect a server safely and how to test it, with exact steps for the most common clients.
What you will learn
- What MCP is, in plain language.
- The difference between remote servers and local servers.
- How to add a server in Claude, Claude Code, Cursor and VS Code.
- How to set permissions, test and troubleshoot.
Time: 15 to 30 minutes. Level: Beginner to intermediate.
What MCP is
MCP (Model Context Protocol) is an open standard that lets AI assistants connect to external tools and data. An MCP server is the app-side piece. Once connected, the assistant can use that app’s tools, such as searching files or creating drafts, with your approval and within the access you grant.
| Type | What it is | Typical sign-in |
|---|---|---|
| Remote server | Hosted by the provider at a web address. No installation. | OAuth (you sign in and approve), sometimes a token |
| Local server | Runs on your computer or in a container. | A token or key you provide |
Remote servers are simplest for most people and are what our MCP server pages mostly cover.
Step 1: Check your AI app supports connectors
Look for connectors, integrations or MCP settings in your AI app or editor. Where they live differs between web, desktop and mobile apps and between editors, so check the current help pages for yours. Some plans or organisation settings may limit connectors.
Step 2: Find the right server
- Browse your app’s connector directory if it has one.
- Otherwise take the server address from the provider’s official documentation. Do not copy addresses from random posts or unknown servers.
- Prefer official servers from the app’s own company.
Step 3: Add the server
In Claude (web and desktop)
Open the connectors area, choose a connector from the directory or add a custom connector with the server address, then complete the sign-in.
In Claude Code
claude mcp add --transport http NAME https://example.com/mcp
Replace NAME and the address with the real values from the provider’s docs. Then run /mcp to check status and sign in if required.
In Cursor
Open Cursor Settings, then MCP, and add a server. Or add it to your MCP configuration file:
{
"mcpServers": {
"name": { "url": "https://example.com/mcp" }
}
}
In VS Code
{
"servers": {
"name": { "type": "http", "url": "https://example.com/mcp" }
}
}
Then use the command that lists MCP servers, start the server and approve the sign-in prompt. Always use the exact configuration shown in the provider’s documentation, because keys and formats can change.
Step 4: Sign in and read the permissions
You will usually be sent to the provider to sign in. Read the permissions screen. Approve only what you are comfortable with, and revoke access later if you no longer need it.
Step 5: Choose the least access
- Pick read-only access where the choice exists.
- Limit access to specific folders, repositories, projects or channels.
- Enable only the toolsets you need.
Step 6: Test with a harmless request
Ask for something low-risk, such as “List my five most recent items.” Check the result matches what you see in the app.
Step 7: Confirm actions that change data
Ask the assistant to show a plan before it sends, deletes, edits, shares or posts anything. Review what it did afterwards.
Troubleshooting
| Problem | Fix |
|---|---|
| Tools do not appear | Check the connector is switched on for the conversation and restart the app. |
| Sign-in loops or fails | Try again in a private window, or check pop-up blockers. |
| “Not authorised” errors | The account may lack access, or your organisation needs to approve the app. |
| Server not found | Check the address against the provider’s documentation. |
| Sign-in expired | Reconnect and approve again. |
Security essentials
- Connect only servers you trust, from official sources.
- Never paste tokens or keys into chat.
- Treat content the assistant reads (emails, documents, web pages) as untrusted. It may contain hidden instructions.
- Require approval before the assistant takes actions that affect other people.
Checklist
- Official source for the server address.
- Permissions reviewed and minimised.
- Tested with a harmless request.
- Approval required for changes.
Frequently asked questions
Is MCP only for Claude?
No. It is an open standard that many assistants and editors support, though features and setup vary.
Can the assistant see everything in my account?
It can use what the connector and your permissions allow. That is why least access matters.
Next steps
Pick a server from the Library, such as GitHub, Notion or Google Drive, and read How to Write a Safe AI Agent Brief.
Was this helpful?
Thanks — that helps us improve this page.