Introduction
Getting Started with Ctxpack
Let's get you set up with your first context pack in about 15 minutes. By the end of this guide, you'll have created a working pack and used it with your AI assistant.
What You Need Before Starting
An AI client that supports MCP
You need an AI assistant that can connect to MCP servers. The most common options are:
- VS Code with GitHub Copilot
- Claude Desktop app
- Continue.dev extension
- Cursor IDE
For this tutorial, we'll use VS Code with GitHub Copilot since it's widely available and easy to set up.
Basic understanding of AI assistants
You should be comfortable asking AI assistants to help with tasks. That's it. No coding experience required.
An account on https://meteosource.com We will use MeteoSource as out example API to test things out with.
Account Setup
- Log in to your account in app.ctxpack.com
- Navigate to the Settings Section
- Generate your API token in Settings → API Keys (you'll need this later)
Save that API token somewhere safe. You'll use it to connect your packs to AI clients.
Your First Pack in 15 Minutes
We're going to create a "Weather Info Pack" that lets your AI assistant get current weather for any city. This example is simple but shows you all the main concepts.
Step 1: Create Your First Tool (3 minutes)
For a more detailed introduction on how to create tools, navigate to Creating your first tool page.
Tools are actions your AI can take. Let's create one that gets weather information.
Go to Tools in your Ctxpack dashboard
Click "Deploy Tool"
Fill in the details:
- Name:
get-place-meteo-information
. (See "Creating your first tool" for more information about naming best practices.) - Description:
Get information for any place_id worldwide. Use input place_id to define the city to get information from.
- Input Schema: Use this JSON schema:
{ "type": "object", "properties": { "place_id": { "type": "string", "description": "place_id to get weather for (e.g., 'london', 'new-york-city', 'tokyo')" } }, "required": ["place_id"] }
- API Endpoint:
https://www.meteosource.com/api/v1/free/point
- Method: GET
- Integration Type: REST
- Name:
Select Custom Authentication
- Add
X-API-Key
as header key - Add
${METEO_API_KEY}
as header value
- Add
Save the tool
Navigate to Secrets: Settings -> Manage Secrets. Create a new secret:
- Click Add Secret
- Secret name:
METEO_API_KEY
- Secret value: API key value you get when you log in to MeteoSource.com and look at your account dashboard.
Test your tool by navigating back to Tools, selecting your tool, and filling out the test input on the bottom of the screen. Enter for example
Cusco
as the city.
You should see weather data come back. If it doesn't work, double-check your API key.
Step 2: Add a Resource (2 minutes)
Resources are information your AI needs. Let's add a template for formatting weather responses.
- Go to Resources in your Ctxpack
- Click "Add Resource"
- Fill in the details:
- Resource URI:
ctxpack://templates/weather-response
- Name:
weather-response-template
- Type: Text
- Content:
# Weather Report for {city} **Current Conditions:** {weather_description} **Temperature:** {temperature}°C (feels like {feels_like}°C) **Humidity:** {humidity}% **Wind:** {wind_speed} m/s *Last updated: {timestamp}*
- Resource URI:
- MIME type:
text/markdown
- Save the resource
This template gives your AI a consistent way to present weather information.
Step 3: Create a Prompt (2 minutes)
Prompts guide how your AI behaves. Let's create one that makes your weather assistant helpful and friendly.
Go to Prompts in Ctxpack
Click "Add Prompt"
Fill in the details:
- Name:
weather-assistant-prompt
- Content:
You are a helpful weather assistant. When users ask about weather: 1. Use the get-place-meteo-information tool to fetch current conditions 2. Use `place_id` as the input parameter. This is usually a city name like winnipeg or new-york-city 3. Format your response using the weather-response-template 4. Be conversational and include helpful context like whether it's good weather for outdoor activities 5. If the weather data seems unusual, mention it 6. Always include the temperature in both Celsius and Fahrenheit for user convenience, but always remember to take a friendly jab towards countries using Fahrenheit instead of the better Celsius option Keep responses concise but informative. I want to get weather information from city: {city_name}
- Name:
Add argument
city_name
and mark it as required. Remember to click 'Add Argument' to store it.Save the prompt
Step 4: Bundle Into a Pack (3 minutes)
Now let's combine everything into a pack your AI can use.
Go to Packs in Ctxpack
Click "Create Ctx Pack"
Fill in the details:
- Name:
Weather Information Pack
- Description:
Get current weather information with friendly, formatted responses
- Name:
Add components:
- Tools: Select your
get-meteo-information-for-place
tool. - Resources: Select your
weather-response-template
resource - Prompts: Select your
weather-assistant-prompt
prompt
- Tools: Select your
Save the pack
You'll get a Pack ID. Copy this somewhere safe.
Step 5: Create Ctxpack API Token (1 minute)
Now let's create an API token to Ctxpack so we can use out newly created context pack.
- Navigate to Settings
- Click 'Generate New Token'
- Select duration and click 'Generate Token'
- Copy token to a safe place
Step 6: Connect to VS Code (3 minutes)
Now let's make your pack available in VS Code.
Open VS Code
Open your MCP User Configuration. Hit Ctrl/Cmd + Shift + P and search for
MCP: Open User Configuration
Add your Ctxpack server to the configuration file:
{ "servers": { "my-context-pack": { "url": "http://api.ctxpack.com/servers/<your-pack-id>/mcp", "headers": { "Authorization": "Bearer <your-generated-ctxpack-api-token>" } } } }
Replace the placeholders with your actual API token and Pack ID
Save the file and click Start that is hovering above your server configuration
Step 6: Test It Works (2 minutes)
Time to see your pack in action.
- Open a new file in VS Code
- Open GitHub Copilot Chat (Ctrl/Cmd + Alt + I)
- Click 'Add Context' and select
weather-response-template
our 'MCP Resources' - Hit
/
on the keyboard and select the registeredweather-assistant-prompt
prompt. - Fill in the wanted city to the input field that pops up
- Check the prompt and click the play button/hit enter
- Watch the magic happen
Your AI should use your weather tool, get the data, and format it nicely using your template and prompt instructions.
If it works, congratulations! You just created and used your first context pack.
What Just Happened?
You created a complete workflow that your AI can now use:
- The tool lets your AI fetch weather data from an API
- The resource gives your AI a template for consistent formatting
- The prompt guides your AI on how to behave and present information
- The pack bundles everything together so your AI has all the pieces it needs
Troubleshooting
Pack not showing up in VS Code?
- Check that you restarted VS Code after adding the configuration
- Verify your API token is correct in the settings
- Make sure your Pack ID matches exactly
Tool not working?
- Check your OpenWeatherMap API key is valid
- Try testing the tool directly in the Ctxpack dashboard first
- Make sure you're using the free tier correctly (5 calls per minute limit)
AI not using your pack?
- Try being more specific: "Use the weather pack to check London weather"
- Check that GitHub Copilot has access to MCP servers in your VS Code setup
Next Steps
Now that you have a working pack, you can:
Customize your weather pack
- Add more cities to the tool
- Create different response formats for different situations
- Add prompts for different types of weather advice
Create your second pack
- Think about a task you do regularly that involves multiple steps
- Check out the demo tasks examples for inspiration
- Start with something simple and build up
Learn more advanced features
- Explore how to use multiple tools together
- Learn about conditional logic in prompts
- Understand how to share packs with your team
Join the community
- Share your packs and see what others have built
- Get help with more complex use cases
- Contribute to the growing library of context packs
You're now ready to start automating your workflows with AI. The key is to start simple and gradually build more sophisticated packs as you get comfortable with the concepts.