Context Protocol Docs
Start building
  • PROTOCOL OVERVIEW
    • ✖️About Context Protocol
    • 👾Why Context Protocol?
      • Verified AI-Ready Domains (VARD)
      • Training AI with verified data
      • SaaS Solution
    • 🤖Technology behind Context
    • 📈$TEX Token
      • Multi-chain token
      • Token Utility
      • Governance
      • Allocation
    • 🧐Use Cases and Applications
      • 📢Telegram bot for updates
      • 🔵Basenames integration
      • 🌎dWeb: Descentralized Website
      • 📌Decentralized Link3
  • DEVELOPERS
    • 👨‍💻Why build on Context
    • 🏗️Typescript SDK
      • Initialization
      • Working with Domains
      • Managing Documents
      • Creating Templates
      • Assets
      • Error Handling
    • 📑Example Workflow
    • ✨Create your first Domain
  • COMMUNITY
    • 🪂Community Program
    • 🫂Social Media
  • RESOURCES
    • 🛟Support
    • 🖥️WebApp
Powered by GitBook
On this page
  • Install the SDK
  • Setting Up Your Connection

Was this helpful?

  1. DEVELOPERS
  2. Typescript SDK

Initialization

PreviousTypescript SDKNextWorking with Domains

Last updated 9 months ago

Was this helpful?

Install the SDK

Install the Context SDK to your TypeScript project using npm:

npm install @contextprotocol/sdk

Setting Up Your Connection

To use Context, you always need a domain. This domain acts as your namespace within Context, where all your documents will be stored. Then, you'll need to obtain an API key for your domain.

You can claim your domain and generate the API key by creating an account at .

Initialize the SDK:

import { Context } from '@contextprotocol/sdk';

const ctx = new Context({ apiKey: "your_api_key_here" }); // Replace with your API key
🏗️
app.ctx.xyz