A Model Context Protocol (MCP) server that provides semantic search and Q&A capabilities using Inkeep's API, deployed on Cloudflare Workers.
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
- 🚀 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
This sample app logs the user question and the assistant response to Inkeep analytics using the inkeep-analytics-typescript sdk
- Node.js 18+ and pnpm
- Cloudflare account
- Inkeep API key
- Wrangler CLI
-
Clone the repository:
git clone https://github.com/inkeep/mcp-for-cloudflare.git cd mcp-for-cloudflare
-
Install dependencies:
pnpm install
-
Install Wrangler CLI (if not already installed):
npm install -g wrangler
-
Authenticate with Cloudflare:
wrangler login
By default, the worker is named inkeep-mcp-server
. To customize it, edit the name
field in wrangler.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
INKEEP_API_BASE_URL
: Base URL for Inkeep API (pre-configured inwrangler.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
Create a .dev.vars
file in the project root:
# .dev.vars
INKEEP_API_KEY=your_inkeep_api_key_here
Important: Add .dev.vars
to your .gitignore
to avoid committing secrets.
Set your API key as a Cloudflare Workers secret:
wrangler secret put INKEEP_API_KEY
Start the local development server:
wrangler dev
Your MCP server will be available at http://localhost:8787/mcp
Deploy to Cloudflare Workers:
wrangler deploy
After deployment, your MCP server will be available at:
https://inkeep-mcp-server.<your-subdomain>.workers.dev/mcp
To add this MCP server to Cursor, simply add the URL to your Cursor settings:
{
"mcp": {
"servers": {
"inkeep": {
"url": "https://inkeep-mcp-server.your-subdomain.workers.dev/mcp"
}
}
}
}
Replace your-subdomain
with your actual Cloudflare Workers subdomain.
Once configured, you'll have access to these tools in Cursor:
- Search Inkeep Documentation (
search-inkeep-docs
) - Ask Questions About Inkeep (
ask-question-about-inkeep
)
// 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?'
});
For issues related to:
- Inkeep API: Contact Inkeep support
- Cloudflare Workers: Check Cloudflare Workers documentation
- This MCP Server: Open an issue in this repository