Overview
Let's get to know our project, from API to assistant!
In this lesson, we will:
- Learn about the domain we'll be working with
- Set up the Rover CLI and starter files
- Download and chat with Claude
Introducing Airlock
Want to book a trip to new, exciting, sometimes-fictional places in the vast universe? Enter Airlock!
With Airlock, you can find listings that meet your dates of choice and the number of beds you'll need. Learn what each place is all about and what amenities it offers, and if you're interested, you can book your stay in one click (provided you have enough space credits in your wallet of course)!
We won't be building Airlock in this course. Instead, we're going to take functionality that already exists in this API (such as queries for listings, their amenities, etc.) and capture it in various tools that we'll provide to our assistant.
First, we'll start small. Airlock is all about listings, so that's where we begin. Expand the collapsible below to see the schema we'll be starting with, which is live to query here.
Setting up our tools
Because the listings
server is hosted elsewhere, we won't need to download any API-related code. But there are a few other components we'll need to get in place before proceeding.
- First off, we'll need Rover, Apollo's official command-line interface tool for interacting with graphs. We'll use Rover to run and test our MCP server.
- Next, we'll define the details about our graph, such as where it's running and how to retrieve its schema.
- Finally, we'll set up our AI assistant, Claude, by Anthropic. Like many other contemporary LLMs, it excels in text generation, answering questions, and assisting with a variety of tasks.
Let's get to it!
Installing Rover
In upcoming lessons, we'll use Rover to run both our local router and our MCP server. You will need at least v0.32.0
to follow along with the course.
Cloning the repository
Next, let's get our project cloned. Navigate to a new empty directory somewhere on your computer, and run the following command.
git clone https://github.com/apollographql-education/odyssey-apollo-mcp.git
Taking a look inside of our repo, we'll see that it contains an empty operations
folder, along with a single file called supergraph.yaml
.
📂 odyssey-apollo-mcp┣ 📂 operations┗ 📄 supergraph.yaml
We'll add files to the operations
folder as we work through the course.
Next, let's get our AI assistant running.
Setting up the AI assistant Claude
Head to Claude's Download page and select the option for your operating system. When the download completes, launch the application. You'll need to sign up for an account with Anthropic, but we won't do anything in this course that requires a paid subscription.
Once you've completed the onboarding process, you should see a chat interface where you can write your first messages to Claude.
Chatting with Claude
Let's take it for a spin. Checking our listings schema (in the collapsible at the top of this lesson), we'll see the featuredListings
entrypoint on the Query
type.
type Query {"A curated array of listings to feature on the homepage"featuredListings: [Listing!]!# ... other Query fields}
But if we ask about featured listings, is Claude going to be able to tell us anything?
We can start our chat with the question:
What are the featured listings today?
Claude, as we might have predicted, won't be able to give us any information about featured listings. It has no idea where to begin! We haven't provided any context about what listings, or where it might even find that information.
We could try again, with a more explicit question that includes the API URL:
Can you tell me about the featured listings at https://rt-airlock-subgraphs-listings.herokuapp.com/?
We'll see in response that Claude is not able to make HTTP requests to external services or APIs. And even if it were able to retrieve data directly from the API and tell us about it, our users would always have to provide the endpoint themselves for the assistant to inspect. Not a very good chat experience!
This is a great illustration of why we need tools: special actions that we can equip our assistant with, so it can ultimately get the information that our users are after.
Key takeaways
- Our setup includes the Rover CLI, a configuration file, and the AI assistant Claude.
Up next
Our AI assistant is currently powerless to answer our burning questions about Airlock's listings. In the next lesson, let's get our API running locally.
Share your questions and comments about this lesson
This course is currently in
You'll need a GitHub account to post below. Don't have one? Post in our Odyssey forum instead.