Kapa MCP Server
by dvdksn
README.md
# Kapa MCP Server
A Model Context Protocol (MCP) server that provides access to Kapa.ai's documentation and Q&A capabilities for any project enrolled with Kapa.
## Important: Customizing for Your Project
This MCP server can be used to query any project that's enrolled with Kapa.ai, not just Kapa itself. The code uses "ACME" as a placeholder name that you should replace with your actual project name.
**Before using this server, you MUST:**
1. Replace all instances of "ACME" and "acme" in `src/index.ts` with your project name:
- Change `"ask_acme_question"` to `"ask_yourproject_question"`
- Change `"Ask a question about ACME documentation"` to `"Ask a question about YourProject documentation"`
- Change `"The question about ACME to ask"` to `"The question about YourProject to ask"`
- Similarly update the search tool names and descriptions
2. Look for the TODO comments in the code that indicate where to make these changes
This customization is crucial because LLM applications use tool names and descriptions to understand when and how to use them. Using project-specific names helps the LLM make appropriate tool calls for your documentation.
## Features
- **ask_acme_question**: Query Kapa.ai's chat API for answers about your enrolled project (replace "acme" with your project name)
- **search_acme_sources**: Search through your project's documentation sources via Kapa.ai (replace "acme" with your project name)
## Prerequisites
- Docker
- Kapa.ai API credentials:
- `KAPA_API_KEY`
- `KAPA_PROJECT_ID`
- `KAPA_INTEGRATION_ID`
## Running with Docker
1. Build the Docker image:
```bash
docker build -t kapa-mcp-server .
```
2. Run the container with your API credentials:
```bash
docker run -e KAPA_API_KEY=your_api_key \
-e KAPA_PROJECT_ID=your_project_id \
-e KAPA_INTEGRATION_ID=your_integration_id \
kapa-mcp-server
```
## Using with MCP Clients
### Claude Desktop
Add to your Claude Desktop configuration:
```json
{
"mcpServers": {
"kapa": {
"command": "docker",
"args": [
"run", "-i", "--rm",
"-e", "KAPA_API_KEY=your_api_key",
"-e", "KAPA_PROJECT_ID=your_project_id",
"-e", "KAPA_INTEGRATION_ID=your_integration_id",
"kapa-mcp-server"
]
}
}
}
```
### Other MCP Clients
The server communicates via stdio, so it can be integrated with any MCP-compatible client by running the Docker container with the appropriate environment variables.
## Development
1. Install dependencies:
```bash
npm install
```
2. Build TypeScript:
```bash
npm run build
```
3. Run locally:
```bash
KAPA_API_KEY=your_api_key \
KAPA_PROJECT_ID=your_project_id \
KAPA_INTEGRATION_ID=your_integration_id \
npm start
```
## Testing
Test with MCP Inspector:
```bash
KAPA_API_KEY=your_api_key \
KAPA_PROJECT_ID=your_project_id \
KAPA_INTEGRATION_ID=your_integration_id \
npx @modelcontextprotocol/inspector dist/index.js
```
This server cannot be deployed
Maintenance
ActivityInactive
ResponsivenessNo issues