Integration
Adapters
Learn how Dock AI adapters connect your platform to the MCP ecosystem.
What is an Adapter?
An adapter is a custom integration layer that translates between your API and the MCP protocol. It defines what actions AI assistants can perform and how those actions map to your existing endpoints.
Tip
You don't need to build the adapter yourself. Our team creates it based on your API documentation and business requirements.
Adapter Components
1. Tool Definitions
Each capability of your platform is exposed as a "tool" that AI can use. Tools have names, descriptions, and parameter schemas.
Tool Definition Example
{
name: 'search_restaurants',
description: 'Search for restaurants by location, cuisine type, or name',
parameters: {
type: 'object',
properties: {
location: {
type: 'string',
description: 'City or address to search near'
},
cuisine: {
type: 'string',
description: 'Type of cuisine (italian, french, etc.)'
},
price_range: {
type: 'string',
enum: ['$', '$$', '$$$', '$$$$'],
description: 'Price range filter'
}
},
required: ['location']
}
}2. Handlers
Handlers execute the tool logic – calling your API, transforming data, and returning results in a format AI can understand.
Handler Example
async function searchRestaurants(params, context) {
// Call your API
const response = await yourApi.get('/restaurants/search', {
params: {
lat: await geocode(params.location).lat,
lng: await geocode(params.location).lng,
cuisine: params.cuisine,
price: params.price_range,
},
headers: {
'Authorization': `Bearer ${context.providerApiKey}`
}
})
// Transform for AI consumption
return response.data.restaurants.map(r => ({
id: r.id,
name: r.name,
address: r.formatted_address,
rating: r.avg_rating,
cuisine: r.cuisine_type,
price_range: r.price_level,
}))
}3. Authentication
Adapters handle two types of authentication:
- User auth – OAuth tokens from Dock AI users
- Provider auth – API keys or service accounts for your platform
Supported Platforms
We've built adapters for various platform types:
Restaurant booking systems
Hotel reservation platforms
Appointment scheduling
Event ticketing
Service marketplaces
E-commerce platforms
Development Process
- Discovery call – We discuss your platform, API, and use cases
- API review – We analyze your documentation and test endpoints
- Adapter development – Our team builds the adapter (typically 1-2 weeks)
- Testing – We test with your sandbox environment
- Launch – Adapter goes live on Dock AI
- Iteration – We add features and optimize based on usage
Get Started
Ready to build an adapter for your platform? Let's talk about your API and requirements.
Contact Us