This document outlines the migration from Smithery to Composio for the Mapbox integration in QCX.
The QCX project has migrated from using Smithery's MCP server hosting to Composio's integration platform for Mapbox functionality. This change provides better scalability, more robust authentication, and improved tool management.
Removed:
@smithery/cli(^1.2.5)@smithery/sdk(^1.0.4)smithery(^0.5.2)
Added:
@composio/core(^0.5.0)
Old (Smithery):
SMITHERY_PROFILE_ID="your_smithery_profile_id_here"
SMITHERY_API_KEY="your_smithery_api_key_here"
NEXT_PUBLIC_SMITHERY_PROFILE_ID="your_smithery_profile_id_here"
NEXT_PUBLIC_SMITHERY_API_KEY="your_smithery_api_key_here"New (Composio):
COMPOSIO_MAPBOX_AUTH_CONFIG_ID="ac_YOUR_MAPBOX_CONFIG_ID"
COMPOSIO_USER_ID="user@example.com"
MAPBOX_ACCESS_TOKEN="your_mapbox_api_key"
NEXT_PUBLIC_COMPOSIO_MAPBOX_AUTH_CONFIG_ID="ac_YOUR_MAPBOX_CONFIG_ID"
NEXT_PUBLIC_COMPOSIO_USER_ID="user@example.com"mapbox_mcp_config.json
Old:
{
"mcpServers": {
"mapbox-mcp-server": {
"command": "npx",
"args": [
"-y",
"@smithery/cli@latest",
"run",
"@ngoiyaeric/mapbox-mcp-server",
"--key",
"705b0222-a657-4cd2-b180-80c406cf6179",
"--profile",
"smooth-lemur-vfUbUE"
]
}
}
}New:
{
"composio": {
"mapbox": {
"authConfigId": "ac_YOUR_MAPBOX_CONFIG_ID",
"userId": "user@example.com",
"description": "Composio configuration for Mapbox integration"
}
}
}Old Connection Method:
const mcp = useMcp({
url: `https://server.smithery.ai/@Waldzell-Agentics/mcp-server/mcp?profile=${process.env.NEXT_PUBLIC_SMITHERY_PROFILE_ID}&api_key=${process.env.NEXT_PUBLIC_SMITHERY_API_KEY}`,
debug: process.env.NODE_ENV === 'development',
autoReconnect: true,
autoRetry: 5000,
});New Connection Method:
const composioClient = getComposioClient();
const { connectionId, connectedAccount } = await initializeComposioMapbox();Old:
const result = await mcp.callTool('geocode_location', {
query: address,
includeMapPreview: true,
});New:
const result = await composioClient.executeAction({
action: 'mapbox_geocode_location',
params: {
query: address,
includeMapPreview: true,
},
connectedAccountId: connectionId,
});bun install @composio/corebun remove @smithery/cli @smithery/sdk smithery- Sign up at https://composio.dev
- Create a new auth config for Mapbox
- Select "API Key" as the authentication method
- Note your auth config ID (starts with
ac_)
- Copy
.env.local.exampleto.env.local(if not already done) - Replace Smithery variables with Composio variables:
COMPOSIO_MAPBOX_AUTH_CONFIG_ID="ac_YOUR_ACTUAL_CONFIG_ID" COMPOSIO_USER_ID="your_email@example.com" MAPBOX_ACCESS_TOKEN="your_mapbox_token"
The following files have been updated automatically:
mapbox_mcp/composio-mapbox.ts(new file)mapbox_mcp/hooks.ts(updated)mapbox_mcp/index.ts(updated)mapbox_mcp_config.json(updated)package.json(updated).env.local.example(updated)
# Test the connection
bun run mapbox_mcp/index.ts
# Run the development server
bun run devThe useMCPMapClient hook maintains the same interface, so existing components using it should continue to work without changes:
const {
isConnected,
isLoading,
error,
connect,
disconnect,
processLocationQuery,
geocodeLocation,
calculateDistance,
searchNearbyPlaces,
} = useMCPMapClient();Solution: Ensure you've called connect() before using any tool functions:
useEffect(() => {
connect();
}, [connect]);Solution: Verify your COMPOSIO_MAPBOX_AUTH_CONFIG_ID starts with ac_ and is copied correctly from the Composio dashboard.
Solution: Check that your MAPBOX_ACCESS_TOKEN is valid and has the necessary scopes enabled in your Mapbox account.
Solution: Verify the action names match Composio's Mapbox integration. Common actions:
mapbox_geocode_locationmapbox_calculate_distancemapbox_search_nearby_placesmapbox_generate_map_link
- Better Authentication Management: Centralized auth config management
- Improved Security: API keys stored securely in Composio
- Scalability: Better handling of multiple integrations
- Monitoring: Built-in logging and monitoring in Composio dashboard
- Flexibility: Easier to add new tools and integrations
If you encounter issues during migration:
- Check the Composio dashboard for connection status
- Review the logs in your development console
- Consult the mapbox_mcp/README.md file
- Open an issue in the QCX repository
If you need to rollback to Smithery:
# Reinstall Smithery packages
bun install @smithery/cli@^1.2.5 @smithery/sdk@^1.0.4 smithery@^0.5.2
# Restore old environment variables in .env.local
# Restore old code from git history
git checkout HEAD~1 -- mapbox_mcp/However, we recommend staying with Composio for the improved features and maintainability.