Integration
Note: This document replaces a symlink that previously pointed to
./llm-mcp/docs/integration/integration.md
which doesn't exist.
This document provides guidance on integrating the Model Control Plane with other systems.
Integration Optionsโ
The MCP can be integrated with various systems using:
- REST API - HTTP-based integration
- gRPC API - High-performance binary protocol
- WebSocket - For real-time streaming
- Node.js Client - Direct integration in Node.js applications
Basic REST Integrationโ
// Example API call
const response = await fetch('https://mcp.example.com/v1/generate', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer YOUR_API_KEY'
},
body: JSON.stringify({
model: 'claude-3-haiku',
prompt: 'Write a haiku about programming',
max_tokens: 100
})
});
const result = await response.json();
console.log(result.text);
Node.js Clientโ
const [MCPClient] = require('@bluefly/mcp-client');
const client = new MCPClient({
apiKey: process.env.MCP_API_KEY,
endpoint: 'https://mcp.example.com'
});
const result = await client.generate({
model: 'claude-3-haiku',
prompt: 'Write a haiku about programming',
maxTokens: 100
});
console.log(result.text);
For more detailed integration instructions, see the specific integration guides in the documentation.