Skip to main content
Glama
README.md
[![MseeP.ai Security Assessment Badge](https://mseep.net/pr/phialsbasement-koboldcpp-mcp-server-badge.png)](https://mseep.ai/app/phialsbasement-koboldcpp-mcp-server)

# Kobold MCP Server

A Model Context Protocol (MCP) server implementation for interfacing with KoboldAI. This server enables integration between KoboldAI's text generation capabilities and MCP-compatible applications.

## Features

- Text generation with KoboldAI
- Chat completion with persistent memory
- OpenAI-compatible API endpoints
- Stable Diffusion integration
- Built on the official MCP SDK
- TypeScript implementation

<a href="https://glama.ai/mcp/servers/a2xd4hoij7"><img width="380" height="200" src="https://glama.ai/mcp/servers/a2xd4hoij7/badge" alt="Kobold Server MCP server" /></a>

## Installation

```bash
npm install kobold-mcp-server
```

## Prerequisites

- Node.js (v16 or higher)
- npm or yarn package manager
- Running KoboldAI instance

## Usage

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

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

// Start the server
server.start();
```

## Configuration

The server can be configured through environment variables or a configuration object:

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

## Supported APIs

- Core KoboldAI API (text generation, model info)
- Chat completion with conversation memory
- Text completion (OpenAI-compatible)
- Stable Diffusion integration (txt2img, img2img)
- Audio transcription and text-to-speech
- Web search capabilities

## Development

1. Clone the repository:
```bash
git clone https://github.com/yourusername/kobold-mcp-server.git
cd kobold-mcp-server
```

2. Install dependencies:
```bash
npm install
```

3. Build the project:
```bash
npm run build
```

## Dependencies

- `@modelcontextprotocol/sdk`: ^1.0.1
- `node-fetch`: ^2.6.1
- `zod`: ^3.20.0
- `zod-to-json-schema`: ^3.23.5

## Contributing

Contributions welcome! Please feel free to submit a Pull Request.

## License

MIT License - see LICENSE file for details.

## Support

For issues and feature requests, please use the GitHub issue tracker.

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
ResponsivenessUnresponsive