Getting Started with Context Gateways

How to Import a Gateway

Think of gateways as bridges that connect Ctxpack to external services. When you import a gateway, you're telling Ctxpack how to talk to other systems like GitHub, Slack, or your company's database. Once connected, these services become available as tools in your context packs.

When You Need Gateways

You'll want to import a gateway when you need your AI to work with external services. Common examples include:

  • Getting data from GitHub repositories
  • Sending messages through Slack
  • Reading from databases or APIs
  • Accessing company-specific tools
  • Working with cloud services like AWS or Google Cloud, SalesForce or HubSpot

Step 1: Find the Gateway You Need

First, you need the connection details for the MCP server you want to import. This usually includes:

  • Server URL or endpoint
  • Authentication credentials (API keys, tokens)
  • Any required configuration parameters

Many popular services have existing MCP servers you can use. Check your service provider's documentation.

Step 2: Navigate to Gateways

From your Ctxpack dashboard, click on "Ctx Gateways" in the main navigation. You'll see a list of any gateways you've already imported. If this is your first time, the list will be empty.

Step 3: Start the Import Process

Click the "Import Gateway" button to begin adding a new connection.

Step 4: Enter Gateway Details

You'll need to provide several pieces of information:

Gateway Name: Give your gateway a descriptive name you'll recognize later. For example, "Company GitHub" or "Marketing Slack Workspace."

Server URL: This is the address where the MCP server is running. It might look like https://api.example.com/mcp or ws://localhost:3000.

Transport Protocol: This is either SSE or Streamable HTTP. You will get this information from your service provider's documentation. SSE is a legacy protocol that is being phased out so prefer Streamable HTTP if it is available.

Authentication: Most gateways require some form of authentication. This could be:

  • API keys
  • Bearer tokens
  • Username and password combinations

Ctxpack doesn't yet support importing gateways with OAuth authentication but is currently working on implementing the possibility to achieve authenticated connections using that also.

import-gateway-form.png

Step 5: Save Your Gateway

Once the connection test passes, click "Save Gateway" to import it into your Ctxpack workspace.

Step 6: Verify Import Success

After saving, you should see your new gateway appear in the gateway list. The status should be shown as "Connected" or "Active."

Using Your Imported Gateway

Now that your gateway is imported, you can use its imported tools in your context packs. When you create a new context pack, you'll see the capabilities from your imported gateway as an option to pick tools, resources, and prompts from.

The specific tools available depend on what the MCP server supports. A GitHub gateway might provide tools for creating issues, reading repository information, or managing pull requests. A Slack gateway could offer tools for sending messages, reading channel history, or managing team members.

Managing Your Gateways

Editing: You can modify gateway settings by clicking the edit button next to any gateway in your list. This is useful when credentials change or you need to update configuration. Monitoring: Keep an eye on gateway status. If a gateway shows as "Disconnected," it might indicate expired credentials, server downtime, or configuration issues. Removing: If you no longer need a gateway, you can delete it from your workspace. Note that this will break any tools or packs that depend on that gateway.

Common Issues and Solutions

Gateway won't connect: Double-check your server URL and credentials. Make sure the MCP server is running and accessible from your network. Tools not appearing: After importing a gateway, it may take a few minutes for available tools to populate. Refresh the page if needed. Authentication errors: Many services rotate API keys or tokens regularly. Check if your credentials need updating. Performance issues: Some MCP servers are faster than others. If a gateway seems slow, it might be a limitation of the external service rather than Ctxpack.

Security Considerations

When importing gateways, you're giving Ctxpack access to external services with your credentials. Make sure you:

  • Use dedicated API keys when possible rather than your personal credentials
  • Grant only the minimum permissions needed for your use case
  • Regularly rotate credentials and update your gateways
  • Monitor gateway usage to spot any unexpected activity

Next Steps

With your gateway imported, you can start building packs that use the external service. Check out the Packs documentation to learn how to create packs that leverage the capabilities of your new gateway connection.

You can also combine multiple gateways in a single context pack. For example, a project management pack might use both GitHub and Slack gateways to create a comprehensive workflow automation.