### Start CORE Services with Docker Compose Source: https://docs.getcore.me/self-hosting/docker This command uses Docker Compose to build and start the CORE services in detached mode (-d). Ensure Docker and Docker Compose are installed and the .env file is configured. The output will indicate the services starting. ```bash docker compose up -d ``` -------------------------------- ### Clone CORE Repository using Git Source: https://docs.getcore.me/self-hosting/docker This command clones the CORE repository from GitHub. Ensure you have Git installed. The output will be the CORE project files in a new directory. ```bash git clone https://github.com/RedPlanetHQ/core.git cd core/hosting/docker ``` -------------------------------- ### GitHub Integration Example Source: https://docs.getcore.me/integrations/mcp-hub-guide Example configuration for a GitHub integration using HTTP-based MCP, including available tools and how agents can call them. ```APIDOC ## HTTP MCP Server Example (GitHub) ### Description Example configuration for a GitHub integration using HTTP-based MCP, including available tools and how agents can call them. ### Method N/A (Configuration & Usage Example) ### Endpoint N/A ### Parameters N/A ### Request Example (spec.json) ```json { "name": "GitHub extension", "key": "github", "description": "Manage GitHub repositories and issues", "icon": "github", "auth": { "OAuth2": { "token_url": "https://github.com/login/oauth/access_token", "authorization_url": "https://github.com/login/oauth/authorize", "scopes": ["repo", "user"] } }, "mcp": { "type": "http", "url": "https://api.githubcopilot.com/mcp/", "headers": { "Authorization": "Bearer ${config:access_token}", "Content-Type": "application/json" } } } ``` ### Response #### Available Tools When Core connects to GitHub's MCP server, these tools become available: * `github_create_issue` - Create a new issue * `github_search_code` - Search code across repositories * `github_create_pull_request` - Create a new PR * `github_list_commits` - List commits for a repository #### Agent Tool Call Example ```typescript // Agent calls this internally await mcpClient.callTool('github_create_issue', { owner: 'user', repo: 'project', title: 'Bug: Login fails', body: 'Steps to reproduce...' }); ``` ``` -------------------------------- ### Local Webhook Testing with ngrok (Bash) Source: https://docs.getcore.me/integrations/webhook-based-guide Demonstrates how to test webhooks locally using ngrok. This involves starting an ngrok tunnel to expose a local server (e.g., running on port 3000) to the internet and configuring the webhook URL in the target service (e.g., Slack). ```bash ngrok http 3000 ``` -------------------------------- ### GET /api/v1/mcp Source: https://docs.getcore.me/mcp/configuration Configure CORE's MCP endpoint by specifying your source and desired integrations via query parameters. This endpoint allows for flexible setup to tailor the integrations used by CORE. ```APIDOC ## GET /api/v1/mcp ### Description Configure CORE's MCP endpoint with query parameters to specify your source and select integrations. ### Method GET ### Endpoint https://core.heysol.ai/api/v1/mcp ### Parameters #### Query Parameters - **source** (string) - Required - Identifies your connection in the dashboard. - **integrations** (string) - Optional - Specify which integrations to include (e.g., `github,linear`). - **no_integrations** (boolean) - Optional - Disable all integrations, using only CORE tools (`true`). ### Request Example ``` https://core.heysol.ai/api/v1/mcp?source=Claude https://core.heysol.ai/api/v1/mcp?source=Cursor&integrations=github,linear https://core.heysol.ai/api/v1/mcp?source=VSCode&no_integrations=true ``` ### Response #### Success Response (200) This endpoint typically returns a success status or redirects, depending on the client implementation. The configuration itself is applied to subsequent CORE operations. #### Response Example (No specific response body is detailed; the configuration is applied server-side.) ``` -------------------------------- ### Process Slack Events and Create Activities in TypeScript Source: https://docs.getcore.me/integrations/webhook-based-guide This TypeScript code handles incoming Slack events, distinguishing between SETUP, IDENTIFY, and PROCESS types. It utilizes helper functions to create activity events from message and reaction data, including fetching permalinks and conversation details. Dependencies include '@redplanethq/sdk' and 'axios'. ```typescript import { integrationCreate } from './account-create'; import { createActivityEvent } from './create-activity'; import { IntegrationCLI, IntegrationEventPayload, IntegrationEventType, Spec, } from '@redplanethq/sdk'; export async function run(eventPayload: IntegrationEventPayload) { switch (eventPayload.event) { case IntegrationEventType.SETUP: return await integrationCreate(eventPayload.eventBody); case IntegrationEventType.IDENTIFY: // Extract user ID from Slack event return [{ type: 'identifier', data: eventPayload.eventBody.event.event.user || eventPayload.eventBody.event.event.message.user, }]; case IntegrationEventType.PROCESS: // Process webhook event return createActivityEvent( eventPayload.eventBody.eventData, eventPayload.config ); default: return [{ type: 'error', data: `Unknown event type: ${eventPayload.event}` }]; } } class SlackCLI extends IntegrationCLI { constructor() { super('slack', '1.0.0'); } protected async handleEvent(eventPayload: IntegrationEventPayload): Promise { return await run(eventPayload); } protected async getSpec(): Promise { // Return spec configuration return { name: 'Slack extension', key: 'slack', // ... rest of spec }; } } function main() { const slackCLI = new SlackCLI(); slackCLI.parse(); } main(); ``` -------------------------------- ### Set Configuration Placeholders during OAuth Setup (TypeScript) Source: https://docs.getcore.me/integrations/mcp-hub-guide Demonstrates how to set configuration placeholders, such as access tokens and team IDs, during the integration's OAuth setup phase using TypeScript. These placeholders are then accessible via the `${config:key}` syntax in MCP configurations. ```typescript // account-create.ts export async function integrationCreate(data: any) { const { oauthResponse } = data; return [{ type: 'account', data: { accountId: user.id.toString(), config: { access_token: oauthResponse.access_token, refresh_token: oauthResponse.refresh_token, team_id: user.team_id, custom_setting: 'value', // This config is accessible in MCP as ${config:*} mcp: { tokens: { access_token: oauthResponse.access_token } } } } }]; } ``` -------------------------------- ### MCP Configuration Placeholder Replacement Example Source: https://docs.getcore.me/integrations/mcp-hub-guide Illustrates the replacement of configuration placeholders like `${config:access_token}` and `${config:team_id}` with actual runtime values in an HTTP MCP configuration. This shows the 'before' and 'after' states of the spec.json during runtime. ```json // Before replacement (spec.json) { "mcp": { "type": "http", "url": "https://api.service.com/mcp/", "headers": { "Authorization": "Bearer ${config:access_token}", "X-Team-ID": "${config:team_id}" } } } // After replacement (runtime) { "mcp": { "type": "http", "url": "https://api.service.com/mcp/", "headers": { "Authorization": "Bearer xoxp-actual-token-here", "X-Team-ID": "T12345" } } } ``` -------------------------------- ### Agent Call to GitHub MCP Tool (TypeScript) Source: https://docs.getcore.me/integrations/mcp-hub-guide An example demonstrating how an AI agent can call a tool exposed by the GitHub MCP server using an MCP client. This specific example shows the call to the `github_create_issue` tool with required parameters. ```typescript // Agent calls this internally await mcpClient.callTool('github_create_issue', { owner: 'user', repo: 'project', title: 'Bug: Login fails', body: 'Steps to reproduce...' }); ``` -------------------------------- ### Enable CORE Sync Plugin in Obsidian Source: https://docs.getcore.me/providers/obsidian Instructions for enabling the CORE Sync plugin after local installation. This involves navigating through Obsidian's settings to find and activate community plugins. ```text 1. Go to **Settings** → **Community plugins** 2. Find "CORE Sync" and toggle it on ``` -------------------------------- ### State Management for Sync Progress (TypeScript) Source: https://docs.getcore.me/integrations/schedule-based-guide Demonstrates how to manage application state by loading previous state at the start and persisting updated state at the end of a process. This ensures continuity and tracking of synchronization progress. ```typescript // Load state at start let settings = (state || {}) as Settings; const lastSyncTime = settings.lastSyncTime || getDefaultSyncTime(); // ... fetch and process data // Save state at end messages.push({ type: 'state', data: { ...settings, lastSyncTime: new Date().toISOString(), } }); // Mock function and interface for context function getDefaultSyncTime(): string { return new Date(Date.now() - 24 * 60 * 60 * 1000).toISOString(); } interface Settings { lastSyncTime?: string; } ``` -------------------------------- ### Install CORE MCP Server for Amp Source: https://docs.getcore.me/providers/amp Registers CORE's MCP server with Amp, establishing the connection endpoint for memory operations. This command sets up the 'core-memory' service pointing to the CORE API. ```bash amp mcp add core-memory https://core.heysol.ai/api/v1/mcp?source=amp ``` -------------------------------- ### Dynamically List Tools Based on User Projects (TypeScript) Source: https://docs.getcore.me/integrations/mcp-hub-guide Example of generating MCP tools dynamically based on user-specific data, such as projects. This server-side handler defines a tool for each project, allowing tasks to be created within them. ```typescript server.setRequestHandler(ListToolsRequestSchema, async () => { const user = await getUserFromToken(accessToken); const projects = await getProjects(user.id); // Generate tool for each project const tools = projects.map(project => ({ name: `create_task_${project.id}`, description: `Create task in ${project.name}`, inputSchema: { type: 'object', properties: { title: { type: 'string' } } } })); return { tools }; }); ``` -------------------------------- ### Get Default Sync Time Source: https://docs.getcore.me/integrations/schedule-based-guide Provides a default timestamp representing 24 hours ago in ISO format. This is used as a starting point for fetching recent GitHub data if no specific sync time is provided. ```typescript function getDefaultSyncTime(): string { // Default to 24 hours ago return new Date(Date.now() - 24 * 60 * 60 * 1000).toISOString(); } ``` -------------------------------- ### Configuration Placeholders Source: https://docs.getcore.me/integrations/mcp-hub-guide Understand how to use `${config:key}` placeholders in your MCP configuration. These are dynamically replaced at runtime with values from the user's integration configuration. ```APIDOC ## Configuration Placeholders ### Description Understand how to use `${config:key}` placeholders in your MCP configuration. These are dynamically replaced at runtime with values from the user's integration configuration. ### Method N/A (Configuration) ### Endpoint N/A (Configuration) ### Parameters N/A ### Request Example (Setup Phase - TypeScript) ```typescript // account-create.ts export async function integrationCreate(data: any) { const { oauthResponse } = data; return [{ type: 'account', data: { accountId: user.id.toString(), config: { access_token: oauthResponse.access_token, refresh_token: oauthResponse.refresh_token, team_id: user.team_id, custom_setting: 'value', // This config is accessible in MCP as ${config:*} mcp: { tokens: { access_token: oauthResponse.access_token } } } } }]; } ``` ### Response Example (Runtime Phase - JSON) ```json // Before replacement (spec.json) { "mcp": { "type": "http", "url": "https://api.service.com/mcp/", "headers": { "Authorization": "Bearer ${config:access_token}", "X-Team-ID": "${config:team_id}" } } } // After replacement (runtime) { "mcp": { "type": "http", "url": "https://api.service.com/mcp/", "headers": { "Authorization": "Bearer xoxp-actual-token-here", "X-Team-ID": "T12345" } } } ``` ``` -------------------------------- ### Get Permalink for Deep Linking (TypeScript) Source: https://docs.getcore.me/integrations/webhook-based-guide Retrieves a permanent link (permalink) for a specific Slack message using the chat.getPermalink API endpoint. This is essential for deep linking back to the original content, requiring the channel and message timestamp. ```typescript const permalinkResponse = await axios.get( `https://slack.com/api/chat.getPermalink?channel=${channel}&message_ts=${ts}`, { headers: { Authorization: `Bearer ${accessToken}` } } ); return [{ type: 'activity', data: { text, sourceURL: permalinkResponse.data.permalink // Essential! } }]; ``` -------------------------------- ### Build MCP Server with SDK (TypeScript) Source: https://docs.getcore.me/integrations/mcp-hub-guide Demonstrates how to build a custom MCP server using the ModelContextProtocol SDK. It covers server initialization, defining tools with input schemas, handling tool calls, and connecting the server via stdio transport. Dependencies include '@modelcontextprotocol/sdk'. ```typescript import { Server } from '@modelcontextprotocol/sdk/server/index.js'; import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js'; const server = new Server( { name: 'my-service-mcp', version: '1.0.0', }, { capabilities: { tools: {}, }, } ); // Define your tools server.setRequestHandler(ListToolsRequestSchema, async () => { return { tools: [ { name: 'create_task', description: 'Create a new task', inputSchema: { type: 'object', properties: { title: { type: 'string' }, description: { type: 'string' }, }, required: ['title'], }, }, ], }; }); // Handle tool calls server.setRequestHandler(CallToolRequestSchema, async (request) => { const { name, arguments: args } = request.params; if (name === 'create_task') { const result = await createTask(args.title, args.description); return { content: [{ type: 'text', text: `Created task: ${result.id}` }], }; } throw new Error(`Unknown tool: ${name}`); }); // Start server const transport = new StdioServerTransport(); await server.connect(transport); ``` -------------------------------- ### Configure Stdio MCP Server in spec.json Source: https://docs.getcore.me/integrations/mcp-hub-guide Defines the configuration for a Stdio-based (command-line) MCP server in spec.json. This includes the executable URL, command-line arguments, and environment variables, with placeholders for runtime configuration. ```json { "mcp": { "type": "stdio", "url": "https://integrations.heysol.ai/slack/mcp/slack-mcp-server", "args": [], "env": { "SLACK_MCP_XOXP_TOKEN": "${config:access_token}", "SLACK_MCP_ADD_MESSAGE_TOOL": true, "SLACK_WORKSPACE_ID": "${config:team_id}" } } } ``` -------------------------------- ### Get Webhook Details (OpenAPI Specification) Source: https://docs.getcore.me/api-reference/get-webhook This OpenAPI specification defines the GET endpoint for retrieving webhook configuration details. It includes details on authentication (Bearer token), path parameters (webhook ID), and the expected response format for a successful request. ```yaml paths: /api/v1/webhooks/{id}: get: summary: Get webhook details servers: - url: '{protocol}://{domain}' description: Configurable CORE server variables: protocol: type: enum enum: - http - https description: The protocol to use default: https domain: type: string description: The CORE API domain default: core.heysol.ai security: - bearerAuth: type: http scheme: bearer description: Bearer token authentication supports Personal API tokens (PATs), OAuth2 access tokens, and JWT tokens. Example: `Authorization: Bearer your_token_here` parameters: - name: id in: path required: true schema: type: string description: The ID of the webhook to retrieve. responses: '200': description: Webhook details content: application/json: schema: type: object description: Webhook details ``` -------------------------------- ### GET /api/v1/webhooks/{id} Source: https://docs.getcore.me/api-reference/get-webhook Fetches the configuration details for a specific webhook. Authentication is required via a Bearer token in the Authorization header. ```APIDOC ## GET /api/v1/webhooks/{id} ### Description Retrieves the configuration details for a specific webhook using its unique identifier. ### Method GET ### Endpoint /api/v1/webhooks/{id} ### Parameters #### Path Parameters - **id** (string) - Required - The unique identifier of the webhook to retrieve. #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) - **Webhook details** (any) - An object containing the webhook configuration details. #### Response Example ```json { "id": "wh_abc123", "url": "https://example.com/webhook", "event_types": ["user.created", "user.updated"], "created_at": "2023-10-27T10:00:00Z" } ``` ``` -------------------------------- ### Stdio-based MCP Configuration (JSON) Source: https://docs.getcore.me/integrations/building-integrations Configures a stdio-based MCP connection for local command-line servers. Includes URL, arguments, and environment variables. The `${config:access_token}` placeholder is resolved at runtime. ```json { "mcp": { "type": "stdio", "url": "https://integrations.heysol.ai/slack/mcp/slack-mcp-server", "args": [], "env": { "SLACK_MCP_XOXP_TOKEN": "${config:access_token}", "SLACK_MCP_ADD_MESSAGE_TOOL": true } } } ``` -------------------------------- ### Define Account Creation Response Source: https://docs.getcore.me/integrations/building-integrations When a user completes the OAuth authorization (SETUP event), the integration should return an account configuration. This response includes the account ID, configuration details (like access tokens and MCP tokens), and user settings (like username and schedule frequency). ```typescript [{ type: 'account', data: { accountId: 'user-123', config: { access_token: 'token', refresh_token: 'refresh', mcp: { tokens: { access_token: 'token' } } }, settings: { username: 'user', schedule: { frequency: '*/15 * * * *' } } } }] ``` -------------------------------- ### Verify MCP Server Installation Source: https://docs.getcore.me/providers/factory This command is used within the droid environment to manage servers and list available tools. Executing '/mcp' should display 'core' among the listed MCP servers, confirming successful installation. ```bash /mcp ``` -------------------------------- ### Handle Integration Events with index.ts Source: https://docs.getcore.me/integrations/building-integrations The index.ts file serves as the main entry point for an integration, routing different event types to their respective handlers. It uses a switch statement to manage events like SETUP, SYNC, PROCESS, and IDENTIFY, calling appropriate functions based on the event payload. Dependencies include the '@redplanethq/sdk'. ```typescript import { IntegrationCLI, IntegrationEventPayload, IntegrationEventType } from '@redplanethq/sdk'; export async function run(eventPayload: IntegrationEventPayload) { switch (eventPayload.event) { case IntegrationEventType.SETUP: // Handle OAuth completion and account creation return await integrationCreate(eventPayload.eventBody); case IntegrationEventType.SYNC: // For schedule-based integrations return await handleSchedule(eventPayload.config, eventPayload.state); case IntegrationEventType.PROCESS: // For webhook-based integrations return await createActivityEvent(eventPayload.eventBody.eventData, eventPayload.config); case IntegrationEventType.IDENTIFY: // Extract user identifier from webhook event return [{ type: 'identifier', data: eventPayload.eventBody.event.user }]; default: return { message: `Unknown event type: ${eventPayload.event}` }; } } class YourIntegrationCLI extends IntegrationCLI { constructor() { super('your-service', '1.0.0'); } protected async handleEvent(eventPayload: IntegrationEventPayload): Promise { return await run(eventPayload); } protected async getSpec(): Promise { // Return spec.json content } } ``` -------------------------------- ### MCP Tool: Define Tool with Schema (JSON) Source: https://docs.getcore.me/integrations/mcp-hub-guide Provides an example of defining an MCP tool, specifically 'create_issue', in JSON format. It includes a clear description, an input schema with properties, types, and required fields, adhering to best practices for tool descriptions. ```json { "name": "create_issue", "description": "Create a new GitHub issue in a repository. Returns the issue number and URL.", "inputSchema": { "type": "object", "properties": { "owner": { "type": "string", "description": "Repository owner (username or organization)" }, "repo": { "type": "string", "description": "Repository name" }, "title": { "type": "string", "description": "Issue title (required, max 256 characters)" }, "body": { "type": "string", "description": "Issue description in markdown format" } }, "required": ["owner", "repo", "title"] } } ``` -------------------------------- ### Obsidian Command Palette for CORE Sync Source: https://docs.getcore.me/providers/obsidian Lists the commands available in the Obsidian command palette for interacting with the CORE Sync plugin. These commands allow for manual synchronization and opening the CORE panel. ```text * **"Sync current note to CORE"** - Sync the currently open note * **"Sync all notes with core.sync=true"** - Sync all notes marked for synchronization * **"Open CORE Panel"** - Opens the dedicated CORE panel in Obsidian ``` -------------------------------- ### Install CORE MCP Server for Claude Code CLI Source: https://docs.getcore.me/providers/claude-code This command registers the CORE MCP server with Claude Code, establishing the connection endpoint for memory operations. Ensure you have Claude Code installed and a CORE account before running this command. ```bash claude mcp add --transport http core-memory https://core.heysol.ai/api/v1/mcp?source=Claude-Code ``` -------------------------------- ### Stdio-based MCP Configuration Source: https://docs.getcore.me/integrations/mcp-hub-guide Configure your integration to use a Stdio-based (command-line) MCP server. This includes the type, URL to the executable, and any command-line arguments or environment variables. ```APIDOC ## Stdio-based MCP Configuration ### Description Configure your integration to use a Stdio-based (command-line) MCP server. This includes the type, URL to the executable, and any command-line arguments or environment variables. ### Method N/A (Configuration) ### Endpoint N/A (Configuration) ### Parameters #### Request Body - **mcp** (object) - Required - MCP configuration object. - **type** (string) - Required - Must be `"stdio"`. - **url** (string) - Required - Binary/executable URL or path. - **args** (array) - Optional - Command-line arguments array. - **env** (object) - Optional - Environment variables passed to the process. Placeholders like `${config:key}` are supported. ### Request Example ```json { "mcp": { "type": "stdio", "url": "https://integrations.heysol.ai/slack/mcp/slack-mcp-server", "args": [], "env": { "SLACK_MCP_XOXP_TOKEN": "${config:access_token}", "SLACK_MCP_ADD_MESSAGE_TOOL": true, "SLACK_WORKSPACE_ID": "${config:team_id}" } } } ``` ### Response N/A (Configuration) ``` -------------------------------- ### GitHub Integration Main Logic (index.ts) Source: https://docs.getcore.me/integrations/schedule-based-guide The main entry point for the GitHub integration, handling different event types like SETUP and SYNC. It uses a switch statement to direct logic to appropriate handler functions and defines a CLI class for integration management. ```typescript import { handleSchedule } from './schedule'; import { integrationCreate } from './account-create'; import { IntegrationCLI, IntegrationEventPayload, IntegrationEventType, Spec, } from '@redplanethq/sdk'; export async function run(eventPayload: IntegrationEventPayload) { switch (eventPayload.event) { case IntegrationEventType.SETUP: return await integrationCreate(eventPayload.eventBody); case IntegrationEventType.SYNC: // Handle scheduled sync return await handleSchedule(eventPayload.config, eventPayload.state); default: return { message: `Unknown event type: ${eventPayload.event}` }; } } class GitHubCLI extends IntegrationCLI { constructor() { super('github', '1.0.0'); } protected async handleEvent(eventPayload: IntegrationEventPayload): Promise { return await run(eventPayload); } protected async getSpec(): Promise { return { name: 'GitHub extension', key: 'github', // ... rest of spec }; } } function main() { const githubCLI = new GitHubCLI(); githubCLI.parse(); } main(); ``` -------------------------------- ### GET /api/v1/spaces Source: https://docs.getcore.me/api-reference/listsearch-spaces Retrieves a list of spaces. Supports optional search filtering by name. ```APIDOC ## GET /api/v1/spaces ### Description Retrieves a list of spaces with optional search filtering. ### Method GET ### Endpoint /api/v1/spaces ### Parameters #### Query Parameters - **q** (string) - Optional - Search query for space names #### Request Body None ### Response #### Success Response (200) - **id** (string) - The unique identifier of the space. - **name** (string) - The name of the space. - **description** (string) - A description of the space. - **createdAt** (string, format: date-time) - The timestamp when the space was created. - **updatedAt** (string, format: date-time) - The timestamp when the space was last updated. - **userId** (string) - The identifier of the user who owns the space. #### Response Example ```json [ { "id": "", "name": "", "description": "", "createdAt": "2023-11-07T05:31:56Z", "updatedAt": "2023-11-07T05:31:56Z", "userId": "" } ] ``` ``` -------------------------------- ### GET /oauth/userinfo Source: https://docs.getcore.me/api-reference/oauth2-user-info-endpoint Fetches the authenticated user's information, including their ID, email, name, and profile picture. ```APIDOC ## GET /oauth/userinfo ### Description Retrieves the authenticated user's information, including their ID, email, name, and profile picture. ### Method GET ### Endpoint /oauth/userinfo ### Parameters #### Query Parameters None #### Headers - **Authorization** (string) - Required - OAuth2 authorization code flow with PKCE support. Supports scopes: read, write, mcp, integration, oauth ### Request Example ```json { "message": "No request body needed for this endpoint." } ``` ### Response #### Success Response (200) - **id** (string) - The unique identifier of the user. - **email** (string) - The email address of the user. - **name** (string) - The name of the user. - **picture** (string) - A URL to the user's profile picture. #### Response Example ```json { "id": "", "email": "jsmith@example.com", "name": "", "picture": "" } ``` #### Error Response (401) - **error** (string) - Error code or message. - **error_description** (string) - Human-readable error description. - **details** (array) - Validation error details. #### Error Response Example ```json { "error": "", "error_description": "", "details": [ {} ] } ``` ``` -------------------------------- ### Test MCP Server with MCP Inspector Source: https://docs.getcore.me/integrations/mcp-hub-guide Use the MCP Inspector command-line tool to test your MCP server. This command executes your server file using Node.js. ```bash npx @modelcontextprotocol/inspector node your-mcp-server.js ``` -------------------------------- ### GET /api/v1/logs Source: https://docs.getcore.me/api-reference/get-ingestion-logs Retrieves ingestion queue status and processing logs. Supports filtering by source and status, and pagination. ```APIDOC ## GET /api/v1/logs ### Description Retrieves ingestion queue status and processing logs. Supports filtering by source and status, and pagination. ### Method GET ### Endpoint `/api/v1/logs` ### Parameters #### Query Parameters - **page** (integer) - Optional - The page number for pagination. Defaults to 1. - **limit** (integer) - Optional - The number of items per page. Defaults to 20. - **source** (string) - Optional - Filter logs by source. - **status** (enum) - Optional - Filter logs by status. Allowed values: `pending`, `processing`, `completed`, `failed`. #### Request Body This endpoint does not accept a request body. ### Request Example ``` GET /api/v1/logs?limit=20&page=1&source=website&status=completed ``` ### Response #### Success Response (200) - **logs** (array) - An array of ingestion log objects. - **id** (string) - The unique identifier for the log entry. - **source** (string) - The source of the ingestion. - **status** (string) - The status of the ingestion. - **message** (string) - A message associated with the log entry. - **createdAt** (string) - The timestamp when the log entry was created. - **pagination** (object) - Pagination information (details not specified in schema). #### Response Example ```json { "logs": [ { "id": "", "source": "", "status": "", "message": "", "createdAt": "2023-11-07T05:31:56Z" } ], "pagination": {} } ``` ``` -------------------------------- ### GET /api/v1/logs/{logId} Source: https://docs.getcore.me/api-reference/get-specific-log Fetches the details of a specific log entry identified by its unique ID. Supports Bearer token authentication. ```APIDOC ## GET /api/v1/logs/{logId} ### Description Retrieves the details for a specific log entry using its unique identifier. ### Method GET ### Endpoint /api/v1/logs/{logId} ### Parameters #### Path Parameters - **logId** (string) - Required - Log identifier #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) - **log** (object) - Log details - **id** (string) - Log identifier - **source** (string) - Log source name - **ingestText** (string) - Text content that was ingested - **time** (string) - Creation timestamp (date-time) - **processedAt** (string) - Processing completion timestamp (date-time, nullable) - **episodeUUID** (string) - Associated episode UUID if processed (nullable) - **status** (string) - Processing status (enum: pending, processing, completed, failed) - **error** (string) - Error message if processing failed (nullable) - **sourceURL** (string) - Source URL if applicable (uri, nullable) - **integrationSlug** (string) - Integration slug identifier (nullable) - **data** (object) - Additional log data (nullable) #### Response Example ```json { "log": { "id": "", "source": "", "ingestText": "", "time": "2023-11-07T05:31:56Z", "processedAt": "2023-11-07T05:31:56Z", "episodeUUID": "", "status": "pending", "error": "", "sourceURL": "", "integrationSlug": "", "data": {} } } ``` #### Error Response (401) - **error** (string) - Error code or message - **error_description** (string) - Human-readable error description - **details** (array) - Validation error details #### Error Response Example (401) ```json { "error": "", "error_description": "", "details": [ {} ] } ``` #### Error Response (404) - **error** (string) - Error code or message - **error_description** (string) - Human-readable error description - **details** (array) - Validation error details #### Error Response Example (404) ```json { "error": "", "error_description": "", "details": [ {} ] } ``` ``` -------------------------------- ### Configure Qwen Coder MCP Server for CORE Memory Source: https://docs.getcore.me/providers/qwen-coder This JSON configuration adds CORE's memory system as an MCP server to Qwen Coder. It specifies the HTTP URL for the CORE API and includes necessary headers for authorization and content negotiation. Ensure you replace 'YOUR_API_KEY' with your actual CORE API key. ```json { "mcpServers": { "core-memory": { "httpUrl": "https://core.heysol.ai/api/v1/mcp?source=Qwen", "headers": { "Authorization": "Bearer YOUR_API_KEY", "Accept": "application/json, text/event-stream" } } } } ``` -------------------------------- ### Handle Slack Account Creation via OAuth Source: https://docs.getcore.me/integrations/webhook-based-guide Processes the OAuth response to create a new account integration. It fetches Slack user info using the access token and constructs account data including tokens, user ID, and settings. Dependencies include `getSlackUserInfo`. ```typescript export async function integrationCreate(data: any) { const { oauthResponse } = data; // Get user info from service const user = await getSlackUserInfo(oauthResponse.access_token); return [{ type: 'account', data: { accountId: user.user_id, config: { access_token: oauthResponse.access_token, refresh_token: oauthResponse.refresh_token, // Pass token to MCP tools mcp: { tokens: { access_token: oauthResponse.access_token } } }, settings: { username: user.user, team_id: user.team_id } } }]; } ```