JS MCP Server
@Positive-Spaces
JS MCP Server について
JavaScript MCP Server Component with WASM SDK for easy integration and deployment.
基本情報
設定
ツール
ツールは検出されませんでした
ツールは 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.
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.
「その他」の他のコンテンツ
Maestro
mobile-dev-incPainless E2E Automation for Mobile and Web
ICSS
chokcoco不止于 CSS
AutoBrowser MCP
autobrowser-aiBrowser MCP is a Model Context Provider (MCP) server that allows AI applications to control your browser
Unity MCP ✨
justinpbarnettUnity MCP acts as a bridge between AI assistants and your Unity Editor. Give your LLM tools to manage assets, control scenes, edit scripts, and automate tasks within Unity.
MaxKB
1Panel-dev🔥 MaxKB is an open-source platform for building enterprise-grade agents. 强大易用的开源企业级智能体平台。
コメント