loading…
Search for a command to run...
loading…
Enables querying halans.com content via search, section retrieval, full content, and summaries.
Enables querying halans.com content via search, section retrieval, full content, and summaries.
This MCP (Model Context Protocol) server provides content querying tools for halans.com. It offers two deployment options: a local stdio-based server for direct Claude Desktop integration, and a Cloudflare Workers deployment for remote access.
The MCP server provides four content querying tools:
The MCP server also exposes three browseable resources:
git clone https://github.com/halans/halans-mcp-server
cd halans-mcp-server
npm install
{
"mcpServers": {
"halans-content": {
"command": "node",
"args": ["/path/to/halans-mcp-server/mcp-stdio.js"],
"env": {}
}
}
}
Prerequisites:
Authenticate with Cloudflare:
npx wrangler login
npm run deploy
This will deploy your MCP server to a URL like: halans-mcp-server.<your-account>.workers.dev/sse
One-Click Deploy (Alternative):
This MCP server leverages several Cloudflare Workers features:
The server exposes two endpoints:
/sse - Server-Sent Events endpoint for MCP communication/mcp - Standard MCP endpointConfiguration is managed in wrangler.jsonc:
{
"name": "halans-mcp-server",
"main": "src/index.ts",
"compatibility_date": "2025-03-10",
"durable_objects": {
"bindings": [
{
"class_name": "MyMCP",
"name": "MCP_OBJECT"
}
]
}
}
# Start the Cloudflare Workers dev server
npm run dev
# Run TypeScript type checking
npm run type-check
# Format code
npm run format
# Fix linting issues
npm run lint:fix
# Test the stdio server directly
node mcp-stdio.js
# The server will wait for MCP protocol messages on stdin
├── src/
│ └── index.ts # Cloudflare Workers MCP server
├── mcp-stdio.js # Local stdio MCP server
├── package.json # Dependencies and scripts
├── wrangler.jsonc # Cloudflare Workers config
├── CLAUDE.md # Claude-specific documentation
└── README.md # This file
The server uses two different content sources with separate 5-minute caching:
https://halans.com/llms-full.txt)Used by search_content, get_section, get_full_content, and get_content_summary tools:
https://halans.com/llms.txt)Used by the browseable resources (halans://content, etc.):
npx @modelcontextprotocol/inspector
Add this to your Claude Desktop MCP configuration:
{
"mcpServers": {
"halans-content": {
"command": "node",
"args": ["/absolute/path/to/mcp-stdio.js"],
"env": {}
}
}
}
{
"mcpServers": {
"halans-content": {
"command": "npx",
"args": [
"mcp-remote",
"https://your-worker-url.workers.dev/sse"
]
}
}
}
For deployed Workers, you can test the MCP server using Cloudflare AI Playground:
your-worker-url.workers.dev/sse)npx @modelcontextprotocol/inspector@latest
To use a custom domain with your Cloudflare Worker:
wrangler.jsonc with your domain:{
"routes": [
{
"pattern": "mcp.yourdomain.com/*",
"custom_domain": true
}
]
}
Add environment variables for configuration:
# Set environment variables
npx wrangler secret put API_KEY
npx wrangler secret put CONTENT_URL
Then access them in your Worker:
// In src/index.ts
const toolsContentUrl = env.TOOLS_CONTENT_URL || "https://halans.com/llms-full.txt";
const resourcesContentUrl = env.RESOURCES_CONTENT_URL || "https://halans.com/llms.txt";
MCP Connection Failed
Content Fetching Errors
https://halans.com/llms-full.txt and https://halans.com/llms.txt are accessibleDevelopment Server Issues
npm install to ensure dependencies are installednpm run type-check to identify TypeScript errorswrangler tail for real-time log monitoringTo add your own tools:
mcp-stdio.js and add new tool handlerssrc/index.ts and add tools in the init() method// In src/index.ts or mcp-stdio.js
this.server.tool(
"new_tool",
{
parameter: z.string().describe("Tool parameter")
},
async ({ parameter }) => {
// Tool implementation
return {
content: [{ type: "text", text: `Result: ${parameter}` }]
};
}
);
Выполни в терминале:
claude mcp add halans-mcp-server -- npx Не уверен что выбрать?
Найди свой стек за 60 секунд
Автор?
Embed-бейдж для README
Похожее
Все в категории development