0% found this document useful (0 votes)
41 views9 pages

Quickstart - Model Context Protocol

The Model Context Protocol (MCP) enables secure connections between host applications like Claude Desktop and local services, allowing for data querying and analysis. This quickstart guide outlines how to set up a local SQLite database, connect it to Claude Desktop via MCP, and perform secure operations. Currently, MCP supports local connections only and is in developer preview, with plans for broader integration in the future.

Uploaded by

SlimeDiaz
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
41 views9 pages

Quickstart - Model Context Protocol

The Model Context Protocol (MCP) enables secure connections between host applications like Claude Desktop and local services, allowing for data querying and analysis. This quickstart guide outlines how to set up a local SQLite database, connect it to Claude Desktop via MCP, and perform secure operations. Currently, MCP supports local connections only and is in developer preview, with plans for broader integration in the future.

Uploaded by

SlimeDiaz
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9

12/1/24, 9:41 PM Quickstart - Model Context Protocol

Get Started Quickstart

Get Started

Quickstart
Get started with MCP in less than 5 minutes

MCP is a protocol that enables secure connections between host applications, such as
Claude Desktop, and local services. In this quickstart guide, you’ll learn how to:

Set up a local SQLite database


Connect Claude Desktop to it through MCP
Query and analyze your data securely

While this guide focuses on using Claude Desktop as an example MCP host, the protocol is
open and can be integrated by any application. IDEs, AI tools, and other software can all use
MCP to connect to local integrations in a standardized way.

Claude Desktop’s MCP support is currently in developer preview and only supports connecting
to local MCP servers running on your machine. Remote MCP connections are not yet
supported. This integration is only available in the Claude Desktop app, not the Claude web
interface (claude.ai).

How MCP works


MCP (Model Context Protocol) is an open protocol that enables secure, controlled
interactions between AI applications and local or remote resources. Let’s break down how it
works, then look at how we’ll use it in this guide.

General Architecture
https://modelcontextprotocol.io/quickstart 1/9
12/1/24, 9:41 PM Quickstart - Model Context Protocol

At its core, MCP follows a client-server architecture where a host application can connect to
multiple servers:

Get Started Quickstart Your Computer

Local
MCP Protocol MCP Server A
Resource A

MCP Host Local


MCP Protocol MCP Server B
(Claude, IDEs, Tools) Resource B

MCP Protocol MCP Server C Web APIs

Internet

Remote
Resource C

MCP Hosts: Programs like Claude Desktop, IDEs, or AI tools that want to access
resources through MCP
MCP Clients: Protocol clients that maintain 1:1 connections with servers
MCP Servers: Lightweight programs that each expose specific capabilities through the
standardized Model Context Protocol
Local Resources: Your computer’s resources (databases, files, services) that MCP
servers can securely access
Remote Resources: Resources available over the internet (e.g., through APIs) that MCP
servers can connect to

https://modelcontextprotocol.io/quickstart 2/9
12/1/24, 9:41 PM Quickstart - Model Context Protocol

In This Guide
For this quickstart, we’ll implement a focused example using SQLite:
Get Started Quickstart
Your Computer

MCP Protocol Local Access SQLite Database


Claude Desktop SQLite MCP Server
(Queries & Results) (SQL Operations) ~/test.db

1. Claude Desktop acts as our MCP client


2. A SQLite MCP Server provides secure database access
3. Your local SQLite database stores the actual data

The communication between the SQLite MCP server and your local SQLite database
happens entirely on your machine—your SQLite database is not exposed to the internet. The
Model Context Protocol ensures that Claude Desktop can only perform approved database
operations through well-defined interfaces. This gives you a secure way to let Claude
analyze and interact with your local data while maintaining complete control over what it can
access.

Prerequisites
macOS or Windows
The latest version of Claude Desktop installed
uv 0.4.18 or higher ( to check)
Git ( to check)
SQLite ( to check)

Installing prerequisites (macOS)

Installing prerequisites (Windows)

https://modelcontextprotocol.io/quickstart 3/9
12/1/24, 9:41 PM Quickstart - Model Context Protocol

Installation
macOS Windows
Get Started Quickstart

1 Create a sample database

Let’s create a simple SQLite database for testing:

# Create a new SQLite database


sqlite3 ~/test.db <<EOF
CREATE TABLE products (
id INTEGER PRIMARY KEY,
name TEXT,
price REAL
);

INSERT INTO products (name, price) VALUES


('Widget', 19.99),
('Gadget', 29.99),
('Gizmo', 39.99),
('Smart Watch', 199.99),
('Wireless Earbuds', 89.99),
('Portable Charger', 24.99),
('Bluetooth Speaker', 79.99),
('Phone Stand', 15.99),
('Laptop Sleeve', 34.99),
('Mini Drone', 299.99),
('LED Desk Lamp', 45.99),
('Keyboard', 129.99),
('Mouse Pad', 12.99),
('USB Hub', 49.99),
('Webcam', 69.99),
('Screen Protector', 9.99),
('Travel Adapter', 27.99),
('Gaming Headset', 159.99),
('Fitness Tracker', 119.99),

https://modelcontextprotocol.io/quickstart 4/9
12/1/24, 9:41 PM Quickstart - Model Context Protocol

('Portable SSD', 179.99);


EOF

2 Get Started
ConfigureQuickstart
Claude Desktop

Open your Claude Desktop App configuration at


in a text editor.

For example, if you have VS Code installed:

code ~/Library/Application\ Support/Claude/claude_desktop_config.json

Add this configuration (replace YOUR_USERNAME with your actual username):

{
"mcpServers": {
"sqlite": {
"command": "uvx",
"args": ["mcp-server-sqlite", "--db-path", "/Users/YOUR_USERNAME/tes
}
}
}

This tells Claude Desktop:

1. There’s an MCP server named “sqlite”


2. Launch it by running
3. Connect it to your test database

Save the file, and restart Claude Desktop.

Test it out
https://modelcontextprotocol.io/quickstart 5/9
12/1/24, 9:41 PM Quickstart - Model Context Protocol

Let’s verify everything is working. Try sending this prompt to Claude Desktop:

Can you connect to my SQLite database and tell me what products are available, an
Get Started Quickstart

Claude Desktop will:

1. Connect to the SQLite MCP server


2. Query your local database
3. Format and present the results

Claude Desktop successfully queries our SQLite database 🎉

What’s happening under the hood?


When you interact with Claude Desktop using MCP:
https://modelcontextprotocol.io/quickstart 6/9
12/1/24, 9:41 PM Quickstart - Model Context Protocol

1. Server Discovery: Claude Desktop connects to your configured MCP servers on startup

2. Protocol Handshake: When you ask about data, Claude Desktop:


Get Started Quickstart
Identifies which MCP server can help (sqlite in this case)
Negotiates capabilities through the protocol
Requests data or actions from the MCP server

3. Interaction Flow:

Claude Desktop MCP Server SQLite DB

Initialize connection

Available capabilities

Query request

SQL query

Results

Formatted results

Claude Desktop MCP Server SQLite DB

4. Security:

MCP servers only expose specific, controlled capabilities


MCP servers run locally on your machine, and the resources they access are not
exposed to the internet
Claude Desktop requires user confirmation for sensitive operations

https://modelcontextprotocol.io/quickstart 7/9
12/1/24, 9:41 PM Quickstart - Model Context Protocol

Try these examples


Now that MCP is working, try these increasingly powerful examples:
Get Started Quickstart
Basic Queries

Data Analysis

Complex Operations

Add more capabilities


Want to give Claude Desktop more local integration capabilities? Add these servers to your
configuration:

Note that these MCP servers will require Node.js to be installed on your machine.

File System Access

PostgreSQL Connection

More MCP Clients


While this guide demonstrates MCP using Claude Desktop as a client, several other
applications support MCP integration:

Zed Editor Cody


A high-performance, multiplayer code Code intelligence platform featuring MCP
editor with built-in MCP support for AI- integration for enhanced code search and
powered coding assistance analysis capabilities

https://modelcontextprotocol.io/quickstart 8/9
12/1/24, 9:41 PM Quickstart - Model Context Protocol

Each host application may implement MCP features differently or support different
capabilities. Check their respective documentation for specific setup instructions and
supported features.
Get Started Quickstart

Troubleshooting
Nothing showing up in Claude Desktop?

MCP or database errors?

Next steps

Build your first MCP server Explore examples


Create your own MCP servers to give your Browse our collection of example servers to
LLM clients new capabilities. see what’s possible.

Introduction Clients

https://modelcontextprotocol.io/quickstart 9/9

You might also like