Publish Your MCP Server
Build an MCP-compatible tool, deploy it, and reach thousands of developers on the AppHighway marketplace.
Why Publish on AppHighway?
AppHighway handles discovery, authentication, billing, and rate limiting so you can focus on building great tools.
Instant Discovery
Your tool appears in the marketplace and MCP registry — AI agents and developers find it automatically.
Built-in Billing
Points-based billing is handled for you. No payment integration, invoicing, or subscription management needed.
Unified Authentication
Users authenticate once with their AppHighway token. You receive validated requests — no auth code on your end.
90/10 Revenue Split
You keep 90% of all points revenue generated by your tool. AppHighway retains 10% for platform services.
Prerequisites
What you need before getting started.
Build Your MCP Server
Follow these steps to create an MCP-compatible tool from scratch.
Step 1: Initialize Your Project
Create a new directory and initialize a TypeScript project.
mkdir my-mcp-tool && cd my-mcp-tool
npm init -y
npm install typescript @types/node --save-dev
npx tsc --init{
"name": "my-mcp-tool",
"version": "1.0.0",
"type": "module",
"main": "dist/index.js",
"scripts": {
"build": "tsc",
"start": "node dist/index.js"
},
"dependencies": {
"@modelcontextprotocol/sdk": "^1.0.0",
"zod": "^3.22.0"
},
"devDependencies": {
"@types/node": "^20.0.0",
"typescript": "^5.3.0"
}
}Step 2: Install the MCP SDK
Install the official Model Context Protocol SDK and Zod for input validation.
npm install @modelcontextprotocol/sdk zodStep 3: Define Your Tool
Create your MCP server with tool definitions. Here's a complete example — a text-analyzer tool that returns word count, character count, and reading time.
import { Server } from "@modelcontextprotocol/sdk/server/index.js";
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
import {
CallToolRequestSchema,
ListToolsRequestSchema,
} from "@modelcontextprotocol/sdk/types.js";
const server = new Server(
{ name: "text-analyzer", version: "1.0.0" },
{ capabilities: { tools: {} } }
);
// List available tools
server.setRequestHandler(ListToolsRequestSchema, async () => ({
tools: [
{
name: "analyze_text",
description: "Analyze text and return word count, character count, and estimated reading time.",
inputSchema: {
type: "object",
properties: {
text: {
type: "string",
description: "The text to analyze",
},
},
required: ["text"],
},
},
],
}));
// Handle tool calls
server.setRequestHandler(CallToolRequestSchema, async (request) => {
if (request.params.name === "analyze_text") {
const { text } = request.params.arguments as { text: string };
const words = text.split(/\s+/).filter(Boolean).length;
const characters = text.length;
const readingTimeMinutes = Math.ceil(words / 200);
return {
content: [
{
type: "text",
text: JSON.stringify({
words,
characters,
readingTimeMinutes,
}, null, 2),
},
],
};
}
throw new Error(`Unknown tool: ${request.params.name}`);
});
// Start server with stdio transport
const transport = new StdioServerTransport();
await server.connect(transport);Test Locally
Before deploying, test your MCP server locally using the MCP Inspector and Claude Desktop.
MCP Inspector
The MCP Inspector is a browser-based tool for testing MCP servers interactively.
npx @modelcontextprotocol/inspector node dist/index.jsTest with Claude Desktop
Add your server to Claude Desktop's configuration to test it with a real AI agent.
{
"mcpServers": {
"text-analyzer": {
"command": "node",
"args": ["/absolute/path/to/dist/index.js"]
}
}
}Deploy Your Server
Deploy your MCP server with HTTP/SSE transport so AppHighway can proxy requests to it.
HTTP/SSE Transport
For marketplace publishing, your server needs an HTTP endpoint. Replace the stdio transport with HTTP/SSE.
import { Server } from "@modelcontextprotocol/sdk/server/index.js";
import { SSEServerTransport } from "@modelcontextprotocol/sdk/server/sse.js";
import express from "express";
const app = express();
const server = new Server(
{ name: "text-analyzer", version: "1.0.0" },
{ capabilities: { tools: {} } }
);
// ... tool handlers (same as above) ...
app.get("/sse", async (req, res) => {
const transport = new SSEServerTransport("/messages", res);
await server.connect(transport);
});
app.post("/messages", async (req, res) => {
// Handle incoming messages
});
app.listen(3001, () => {
console.log("MCP server running on http://localhost:3001");
});Hosting Options
Deploy to any hosting provider that supports Node.js:
Deployment Requirements
Publish on AppHighway
Once your server is deployed and tested, submit it through the publisher dashboard.
Publishing Steps
- Go to your Publisher Dashboard
- Click "New Tool"
- Fill in the required fields
- Submit for review
Required Fields
Review Process
After submission, AppHighway reviews your tool for quality, security, and MCP compatibility. Reviews typically complete within 2–3 business days.
Review Criteria
How the Proxy Works
Understanding how AppHighway routes requests to your MCP server helps you build better tools.
Request Flow
Authentication
User sends a request with their Bearer token. AppHighway validates the token.
Rate Limiting
The request is checked against the user's rate limit (configurable per token).
Points Deduction
Points are deducted from the user's balance before the request is forwarded (pre-deduction).
Forwarding
The validated request is forwarded to your MCP server endpoint with an internal auth header.
Response
Your server's response is returned to the user. If your server errors, the user sees a standardized error.
Earnings & Analytics
Track your tool's performance and revenue through the publisher dashboard.
Revenue Model
You keep 90% of all points revenue. AppHighway retains 10% for platform services.
Revenue Eligibility
Not all usage generates publisher revenue:
Publisher Analytics
Your dashboard shows: