Documentation

Learn how to integrate Akyn knowledge bases into your AI applications using MCP.

Introduction

Akyn exposes your knowledge bases through two methods: the Model Context Protocol (MCP) for AI assistants, and a REST API for direct integration. Both allow semantic search across your custom data sources.

Connection Methods:

  • MCP Server: For AI clients like Claude, Cursor, n8n. Uses SSE transport.
  • REST API: For direct integration via HTTP POST requests.

Quick Start

  1. Get your API Key

    Go to your dashboard settings and generate a new API key.

  2. Find your MCP Endpoint

    Navigate to your knowledge base and click "Connect via MCP".

    https://akyn.ai/mcp/[kb_id]
  3. Configure your Client

    Add the server to your MCP-compatible client using the URL and your API key.

Available Tools

query

Semantically search the knowledge base for relevant context.

// Arguments

{
  "question": string
}

list_sources

List all indexed sources (files and URLs) in the knowledge base.

// Arguments

{ }

Connection Methods

MCP ServerFor AI clients (n8n, Claude, Cursor)

Use SSE transport to connect AI assistants to your knowledge base. The MCP server exposes tools for querying and listing sources.

  • URL:https://akyn.dev/mcp/[kb_id]
  • Transport:SSE (Server-Sent Events)
  • Auth:Authorization: Bearer [api_key]

Available MCP Tools:

  • query - Semantic search with a question
  • list_sources - List indexed documents
REST APIFor direct integration

Use the REST API for direct HTTP integration without MCP. Send a query and receive matching context.

  • Endpoint:POST https://akyn.dev/api/query
  • Auth:Authorization: Bearer [api_key]

Request body:

{
  "knowledgeBaseId": "[kb_id]",
  "query": "Your question here"
}

Response:

{
  "results": [
    { "text": "...", "score": 0.95, "metadata": {...} }
  ],
  "tokenCount": 128,
  "responseTimeMs": 245
}
n8n

Connect to n8n

Use n8n's AI Agent node with Akyn's MCP server to give your workflows access to knowledge bases.

1

Create an AI Agent workflow

Start by adding an AI Agent node to your n8n workflow. Connect it to a Chat Model of your choice (e.g., OpenAI, Anthropic) and add an MCP Client as a Tool.

n8n workflow with AI Agent, Chat Model, and MCP Client

A basic workflow: Trigger → AI Agent with a Chat Model and MCP Client tool.

2

Configure the MCP Client node

Click on the MCP Client node and configure it with the following settings:

  • Endpoint:https://akyn.dev/mcp/[your-kb-id]
  • Server Transport:HTTP Streamable
  • Authentication:Bearer Auth
  • Tools to Include:All
MCP Client node configuration
3

Add your Akyn API Key

Click the pencil icon next to "Credential for Bearer Auth" to create a new credential. Enter your Akyn API Key as the Bearer Token.

Bearer Auth credential configuration with API key

You can generate an API key from your Dashboard Settings.

4

Test the connection

Click the "Execute step" button on the MCP Client node. If the connection is successful, you'll see the available tools (query and list_sources) provided by Akyn's MCP server.

✓ If the test succeeds, your AI Agent can now query your Akyn knowledge base!
+

Connect multiple Knowledge Bases

Need to query multiple knowledge bases? Simply add additional MCP Client nodes, each configured with a different knowledge base endpoint. The AI Agent will have access to all of them as separate tools.

Multiple MCP Client nodes connected to an AI Agent

Example: An AI Agent with access to three different knowledge bases.

Dust

Connect to Dust

Add Akyn knowledge bases as MCP tools in Dust to give your agents access to custom context.

1

Go to Spaces → Tools

In Dust, navigate to the Spaces tab, then click on Tools in the sidebar. Click the "Add Tools" button and select "Add MCP Server".

Dust Spaces Tools panel with Add MCP Server option
2

Add the MCP endpoint and API key

In the "Configure MCP Server" dialog, enter your Akyn MCP endpoint URL and your API key as the Bearer token:

  • URL:https://akyn.dev/mcp/[your-kb-id]
  • Authentication:Bearer token
  • Bearer Token:Your Akyn API key
Configure MCP Server dialog with URL and Bearer token fields
3

Name your tool and verify connection

After saving, a configuration panel appears on the right. Give your tool a Name and Description — this helps your Dust agent decide when to use the knowledge base. Check the "Available Tools" section to confirm the connection works.

MCP Server configuration panel with name, description and available tools

You should see Query and list_sources in the Available Tools section.

4

Add the tool to your Dust agent

When creating or editing a Dust agent, go to the "Add tools" panel. You'll see your Akyn knowledge base listed as an available MCP tool. Select it to give your agent access to query your knowledge base.

✓ Your Dust agent can now query your Akyn knowledge base for relevant context!

💡 Tip: Multiple Knowledge Bases

You can add multiple Akyn MCP servers to Dust, each connected to a different knowledge base. Give each one a descriptive name so your agent knows which one to use for different queries.

LangChain

Connect to LangChain

Use the MCP adapters to connect Akyn knowledge bases as tools in your LangChain agents.

Install packages:

pip install langchain-mcp-adapters langchain-openai langgraph

Connect to Akyn and create an agent:

from langchain_mcp_adapters.client import MultiServerMCPClient
from langgraph.prebuilt import create_react_agent
from langchain_openai import ChatOpenAI

client = MultiServerMCPClient({
    "akyn": {
        "url": "https://akyn.dev/mcp/[your-kb-id]",
        "transport": "streamable_http",
        "headers": {"Authorization": "Bearer [your-api-key]"}
    }
})

tools = await client.get_tools()
agent = create_react_agent(ChatOpenAI(model="gpt-4o"), tools)

response = await agent.ainvoke({
    "messages": [{"role": "user", "content": "What do you know about X?"}]
})
print(response["messages"][-1].content)

Available Tools

The MCP client will expose query (semantic search) and list_sources (list indexed documents) as tools your agent can use.

Connect to Claude

Add Akyn knowledge bases as custom connectors in Claude to give it access to your custom context via MCP.

1

Open the connectors menu

On the Claude main screen, click the + button in the chat input, then select "Add connectors" from the menu.

Claude main screen with + button and connectors menu
2

Go to connector settings

In the connectors panel, click "Manage connectors" to access the connector settings.

Claude connectors panel with Manage connectors button
3

Add a custom connector

In the settings page, scroll down and click "Add a custom connector".

Connectors settings page with Add a custom connector button
4

Enter your Akyn MCP URL

Give your connector a name and paste your Akyn knowledge base MCP URL:

  • Name:A descriptive name for your knowledge base
  • URL:https://akyn.dev/mcp/[your-kb-id]
Add custom connector dialog with name and URL fields

You can find your knowledge base MCP URL in your Akyn Dashboard.

5

Connect the connector

After adding the connector, click the "Connect" button to initiate the OAuth flow.

Custom connector with Connect button
6

Authorize Claude to access Akyn

In the OAuth authorization panel, review the permissions and click "Authorize" to grant Claude access to your Akyn knowledge bases.

Akyn OAuth authorization panel
7

Configure tool permissions (optional)

After connecting, you can configure how Claude uses the tools. Choose whether tools are called automatically or require human approval for each call.

Tool permissions configuration panel

The query tool performs semantic search, and list_sources lists indexed documents.

✓ Claude can now query your Akyn knowledge base for relevant context in your conversations!

💡 Tip: Multiple Knowledge Bases

You can add multiple custom connectors, each connected to a different Akyn knowledge base. Give each one a descriptive name so Claude knows which one to use for different queries.

ChatGPT

Connect to ChatGPT

Add Akyn knowledge bases as custom apps in ChatGPT to give it access to your custom context via MCP.

1

Go to Settings → Apps

In the ChatGPT web app, open the settings menu and navigate to the Apps section.

ChatGPT settings with Apps section highlighted
2

Enable Developer Mode

Click on Advanced settings and toggle on Developer mode. This allows you to add custom MCP servers as apps.

Developer mode toggle in ChatGPT advanced settings

Note: Developer mode is in beta and allows adding unverified connectors.

3

Create a new App

Click "Create app" and fill in the following details:

  • Name:A descriptive name for your knowledge base
  • Description:(Optional) Helps the LLM understand when to use this KB
  • MCP Server URL:https://akyn.dev/mcp/[your-kb-id]
  • Authentication:OAuth

Check the box to accept the conditions, then click "Create".

New App dialog with name, MCP URL, and OAuth settings

You can find your knowledge base MCP URL in your Akyn Dashboard.

4

Authorize ChatGPT to access Akyn

After creating the app, you'll be redirected to the Akyn OAuth panel. Review the permissions and click "Authorize" to grant ChatGPT access to your knowledge bases.

Akyn OAuth authorization panel for ChatGPT
5

Use the tool in your chats

Once connected, your Akyn knowledge base will appear in the tools menu. Click the + button in the chat input and select your knowledge base from "More" to enable it for the current conversation.

ChatGPT chat with Akyn knowledge base available in tools menu

Apps marked with DEV are custom developer apps.

✓ ChatGPT can now query your Akyn knowledge base for relevant context in your conversations!

💡 Tip: Multiple Knowledge Bases

You can create multiple apps, each connected to a different Akyn knowledge base. Give each one a descriptive name and description so ChatGPT knows which one to use for different queries.

Cursor

Connect to Cursor

Add Akyn knowledge bases as MCP servers in Cursor to give your AI assistant access to your custom context.

1

Go to Settings → Tools & MCP

Open Cursor settings and navigate to the Tools & MCP section in the sidebar.

Cursor settings with Tools & MCP section
2

Click "New MCP Server"

In the Installed MCP Servers section, click on "New MCP Server" to add a custom MCP server.

3

Add the MCP configuration

Paste the following configuration, replacing the placeholders with your knowledge base ID and API key:

{
  "A name for your MCP": {
    "url": "https://akyn.dev/mcp/[kb-id]",
    "headers": {
      "Authorization": "Bearer YOUR_API_KEY"
    }
  }
}
  • Name:A descriptive name for your knowledge base
  • [kb-id]:Your knowledge base ID from the Akyn dashboard
  • YOUR_API_KEY:Your Akyn API key from Dashboard Settings
✓ Cursor can now query your Akyn knowledge base for relevant context in your coding sessions!

💡 Tip: Multiple Knowledge Bases

You can add multiple MCP servers to Cursor, each connected to a different Akyn knowledge base. Give each one a descriptive name so the AI assistant knows which one to use.