@topaisaas/mcp-server 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 TopAI SaaS Studio
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,138 @@
1
+ # Universal Native MCP Server Hub
2
+
3
+ > **Universal Model Context Protocol (MCP) Server Hub for Claude Code, Cursor, Windsurf, and Antigravity**
4
+
5
+ [![Cloudflare Workers](https://img.shields.io/badge/Platform-Cloudflare%20Workers-orange.svg)](https://workers.cloudflare.com/)
6
+ [![License](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)
7
+ [![Uptime](https://img.shields.io/badge/Uptime-100%25-brightgreen.svg)](https://mcp-server-hub.topaisaas.workers.dev/v1/health)
8
+ [![OpenAPI](https://img.shields.io/badge/OpenAPI-3.0.3-brightgreen.svg)](https://mcp-server-hub.topaisaas.workers.dev/openapi.json)
9
+ [![RapidAPI](https://img.shields.io/badge/RapidAPI-Subscribe%20Free-blue.svg)](https://rapidapi.com/topaisaasdev/api/universal-native-mcp-server-hub/pricing)
10
+
11
+ With the rise of autonomous coding assistants and agents (**Claude Code, Cursor, Windsurf, Antigravity, CrewAI, LangChain**), the **Model Context Protocol (MCP)** has become the universal standard for tool calling.
12
+
13
+ Instead of installing 10 separate local servers or bloated Docker containers, **Universal Native MCP Server Hub** bundles 9 production-grade AI primitives into a single serverless edge hub running with 0ms cold-start latency across 300+ global Cloudflare locations.
14
+
15
+ ---
16
+
17
+ ## 📦 9 Native Pre-Bundled MCP Tools
18
+
19
+ 1. `topai_web_to_markdown`: Extract ad-free, noise-free Markdown from any public URL.
20
+ 2. `topai_company_enrichment`: 70+ technographics, employee range, and B2B firmographics from domain.
21
+ 3. `topai_ai_web_search`: Real-time grounding search engine for LLMs with citations.
22
+ 4. `topai_math_fact_checker`: Deterministic VAT, invoice reconciliation, and business days to stop hallucinations.
23
+ 5. `topai_techstack_fingerprint`: Sub-50ms BuiltWith alternative (Shopify, Stripe, HubSpot, Next.js).
24
+ 6. `topai_polymarket_arbitrage`: Prediction market odds, cross-platform delta vs bookmakers, and Kelly sizing.
25
+ 7. `topai_token_slimmer`: Lossless HTML & JSON compressor to slash input token costs by 30-70%.
26
+ 8. `topai_prompt_shield`: Sub-millisecond firewall against prompt injection, jailbreaks, and PII leaks.
27
+ 9. `topai_invoice_extractor`: Structured financial entity parser (vendor, IBAN, amounts, line items).
28
+
29
+ ---
30
+
31
+ ## 🚀 Quick Setup in Your IDE
32
+
33
+ ### 1. Cursor (`.cursor/mcp.json`)
34
+ Add to your project's `.cursor/mcp.json` or global Cursor settings:
35
+
36
+ ```json
37
+ {
38
+ "mcpServers": {
39
+ "topai-hub": {
40
+ "url": "https://mcp-server-hub.topaisaas.workers.dev/sse"
41
+ }
42
+ }
43
+ }
44
+ ```
45
+
46
+ ### 2. Claude Desktop (`claude_desktop_config.json`)
47
+ ```json
48
+ {
49
+ "mcpServers": {
50
+ "topai-hub": {
51
+ "url": "https://mcp-server-hub.topaisaas.workers.dev/sse"
52
+ }
53
+ }
54
+ }
55
+ ```
56
+
57
+ ### 3. Windsurf (`mcp_config.json`)
58
+ ```json
59
+ {
60
+ "mcpServers": {
61
+ "topai-hub": {
62
+ "serverUrl": "https://mcp-server-hub.topaisaas.workers.dev/sse"
63
+ }
64
+ }
65
+ }
66
+ ```
67
+
68
+ ### 4. Antigravity (`mcp_servers.json`)
69
+ ```json
70
+ {
71
+ "topai-hub": {
72
+ "url": "https://mcp-server-hub.topaisaas.workers.dev/sse",
73
+ "description": "TopAI SaaS Universal MCP Hub with 9 production tools"
74
+ }
75
+ }
76
+ ```
77
+
78
+ ---
79
+
80
+ ## 🛠️ Direct REST & JSON-RPC Usage
81
+
82
+ ### List Available Tools (GET)
83
+ ```bash
84
+ curl "https://mcp-server-hub.topaisaas.workers.dev/v1/mcp/tools"
85
+ ```
86
+
87
+ ### Execute a Tool via REST (POST)
88
+ ```bash
89
+ curl -X POST https://mcp-server-hub.topaisaas.workers.dev/v1/mcp/call \
90
+ -H "Content-Type: application/json" \
91
+ -d '{
92
+ "name": "topai_techstack_fingerprint",
93
+ "arguments": {
94
+ "domain": "gymshark.com"
95
+ }
96
+ }'
97
+ ```
98
+
99
+ **Response (Standard MCP Content Block):**
100
+ ```json
101
+ {
102
+ "success": true,
103
+ "tool": "topai_techstack_fingerprint",
104
+ "content": [
105
+ {
106
+ "type": "text",
107
+ "text": "{\n \"domain\": \"gymshark.com\",\n \"technologies\": [\"Shopify\", \"Klaviyo\", \"Stripe\", \"Cloudflare\"],\n \"detected_count\": 4,\n \"sub_50ms\": true\n}"
108
+ }
109
+ ]
110
+ }
111
+ ```
112
+
113
+ ### Standard MCP JSON-RPC 2.0 (POST /mcp)
114
+ ```bash
115
+ curl -X POST https://mcp-server-hub.topaisaas.workers.dev/mcp \
116
+ -H "Content-Type: application/json" \
117
+ -d '{
118
+ "jsonrpc": "2.0",
119
+ "id": "1",
120
+ "method": "tools/call",
121
+ "params": {
122
+ "name": "topai_math_fact_checker",
123
+ "arguments": {
124
+ "operation": "vat_calculate",
125
+ "amount": 250,
126
+ "rate_percent": 20
127
+ }
128
+ }
129
+ }'
130
+ ```
131
+
132
+ ---
133
+
134
+ ## 🛡️ Edge Security & SLAs
135
+
136
+ - **0ms Cold-Start**: Powered by Cloudflare Workers V8 isolates worldwide.
137
+ - **100% Stateless**: No user prompts, code, or arguments are logged or stored.
138
+ - **Spec Compliance**: Fully compliant with the Anthropic Model Context Protocol (2024-11-05).
package/bin/cli.js ADDED
@@ -0,0 +1,55 @@
1
+ #!/usr/bin/env node
2
+
3
+ /**
4
+ * TopAI SaaS Universal MCP Server - Stdio Proxy
5
+ * Reads JSON-RPC from stdin, proxies to Cloudflare Workers edge (or executes locally), and writes to stdout.
6
+ */
7
+
8
+ import readline from "node:readline";
9
+
10
+ const EDGE_URL = "https://mcp-server-hub.topaisaas.workers.dev/mcp";
11
+
12
+ const rl = readline.createInterface({
13
+ input: process.stdin,
14
+ output: process.stdout,
15
+ terminal: false
16
+ });
17
+
18
+ rl.on("line", async (line) => {
19
+ const trimmed = line.trim();
20
+ if (!trimmed) return;
21
+
22
+ try {
23
+ const jsonReq = JSON.parse(trimmed);
24
+
25
+ const headers = { "Content-Type": "application/json" };
26
+ const apiKey = process.env.TOPAI_RAPIDAPI_KEY || process.env.RAPIDAPI_KEY;
27
+ if (apiKey) {
28
+ headers["X-RapidAPI-Key"] = apiKey;
29
+ }
30
+
31
+ // Call Cloudflare Edge
32
+ const resp = await fetch(EDGE_URL, {
33
+ method: "POST",
34
+ headers,
35
+ body: JSON.stringify(jsonReq)
36
+ });
37
+
38
+ if (resp.status === 204) {
39
+ return; // Notification, no response
40
+ }
41
+
42
+ const data = await resp.json();
43
+ process.stdout.write(JSON.stringify(data) + "\n");
44
+ } catch (err) {
45
+ const errorResponse = {
46
+ jsonrpc: "2.0",
47
+ id: null,
48
+ error: {
49
+ code: -32603,
50
+ message: `Internal error in MCP Stdio Bridge: ${err.message || String(err)}`
51
+ }
52
+ };
53
+ process.stdout.write(JSON.stringify(errorResponse) + "\n");
54
+ }
55
+ });
package/package.json ADDED
@@ -0,0 +1,51 @@
1
+ {
2
+ "name": "@topaisaas/mcp-server",
3
+ "version": "1.0.0",
4
+ "description": "Universal Native Model Context Protocol (MCP) Server Hub for Claude Code, Cursor, Windsurf, and Antigravity. Bridges high-speed web-to-markdown, company enrichment, real-time web search, math fact-checking, tech stack fingerprinter, and prediction market arbitrage into native agent tools.",
5
+ "type": "module",
6
+ "main": "bin/cli.js",
7
+ "bin": {
8
+ "topai-mcp": "bin/cli.js",
9
+ "topaisaas-mcp": "bin/cli.js"
10
+ },
11
+ "files": [
12
+ "bin",
13
+ "README.md",
14
+ "LICENSE",
15
+ "smithery.yaml"
16
+ ],
17
+ "publishConfig": {
18
+ "access": "public"
19
+ },
20
+ "repository": {
21
+ "type": "git",
22
+ "url": "git+https://github.com/topaisaas-dev/universal-mcp-server-hub.git"
23
+ },
24
+ "scripts": {
25
+ "dev": "wrangler dev",
26
+ "deploy": "wrangler deploy",
27
+ "test": "node --test tests/mcp_hub.test.js"
28
+ },
29
+ "keywords": [
30
+ "mcp",
31
+ "model-context-protocol",
32
+ "claude-code",
33
+ "cursor",
34
+ "windsurf",
35
+ "antigravity",
36
+ "ai-agent-tools",
37
+ "cloudflare-worker",
38
+ "json-rpc",
39
+ "sse"
40
+ ],
41
+ "author": "topaisaas-dev",
42
+ "license": "MIT",
43
+ "dependencies": {
44
+ "hono": "^4.6.14"
45
+ },
46
+ "devDependencies": {
47
+ "@cloudflare/workers-types": "^4.20241230.0",
48
+ "typescript": "^5.7.2",
49
+ "wrangler": "^3.99.0"
50
+ }
51
+ }
package/smithery.yaml ADDED
@@ -0,0 +1,10 @@
1
+ startCommand:
2
+ type: stdio
3
+ configSchema:
4
+ type: object
5
+ properties:
6
+ rapidApiKey:
7
+ type: string
8
+ description: "Optional RapidAPI key for unlimited production quota (free tier included by default)"
9
+ command: "node"
10
+ args: ["bin/cli.js"]