
A directory listing describing a cancellation-letter and mailing-address service. The configured public GitHub repository returned 404 during source verification.

A customizable Model Context Protocol server written in JavaScript that is componentized into WebAssembly and supports adding tool handlers.
JavaScript MCP server component with WASM SDK is cataloged as an MCP server attributed to positive-spaces. A customizable Model Context Protocol server written in JavaScript that is componentized into WebAssembly and supports adding tool handlers. It is categorized under developer tools. See the capability inspector for recorded interfaces and their independent review status; consult upstream documentation for the current interface.
Installation configuration is not reviewed. No executable setup is offered for this entry; inspect the source repository before proceeding.
Catalog license label: Not specified. Check the source repository's current license and terms before using, modifying or distributing this software.
能力定义尚未审核。未核验的采集内容不会作为可信接口展示。
暂无可展示的已审核记录。这不表示上游不支持此能力。
暂无可展示的已审核记录。这不表示上游不支持此能力。
暂无可展示的已审核记录。这不表示上游不支持此能力。
Email delivery is not connected. This page does not collect email addresses or create subscriptions.
Browse the registry for current listings instead.
Reviews for JavaScript MCP server component with WASM SDK are not available yet
Review publishing and storage are not connected. This page does not collect or publish ratings or comments, including after sign-in.
Create a handler file in the handlers directory, import it in server.js, and add it to the tools object passed to createMcpServer.
Yes, the SDK provides an HTTP client abstraction with methods like get, post, put, patch, and delete, and a json option to parse JSON responses.
README.md · 381972d2d7b4 · 采集于 2026-11-13 10:45:54 UTC
保留上游原文,不做 AI 改写。为安全起见过滤脚本、表单和不安全链接。
当前显示最后一次成功采集的文档快照,请以来源页面为准。
JavaScript MCP Server Component with WASM SDK for easy integration and deployment.
To get started with the JS MCP Server, follow these steps:
git clone https://github.com/justin-echternach/js-mcp-server.git
cd js-mcp-server
npm install -g @bytecodealliance/componentize-js @bytecodealliance/jco
npm install
To build the project and generate the WebAssembly module:
npm run build
This will bundle the JavaScript code using Vite and componentize it into dist/js-mcp-server.wasm.
You can customize the server by adding or modifying handlers (also referred to as tools). Handlers are registered in the server.js file and are located in the handlers directory. To add a new handler:
handlers directory with your handler implementation.server.js.tools object in the createMcpServer function call, similar to how EchoTool, KgTool, and FetchDogTool are added.For example, to add a new handler named MyCustomTool:
// In server.js
import { MyCustomTool } from './handlers/index.js';
createMcpServer({
serverInfo: {
name: "JavaScript MCP Server",
version: "1.0.0"
},
tools: {
[EchoTool.name]: EchoTool,
[KgTool.name]: KgTool,
[MyCustomTool.name]: MyCustomTool
},
handlers: {
// Custom handlers (optional)
}
});
Handlers (tools) are the core of your server's functionality. Each handler should export:
Here's a minimal handler based on FetchDogTool:
// handlers/fetch_dog_tool.js
export async function handleTool(parameters) {
try {
// Perform your logic (e.g., HTTP request)
return { result: 'success!' };
} catch (error) {
return { error: error.message };
}
}
export function getToolName() {
return 'fetch_dog';
}
export function getToolDescription() {
return 'Fetches a random dog image from the Dog API';
}
export function getToolSchema() {
return { type: 'object', properties: {} };
}
export const FetchDogTool = {
handler: handleTool,
name: getToolName(),
description: getToolDescription(),
schema: getToolSchema()
};
handlers/index.js:
import { FetchDogTool } from './fetch_dog_tool.js';
export { FetchDogTool };
// ...add to tools map if needed
tools object in server.js:
import { FetchDogTool } from './handlers/fetch_dog_tool.js';
createMcpServer({
tools: {
[FetchDogTool.name]: FetchDogTool,
// ...other tools
}
});
async and return plain objects.schema property to describe expected input.name and description fields for discoverability.For more advanced features (timeouts, retries, richer error handling), consider extending your handler logic accordingly.
Your MCP server can interact with external services such as HTTP APIs and Postgres databases using robust, developer-friendly abstractions.
You can query a Postgres database using the query function from the comapi:postgres/query@0.1.0 interface. This is useful for knowledge graph or data-backed tools.
Example:
import { query } from "comapi:postgres/query@0.1.0";
export async function handleTool(parameters) {
const entityFilter = parameters?.entityFilter || "";
const sqlQuery = `
SELECT id, name FROM my_table
WHERE name ILIKE $1
LIMIT 10
`;
const inputValue = `%${entityFilter}%`;
// PgValue enum/variant: { tag: 'text', val: value }
const params = [{ tag: 'text', val: inputValue }];
const result = await query(sqlQuery, params);
return { rows: result.rows };
}
Best Practices:
{ tag: 'text', val: value } for text inputs.The SDK provides a developer-friendly HTTP client abstraction for making outgoing HTTP requests, wrapping WASI HTTP complexity.
Example:
import { get } from '../sdk/http/index.js';
export async function handleTool(parameters) {
try {
// Simple GET request with JSON response
const response = await get('https://dog.ceo/api/breeds/image/random', { json: true });
return { image_url: response.message, status: response.status };
} catch (error) {
return { error: error.message };
}
}
Available HTTP methods:
get(url, options)post(url, data, options)put(url, data, options)patch(url, data, options)del(url, options) (alias: deleteRequest)head, options, postJson, putJson, patchJson, postForm, putFormcreateHttpClient.Best Practices:
json: true option to automatically parse JSON responses.try/catch and return a clear error object.Claim this server with your GitHub account to request manual ownership verification.
Link to the catalog listing for JavaScript MCP server component with WASM SDK from your README. This badge does not certify ownership, compatibility or security.
[](https://awesome-mcp.com/servers/js-mcp-server)Public repository statistics could not be verified. Check the configured source address; unavailable counts are not zero.
来源、范围和时段分别列出;不相加,不代表安装人数、活跃用户或安全审核。
尚无已审核的包 / 镜像标识,暂不展示下载统计。
Alternative and complementary servers in the same category

A directory listing describing a cancellation-letter and mailing-address service. The configured public GitHub repository returned 404 during source verification.

A hosted MCP service for browsing and searching through Singapore mobile-network proxies.

A directory listing describing a Markdown-to-PDF service. The configured public GitHub repository returned 404 during source verification.