MCP Integration
Connect AI assistants to Linkit via the Model Context Protocol — zero setup, full API access
MCP Integration
Connect Claude, Cursor, Windsurf, Gemini, or any MCP-compatible AI assistant directly to your Linkit instance. The MCP server exposes your entire API surface — 85+ tools covering products, orders, inventory, integrations, and more — with zero local setup.
What is MCP? The Model Context Protocol is an open standard that lets AI assistants discover and call your APIs programmatically. Think of it as "USB for AI" — plug in and go.
Quick Start
Point your MCP client at your Linkit instance. That's it.
https://linkit.works/api/v1/mcpClaude Desktop
Add this to your claude_desktop_config.json:
{
"mcpServers": {
"linkit": {
"url": "https://linkit.works/api/v1/mcp"
}
}
}Cursor
In Cursor settings → MCP Servers → Add Server:
{
"mcpServers": {
"linkit": {
"url": "https://linkit.works/api/v1/mcp"
}
}
}Windsurf
Add to your MCP configuration:
{
"mcpServers": {
"linkit": {
"serverUrl": "https://linkit.works/api/v1/mcp"
}
}
}Generic MCP Client
Any client supporting the Streamable HTTP transport can connect:
- Endpoint:
https://linkit.works/api/v1/mcp - Transport: Streamable HTTP (stateless)
- Protocol: MCP 2025-06-18
Authentication
The MCP endpoint itself is public — no auth needed to discover tools. However, most API operations require a Bearer token. Pass it as the authorization argument when calling tools:
authorization: "Bearer eyJhbGciOiJIUzI1NiIs..."Public endpoints like get_health and get_ping work without authentication.
Available Tools
The server auto-generates 85+ tools from the Linkit OpenAPI specification. Every API endpoint becomes an MCP tool.
Tool Naming Convention
Tools follow the pattern {method}_{resource}:
| Tool Name | HTTP | Endpoint |
|---|---|---|
get_products | GET | /api/v1/products |
post_products | POST | /api/v1/products |
get_branches_by_id | GET | /api/v1/branches/{ivId} |
put_branches_by_id | PUT | /api/v1/branches/{ivId} |
delete_branches_by_id | DELETE | /api/v1/branches/{ivId} |
post_branches_bulk | POST | /api/v1/branches/bulk |
get_health | GET | /api/v1/health |
get_apps | GET | /api/v1/apps |
Tool Categories
Products (6 tools)
CRUD + bulk operations for your product catalog
SKUs (6 tools)
Per-branch inventory management — stock levels, pricing
Orders (5 tools)
Order ingestion, listing, analytics, and bulk operations
Branches (5 tools)
Physical locations with geo-search and bulk management
Brands (5 tools)
Brand CRUD + bulk operations with product associations
Categories (5 tools)
Hierarchical product categorization
Customers (6 tools)
Customer profiles, addresses, and lookup
Integrations (8 tools)
Platform connections, execution, batch operations, analytics
Health & System (5 tools)
Ping, health checks, system status, telemetry
Available Resources
The MCP server also provides documentation resources that AI assistants can read:
| Resource URI | Description |
|---|---|
linkit://docs/swagger.json | Full OpenAPI specification (JSON) |
linkit://docs/swagger.yaml | Full OpenAPI specification (YAML) |
linkit://docs/api-overview | API overview with auth, pagination, and resources |
linkit://docs/tool-catalog | Complete tool listing organized by category |
Example Prompts
Once connected, try asking your AI assistant:
- "List all my products using Linkit"
- "Create a new branch called 'Dubai Mall' at coordinates 25.1972, 55.2744"
- "Show me the health status of my Linkit instance"
- "Execute the hungerstation-inventory integration for my organization"
- "What integrations are available in my Linkit setup?"
- "Bulk update stock levels for all SKUs at branch BR-001"
Technical Details
Architecture
The MCP server is embedded directly in your Linkit binary — no separate service to deploy or manage. It:
- Parses the embedded Swagger/OpenAPI specification at startup
- Generates an MCP tool for every API endpoint automatically
- Proxies tool calls as HTTP requests to the local PocketBase server
- Returns API responses as structured MCP content
This means the MCP surface always stays in sync with your API without manual maintenance.
Transport
The server uses the Streamable HTTP transport in stateless mode, providing maximum compatibility with MCP clients. Each request is self-contained.
CORS
CORS is fully enabled — the MCP endpoint accepts connections from any origin, making it compatible with browser-based MCP clients and development tools.
Troubleshooting
Connection Failed
Verify your Linkit instance is running and accessible:
curl https://linkit.works/api/v1/pingAuthentication Errors
Protected endpoints require a Bearer token. Make sure you're passing it as the authorization tool argument, not as an HTTP header (the MCP client handles the transport layer).
Tool Not Found
The tool catalog is generated from the Swagger specification. If an endpoint is missing, regenerate your Swagger docs:
swag init -d internal/api/v1 -o docs --parseDependency --parseInternalThen rebuild your Linkit binary.