Skip to main content
Glama

Сервер MCP Кобольда

Реализация сервера Model Context Protocol (MCP) для взаимодействия с KoboldAI. Этот сервер обеспечивает интеграцию между возможностями генерации текста KoboldAI и MCP-совместимыми приложениями.

Функции

  • Генерация текста с помощью KoboldAI

  • Завершение чата с постоянной памятью

  • Конечные точки API, совместимые с OpenAI

  • Стабильная диффузионная интеграция

  • Создано на основе официального MCP SDK

  • Реализация TypeScript

Related MCP server: nanobanana-mcp

Установка

npm install kobold-mcp-server

Предпосылки

  • Node.js (v16 или выше)

  • менеджер пакетов npm или yarn

  • Запуск экземпляра KoboldAI

Использование

import { KoboldMCPServer } from 'kobold-mcp-server';

// Initialize the server
const server = new KoboldMCPServer();

// Start the server
server.start();

Конфигурация

Сервер можно настроить с помощью переменных среды или объекта конфигурации:

const config = {
  apiUrl: 'http://localhost:5001' // KoboldAI API endpoint
};
const server = new KoboldMCPServer(config);

Поддерживаемые API

  • Основной API KoboldAI (генерация текста, информация о модели)

  • Завершение чата с памятью разговора

  • Дополнение текста (совместимо с OpenAI)

  • Стабильная диффузионная интеграция (txt2img, img2img)

  • Аудиотранскрипция и преобразование текста в речь

  • Возможности веб-поиска

Разработка

  1. Клонируйте репозиторий:

git clone https://github.com/yourusername/kobold-mcp-server.git
cd kobold-mcp-server
  1. Установить зависимости:

npm install
  1. Создайте проект:

npm run build

Зависимости

  • @modelcontextprotocol/sdk : ^1.0.1

  • node-fetch : ^2.6.1

  • zod : ^3.20.0

  • zod-to-json-schema : ^3.23.5

Внося вклад

Вклад приветствуется! Пожалуйста, не стесняйтесь отправлять запрос на включение.

Лицензия

Лицензия MIT — подробности см. в файле LICENSE.

Поддерживать

Для сообщений о проблемах и запросов на новые функции используйте систему отслеживания ошибок GitHub.

Available Tools

20 tools
kobold_abortB

Abort the currently ongoing generation

Inputs: apiUrl.

kobold_chatC

Chat completion (OpenAI-compatible)

Inputs: messages (required), apiUrl, temperature, top_p, +2 more.

kobold_completeC

Text completion (OpenAI-compatible)

Inputs: prompt (required), apiUrl, max_tokens, temperature, +2 more.

kobold_detokenizeC

Convert token IDs to text

Inputs: tokens (required), apiUrl.

kobold_generateC

Generate text with KoboldAI

Inputs: prompt (required), apiUrl, max_length, max_context_length, +6 more.

kobold_img2imgC

Transform existing image using prompt

Inputs: prompt (required), init_images (required), apiUrl, negative_prompt, +7 more.

kobold_interrogateC

Generate caption for image

Inputs: image (required), apiUrl.

kobold_last_logprobsB

Get token logprobs from the last request

Inputs: apiUrl.

kobold_max_context_lengthB

Get current max context length setting

Inputs: apiUrl.

kobold_max_lengthB

Get current max length setting

Inputs: apiUrl.

kobold_model_infoB

Get current model information

Inputs: apiUrl.

kobold_perf_infoC

Get performance information

Inputs: apiUrl.

kobold_sd_modelsB

List available Stable Diffusion models

Inputs: apiUrl.

kobold_sd_samplersB

List available Stable Diffusion samplers

Inputs: apiUrl.

kobold_token_countC

Count tokens in text

Inputs: text (required), apiUrl.

kobold_transcribeC

Transcribe audio using Whisper

Inputs: audio (required), apiUrl, language.

kobold_ttsC

Generate text-to-speech audio

Inputs: text (required), apiUrl, voice, speed.

kobold_txt2imgC

Generate image from text prompt

Inputs: prompt (required), apiUrl, negative_prompt, width, +5 more.

kobold_versionB

Get KoboldAI version information

Inputs: apiUrl.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    C2.9/5.0

    Scored across 20 tools

    Disambiguation3/5

    Most tools have distinct purposes (e.g., text generation vs. image generation vs. utility functions), but there is some overlap between kobold_chat and kobold_complete (both for text generation) and kobold_token_count and kobold_detokenize (both token-related). Descriptions help clarify, but an agent might occasionally confuse similar tools.

    Naming Consistency5/5

    All tool names follow a consistent snake_case pattern with a 'kobold_' prefix and descriptive suffixes (e.g., kobold_generate, kobold_model_info). This uniformity makes the set predictable and easy to navigate, with no deviations in style.

    Tool Count3/5

    With 20 tools, the count is borderline high for a single server, as it covers diverse domains like text generation, image processing, audio, and utilities. While each tool serves a purpose, the scope feels broad, potentially overwhelming for agents focused on specific tasks.

    Completeness4/5

    The tool set covers core AI functionalities well, including text and image generation, audio processing, and model management. Minor gaps exist, such as no explicit tool for updating settings or managing generation parameters beyond aborting, but agents can work around these with the available tools.

    Maintenance

    ActivityInactive
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      D
      maintenance
      An MCP server that enables AI applications to access 20+ model providers (including OpenAI, Anthropic, Google) through a unified interface for text and image generation.
      2
      30
      MIT
    • F
      license
      Not graded
      quality
      D
      maintenance
      MCP server for OpenAI ChatGPT API. Enables chat completions, vision analysis, embeddings, and model listing through natural language.
      -
    • A
      license
      Not graded
      quality
      B
      maintenance
      An MCP server that exposes NovelAI image generation as tools for AI agents, supporting txt2img, img2img, inpaint, upscaling, Director tools, ControlNet annotation, tag suggestions, vibe encoding, and subscription queries via stdio or streamable-http transports.
      12
      MIT