Expose
MCP server for exposing Metalogue to AI tools and agents.
Expose
Expose is the AI-native integration layer. Deploy Metalogue as an MCP (Model Context Protocol) server, enabling Claude, ChatGPT, and other AI tools to query your organizational knowledge.
Overview
graph LR
subgraph "AI Tools"
CLAUDE[Claude Desktop]
CURSOR[Cursor]
COPILOT[GitHub Copilot]
end
subgraph "Metalogue"
MCP[MCP Server]
API[API Layer]
FCRS[FCRS Core]
end
CLAUDE -->|MCP| MCP
CURSOR -->|MCP| MCP
COPILOT -->|MCP| MCP
MCP --> API
API --> FCRS
What is MCP?
The Model Context Protocol (MCP) is an open standard for connecting AI assistants to external data sources. Instead of pasting context into prompts, AI tools can:
- Discover available tools and resources
- Query data in real-time
- Execute actions on your behalf
Metalogue implements MCP to give AI tools access to your entire organizational memory.
Setting Up
1. Get Your MCP Endpoint
Your MCP endpoint is available at:
https://api.metalogue.xyz/v1/expose/mcp
Or self-host the MCP server:
# Clone and run
git clone https://github.com/metalogue/mcp-server
cd mcp-server
npm install
METALOGUE_API_KEY=mlo_xxx npm start
2. Configure Claude Desktop
Add to your Claude Desktop configuration (claude_desktop_config.json):
{
"mcpServers": {
"metalogue": {
"command": "node",
"args": ["/path/to/mcp-server/index.js"],
"env": {
"METALOGUE_API_KEY": "mlo_your_api_key"
}
}
}
}
Or use the hosted endpoint:
{
"mcpServers": {
"metalogue": {
"url": "https://api.metalogue.xyz/v1/expose/mcp",
"headers": {
"Authorization": "Bearer mlo_your_api_key"
}
}
}
}
3. Configure Cursor
In Cursor settings, add:
{
"mcp": {
"servers": {
"metalogue": {
"url": "https://api.metalogue.xyz/v1/expose/mcp",
"apiKey": "mlo_your_api_key"
}
}
}
}
Available Tools
The MCP server exposes these tools to AI assistants:
query_knowledge
Search across all connected sources:
// Tool signature
{
name: "query_knowledge",
description: "Search organizational knowledge across Slack, Notion, GitHub, etc.",
parameters: {
query: { type: "string", required: true },
sources: { type: "array", items: "string" },
limit: { type: "number", default: 5 }
}
}
// Example usage by Claude
"Let me search for information about authentication decisions..."
[Calls query_knowledge with query="authentication architecture decision"]
get_document
Retrieve a specific document:
{
name: "get_document",
description: "Get full content of a specific document",
parameters: {
document_id: { type: "string", required: true }
}
}
list_connectors
List available data sources:
{
name: "list_connectors",
description: "List all connected data sources",
parameters: {}
}
execute_action
Perform actions on connected tools:
{
name: "execute_action",
description: "Execute an action on a connected tool (e.g., send Slack message)",
parameters: {
connector_id: { type: "string", required: true },
intent: { type: "string", required: true },
context: { type: "object" }
}
}
Resources
The MCP server also exposes resources:
Connected Sources
{
uri: "metalogue://connectors",
name: "Connected Data Sources",
description: "List of all connected tools and their sync status"
}
Recent Documents
{
uri: "metalogue://recent",
name: "Recent Documents",
description: "Most recently synced documents across all sources"
}
API Endpoints
MCP WebSocket
wss://api.metalogue.xyz/v1/expose/mcp/ws
The MCP server communicates via WebSocket for real-time bidirectional messaging.
MCP HTTP (Fallback)
POST /v1/expose/mcp/invoke
Content-Type: application/json
{
"tool": "query_knowledge",
"parameters": {
"query": "authentication decision",
"limit": 5
}
}
List Available Tools
GET /v1/expose/mcp/tools
Response:
{
"tools": [
{
"name": "query_knowledge",
"description": "Search organizational knowledge",
"parameters": {
"query": { "type": "string", "required": true },
"sources": { "type": "array" },
"limit": { "type": "number" }
}
}
]
}
List Resources
GET /v1/expose/mcp/resources
Example Conversation
Once configured, AI assistants can naturally query your knowledge:
User: "What did the team decide about the authentication architecture last month?"
Claude:
Let me search our organizational knowledge for this...
[Querying Metalogue...]
Based on the Slack discussions and Notion documentation I found:
The team decided on a centralized auth service using the singleton pattern on January 15th. Key points:
- Single source of truth for auth state
- JWT tokens with 24-hour expiry
- Refresh tokens stored in Redis
Sources:
- Slack #engineering (Jan 15)
- Notion "Auth Architecture" page
- GitHub PR #1234 discussion
Security
Authentication
All MCP connections require a valid API key:
- WebSocket:
Authorizationheader on connection - HTTP:
Authorization: Bearer mlo_xxxheader
Permission Scoping
MCP respects your API key's permissions:
| Permission | MCP Capability |
|---|---|
query | query_knowledge, get_document |
connector:read | list_connectors |
connector:write | execute_action |
Audit Logging
All MCP interactions are logged:
{
"event_type": "mcp.tool_invoked",
"tool": "query_knowledge",
"user_id": "...",
"timestamp": "2026-01-20T02:00:00Z"
}
Self-Hosting
For enterprise deployments, self-host the MCP server:
# Docker
docker run -p 3333:3333 \
-e METALOGUE_API_KEY=mlo_xxx \
metalogue/mcp-server
# Node.js
git clone https://github.com/metalogue/mcp-server
cd mcp-server
npm install
METALOGUE_API_KEY=mlo_xxx npm start
Configuration
{
"port": 3333,
"metalogue_api_key": "mlo_xxx",
"metalogue_base_url": "https://api.metalogue.xyz",
"allowed_origins": ["https://your-domain.com"],
"rate_limit": {
"requests_per_minute": 60
}
}
Troubleshooting
Connection Issues
# Test WebSocket connection
wscat -c wss://api.metalogue.xyz/v1/expose/mcp/ws \
-H "Authorization: Bearer mlo_xxx"
Tool Not Found
Ensure your API key has the required permissions for the tool you're calling.
Rate Limiting
MCP requests count against your API rate limits. If rate limited, the tool returns an error.
