Content
# Inkeep MCP Server for Cloudflare Workers
A Model Context Protocol (MCP) server that provides semantic search and Q&A capabilities using Inkeep's API, deployed on Cloudflare Workers.
## Overview
This MCP server exposes two main tools:
- **Semantic Search** (`search-inkeep-docs`) - Search through Inkeep documentation and knowledge base
- **Q&A Assistant** (`ask-question-about-inkeep`) - Ask specific questions to an AI assistant knowledgeable about Inkeep
## Features
- 🚀 **Serverless**: Runs on Cloudflare Workers for global edge deployment
- 🔍 **Semantic Search**: Powered by Inkeep's RAG (Retrieval-Augmented Generation) API
- 🤖 **AI Q&A**: Get answers from an AI assistant trained on Inkeep documentation
- 🔒 **Secure**: API keys stored as encrypted secrets
- 📊 **Structured Responses**: Uses Zod schemas for type-safe API responses
- 📈 **Analytics Integration**: Logs interactions to Inkeep analytics for insights
## Using Inkeep Analytics
This sample app logs the user question and the assistant response to Inkeep analytics using the [inkeep-analytics-typescript sdk](https://github.com/inkeep/inkeep-analytics-typescript)
## Prerequisites
- Node.js 18+ and pnpm
- Cloudflare account
- Inkeep API key
- Wrangler CLI
## Installation
1. **Clone the repository**:
```bash
git clone https://github.com/inkeep/mcp-for-cloudflare.git
cd mcp-for-cloudflare
```
2. **Install dependencies**:
```bash
pnpm install
```
3. **Install Wrangler CLI** (if not already installed):
```bash
npm install -g wrangler
```
4. **Authenticate with Cloudflare**:
```bash
wrangler login
```
## Configuration
### Customizing Worker Name
By default, the worker is named `inkeep-mcp-server`. To customize it, edit the `name` field in `wrangler.toml`:
```toml
name = "my-custom-mcp-server" # Change this to your preferred name
main = "src/index.ts"
compatibility_date = "2024-09-23"
# ... rest of configuration
```
**Note**: After changing the name, your deployment URL will be:
```
https://my-custom-mcp-server.your-subdomain.workers.dev/mcp
```
### Environment Variables
- `INKEEP_API_BASE_URL`: Base URL for Inkeep API (pre-configured in `wrangler.toml`)
- `INKEEP_API_KEY`: Your Inkeep API key (stored as a secret)
If you don't have one, create one in your Inkeep portal. See more info related in [our documentation](https://docs.inkeep.com/analytics-api/authentication#get-an-api-key)
### Local Development
Create a `.dev.vars` file in the project root:
```bash
# .dev.vars
INKEEP_API_KEY=your_inkeep_api_key_here
```
**Important**: Add `.dev.vars` to your `.gitignore` to avoid committing secrets.
### Production Secrets
Set your API key as a Cloudflare Workers secret:
```bash
wrangler secret put INKEEP_API_KEY
```
## Development
Start the local development server:
```bash
wrangler dev
```
Your MCP server will be available at `http://localhost:8787/mcp`
## Deployment
Deploy to Cloudflare Workers:
```bash
wrangler deploy
```
After deployment, your MCP server will be available at:
```
https://inkeep-mcp-server.<your-subdomain>.workers.dev/mcp
```
## Usage
### Cursor Integration
To add this MCP server to Cursor, simply add the URL to your Cursor settings:
```json
{
"mcp": {
"servers": {
"inkeep": {
"url": "https://inkeep-mcp-server.your-subdomain.workers.dev/mcp"
}
}
}
}
```
Replace `your-subdomain` with your actual Cloudflare Workers subdomain.
### Available Tools
Once configured, you'll have access to these tools in Cursor:
1. **Search Inkeep Documentation** (`search-inkeep-docs`)
2. **Ask Questions About Inkeep** (`ask-question-about-inkeep`)
### Example MCP Client Integration
```typescript
// Example usage in an MCP client
const searchResult = await mcpClient.callTool('search-inkeep-docs', {
query: 'authentication setup'
});
const qaResult = await mcpClient.callTool('ask-question-about-inkeep', {
question: 'How do I customize the chat widget appearance?'
});
```
## Support
For issues related to:
- **Inkeep API**: Contact Inkeep support
- **Cloudflare Workers**: Check Cloudflare Workers documentation
- **This MCP Server**: Open an issue in this repository
## Related Links
- [Model Context Protocol (MCP) Documentation](https://modelcontextprotocol.io/)
- [Inkeep API Documentation](https://docs.inkeep.com/)
- [Cloudflare Workers Documentation](https://developers.cloudflare.com/workers/)
Connection Info
You Might Also Like
Filesystem
Node.js MCP Server for filesystem operations with dynamic access control.
Agent-Reach
Give your AI agent eyes to see the entire internet. Read & search Twitter,...
Fetch
Retrieve and process content from web pages by converting HTML into markdown format.
stacklit
108,000 lines of code. 4,000 tokens of index. One command makes any repo...
code-index-mcp
Instant code search for AI models. 62K files in 43 sec, 282K functions,...
OpenCrab
MetaOntology OS MCP Plugin? All agent environments evolve toward...