Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Generated by https://smithery.ai. See: https://smithery.ai/docs/config#dockerfile
# Use a Node.js image for building and running the server
FROM node:22.12-alpine AS builder

# Set the working directory in the container
WORKDIR /app

# Copy package files and the lock file
COPY package.json package-lock.json ./

# Install dependencies
RUN npm install

# Copy the rest of the application source code
COPY src ./src
COPY tsconfig.json ./

# Build the server
RUN npm run build

# Prepare the runtime image
FROM node:22-alpine AS runtime

# Set the working directory
WORKDIR /app

# Copy the built files from the builder stage
COPY --from=builder /app/build /app/build
COPY package.json package-lock.json ./

# Install production dependencies
RUN npm ci --only=production

# Copy the .env file to the container
COPY .env ./

# Define the environment variable for the Kagi API key
ENV KAGI_API_KEY=your_api_key_here

# Specify the command to run the MCP server
CMD ["node", "build/index.js"]
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# kagi-server MCP Server

[![smithery badge](https://smithery.ai/badge/kagi-server)](https://smithery.ai/protocol/kagi-server)
[![smithery badge](https://smithery.ai/badge/kagi-server)](https://smithery.ai/server/kagi-server)

MCP server for Kagi API integration

This is a TypeScript-based MCP server that integrates the Kagi Search API. It demonstrates core MCP concepts by providing:
Expand Down Expand Up @@ -50,10 +51,10 @@ Make sure to add `.env` to your `.gitignore` file to keep your API key secure.

### Installing via Smithery

To install Kagi Server for Claude Desktop automatically via [Smithery](https://smithery.ai/protocol/kagi-server):
To install Kagi Server for Claude Desktop automatically via [Smithery](https://smithery.ai/server/kagi-server):

```bash
npx @smithery/cli install kagi-server --client claude
npx -y @smithery/cli install kagi-server --client claude
```

To use with Claude Desktop, add the server config:
Expand Down Expand Up @@ -113,4 +114,4 @@ This project is licensed under the MIT License.
- Implement `kagi_enrich` tool for fetching enriched news results
- Improve error handling and add more robust input validation
- Add more comprehensive usage examples and documentation
- Publish the package to npm for easy installation and use with Claude Desktop and npx
- Publish the package to npm for easy installation and use with Claude Desktop and npx
17 changes: 17 additions & 0 deletions smithery.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Smithery configuration file: https://smithery.ai/docs/config#smitheryyaml

startCommand:
type: stdio
configSchema:
# JSON Schema defining the configuration options for the MCP.
type: object
required:
- kagiApiKey
properties:
kagiApiKey:
type: string
description: The API key for the Kagi Search server.
commandFunction:
# A function that produces the CLI command to start the MCP on stdio.
|-
(config) => ({command:'node', args:['build/index.js'], env:{KAGI_API_KEY: config.kagiApiKey}})
Loading