{"id":35041666,"url":"https://github.com/brooswit/node-mcp-server","last_synced_at":"2026-05-14T16:02:00.443Z","repository":{"id":309119026,"uuid":"1035221940","full_name":"brooswit/node-mcp-server","owner":"brooswit","description":"Easy plug-and-play MCP server","archived":false,"fork":false,"pushed_at":"2025-08-09T23:26:07.000Z","size":5,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-10T01:12:13.211Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/brooswit.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-08-09T23:13:09.000Z","updated_at":"2025-08-09T23:26:10.000Z","dependencies_parsed_at":"2025-08-10T01:22:20.884Z","dependency_job_id":null,"html_url":"https://github.com/brooswit/node-mcp-server","commit_stats":null,"previous_names":["brooswit/node-mcp-server"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/brooswit/node-mcp-server","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brooswit%2Fnode-mcp-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brooswit%2Fnode-mcp-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brooswit%2Fnode-mcp-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brooswit%2Fnode-mcp-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/brooswit","download_url":"https://codeload.github.com/brooswit/node-mcp-server/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brooswit%2Fnode-mcp-server/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33032638,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-13T13:14:54.681Z","status":"online","status_checked_at":"2026-05-14T02:00:06.663Z","response_time":57,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-12-27T08:19:00.042Z","updated_at":"2026-05-14T16:02:00.431Z","avatar_url":"https://github.com/brooswit.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## @brooswit/node-mcp-server\n\nMinimal, embeddable MCP server core for Node.js. Provides JSON-RPC 2.0 handling, tool registry, and tool invocation for the Model Context Protocol (MCP).\n\n### Install\n\n- As a local workspace package or via file reference. No external runtime deps.\n\n### API\n\n- **McpServer class**\n  - `constructor()` - Create server instance\n  - `register(specLoader)` - Register a tool spec loader function\n    - specLoader: () =\u003e Promise\u003c{ MCP_TOOL_SPECS?: ToolSpec[] }\u003e\n  - `start()` - Initialize the server and pre-build tool registry\n  - `handle(request)` - Handle JSON-RPC requests\n  - `listTools()` - Get available tools\n\n- **constants**\n  - JSONRPC_VERSION\n  - JSONRPC_METHOD_INITIALIZE, JSONRPC_METHOD_TOOLS_LIST, JSONRPC_METHOD_TOOLS_CALL\n  - JSONRPC_ERROR_* codes\n  - MCP_PROTOCOL_VERSION, MCP_SERVER_NAME, MCP_SERVER_VERSION\n\n### ToolSpec shape\n\n```\ninterface ToolSpec {\n  name: string;\n  description: string;\n  inputSchema: Record\u003cstring, unknown\u003e;\n  params: string[];\n  fn: (...args: any[]) =\u003e Promise\u003cany\u003e | any;\n}\n```\n\n### Example\n\n```js\nimport { McpServer, JSONRPC_METHOD_TOOLS_LIST } from '@brooswit/node-mcp-server';\n\nconst server = new McpServer();\nserver.register(() =\u003e import('./my-tools.mjs'));\nawait server.start();\n\nconst resp = await server.handle({ jsonrpc: '2.0', id: 1, method: JSONRPC_METHOD_TOOLS_LIST });\nconsole.log(resp);\n```\n\n### Notes\n- Call `register()` to add tool spec loaders, then `start()` to initialize the registry.\n- Duplicate tool names are de-duped by first occurrence.\n- Results are wrapped for broad MCP client compatibility: strings become text items; objects are JSON-stringified unless already shaped as an MCP tool result.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrooswit%2Fnode-mcp-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbrooswit%2Fnode-mcp-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrooswit%2Fnode-mcp-server/lists"}