MCP.so
登录

JS MCP Server

@Positive-Spaces

基本信息

分类

其他

传输方式

stdio

作者

Positive-Spaces

关于 JS MCP Server

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

#js-mcp-server#wasm-sdk#javascript

JS MCP Server 配置

暂无标准配置

该服务器的 README 中没有可解析的 MCP 配置块,请前往代码仓库查看安装说明。

代码仓库

JS MCP Server 工具

工具列表暂未提供

当前收录暂时没有可展示的工具列表,不代表服务没有工具。请查阅项目文档了解支持的能力。

工具是从 README 中自动提取的。维护者可以在 ## Tools 标题下列出工具,即可填充这部分内容。

概览

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.

常见问题

1

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`.

2

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.

3

Can I query a database with JS MCP Server?

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

4

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`.

5

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.

评论

其他 分类下的更多 MCP 服务器