MCP.so
Sign In

JS MCP Server

@Positive-Spaces

About JS MCP Server

JavaScript MCP Server Component with WASM SDK for easy integration and deployment.

Basic information

Category

Other

Runtime

node

Transports

stdio

Publisher

Positive-Spaces

Config

No standard config provided

This server doesn't expose a parseable MCP config block in its README. See the repository for install instructions.

Repository

Tools

No tools detected

We auto-extract tools from the README. The maintainer can list them under a ## Tools heading to populate this section.

Overview

What is JS MCP Server?

JS MCP Server is a JavaScript Model Context Protocol server component built with a WebAssembly SDK. It allows developers to create MCP servers in JavaScript that compile to WebAssembly, integrating with Postgres databases and external HTTP APIs through developer-friendly abstractions.

How to use JS MCP Server?

Clone the repository, install the required global tools (@bytecodealliance/componentize-js and @bytecodealliance/jco), install local dependencies, and run npm run build to generate the WebAssembly module at dist/js-mcp-server.wasm. Customize the server by adding handler functions (tools) in the handlers directory and registering them in server.js.

Key features of JS MCP Server

  • Compiles JavaScript MCP servers to WebAssembly modules.
  • Developer-friendly HTTP client with GET, POST, PUT, and more.
  • Async Postgres query interface for database-backed tools.
  • Custom handler registration with name, description, and schema.
  • Built-in support for error handling and graceful JSON parsing.
  • Easy integration with existing JavaScript projects via Vite bundling.

Use cases of JS MCP Server

  • Knowledge graph tools: Query a Postgres database to retrieve entity data.
  • External API integration: Fetch data from any REST API (e.g., random dog images).
  • Custom tool creation: Easily add new MCP tools by writing handler functions.
  • Lightweight server deployment: Package your MCP server as a WASM module for portable execution.

FAQ from JS MCP Server

What dependencies are required to build JS MCP Server?

You need Node.js, npm, and the global packages @bytecodealliance/componentize-js and @bytecodealliance/jco. Local npm dependencies are installed via npm install.

How do I add a new custom tool/handler?

Create a new JavaScript file in the handlers directory with an exported handler function and tool metadata. Import it in server.js, then add it to the tools object in the createMcpServer call.

Can I query a database with JS MCP Server?

Yes, you can use the query function from the comapi:postgres/[email protected] interface for async Postgres queries. Parameters must be wrapped as WIT enum/variants (e.g., { tag: 'text', val: value }).

How do I make HTTP requests from my handler?

Use the SDK’s HTTP client functions like get(url, options) or post(url, data, options). Set { json: true } to automatically parse JSON responses. Custom clients can be created via createHttpClient.

What is the output of the build process?

The build produces a WebAssembly module (dist/js-mcp-server.wasm) that encapsulates your JavaScript MCP server, including all registered tools and configured handlers.

Comments

More Other MCP servers