Uni-Sine
AI
+25XP
AIUsing AI

How to use MCP servers

What is an MCP server?

The Model Context Protocol (MCP) is an open-source standard for connecting AI applications to external systems. Its own documentation compares it to a USB-C port for AI applications: one standard plug instead of a different cable for every device. An MCP server is a program that offers an AI app access to something: your files, a database, a calendar, a design tool or a search engine.

Hosts, clients and servers

  • Host: the AI app you use, such as Claude Desktop or Visual Studio Code.
  • Client: a connection the host creates, one for each server.
  • Server: the program that provides the context or actions.

According to the MCP architecture overview, servers offer three kinds of thing:

PrimitiveWhat it isExample
ToolsActions the AI can runQuery a database, create a file, call an API
ResourcesData the AI can read for contextA file's contents, a database schema
PromptsReusable templates for common tasksA ready-made "review this pull request" prompt

Try it: this question describes something a server offers and asks whether it is a tool, a resource or a prompt.

Multiple choice: is each feature a tool, a resource or a prompt?

Press Mark to have your answer marked in the MCP Servers course.

How to use MCP servers: step by step

  1. Pick an app that supports MCP. The MCP site lists AI assistants such as Claude and ChatGPT and developer tools such as Visual Studio Code and Cursor.
  2. Choose a server you trust. Start with official servers from the company whose service you are connecting, or the reference servers maintained by the MCP project.
  3. Add it in the app's settings or config file. Local servers are added as a command to run; remote ones by URL.
  4. Restart or reload the app so it connects and discovers the server's tools.
  5. Ask for something that needs the tool, such as "list the files in my notes folder", and approve the action when the app asks.

Local and remote servers

A local server runs on your own computer and talks to the app through standard input and output (the stdio transport). A remote server runs on the provider's systems and is reached over the internet with the Streamable HTTP transport; the MCP documentation recommends OAuth for signing in to them. Underneath, both send the same JSON-RPC 2.0 messages.

Many apps describe local servers in a JSON config file. An entry names the server and the command that starts it, with any arguments. For example, the MCP project's reference filesystem server is given the folders it may access:

{
  "mcpServers": {
    "notes": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-filesystem", "/Users/me/notes"]
    }
  }
}

The exact file and format differ between apps, so follow your app's MCP instructions. If a server needs an API key, put it in the config's environment section rather than in a prompt; our guide to API keys explains why.

Using MCP servers safely

  • Install only servers you trust. A server runs code and can see whatever you connect it to.
  • Give the least access needed, such as one folder rather than your whole drive, or a read-only database account.
  • Read approval requests. Check what a tool is about to do before allowing it, especially anything that deletes, sends or pays.
  • Watch for prompt injection. Text the AI reads, such as a web page or document, can contain hidden instructions trying to make it misuse a tool. Approvals are your safety net.

Building your own MCP server

Official SDKs let you write a server in a few dozen lines: you describe each tool with a name, a description and the inputs it takes, and write the function that does the work. The MCP Servers course builds one in TypeScript and Python and tests it with the MCP Inspector. Try one: this question shows a broken server and asks you to find the fix.

Multiple choice: diagnose common problems when building and connecting a server.

Press Mark to have your answer marked in the MCP Servers course.

Common mistakes

  • Invalid JSON in the config file. One missing comma or quote stops every server loading.
  • Forgetting to restart the app after changing its MCP settings.
  • Wrong paths. Local servers need full paths to the folders or programs they use.
  • Missing software. A server started with npx needs Node.js installed; one written in Python needs Python.
  • Granting too much access "just to make it work".

Common questions

What is an MCP server?
A program that gives AI apps access to tools, data or prompt templates through the Model Context Protocol, an open standard for connecting AI applications to external systems.
Which apps support MCP servers?
The MCP documentation lists AI assistants such as Claude and ChatGPT and developer tools such as Visual Studio Code and Cursor, among others.
Do I need to code to use an MCP server?
Not to use one. Adding a ready-made server takes a few settings or a short config entry. Building your own needs some programming.
What is the difference between a local and a remote MCP server?
A local server runs on your computer and talks to the app directly through standard input and output. A remote server runs online and is reached over HTTP, usually with a sign-in.
Are MCP servers safe?
They are as safe as the server and the access you give it. Use trusted servers, limit their access, and review the actions the AI asks to take.

Revision cards

Read the front, say your answer, then flip to check.

Where to go next

  • Solve it

    Code Editor

    Write and run code right in your browser

    Open the tool
  • Learn it

    MCP Servers

    What MCP servers are, how to plug them into AI apps and how to build your own

    Start the course
Read next
AI · Using AIMCP vs API: what's the difference and when to use eachMCP vs API: what each one is, the key differences, why MCP servers usually wrap APIs, and when to call an API directly or connect an AI app through MCP.