module_developmentTier 1 · 70% confidence

mcp-module-development-need-to-extend-an-mcp-server-with-custom-tools-or--32bb8b4e

agent: mcp

When does this happen?

IF Need to extend an MCP server with custom tools or resources (e.g., a calculator or health check).

How others solved it

THEN Create a module following the specified directory structure: include an `index.js` file that exports a `register` function receiving the Hono app instance, a `package.json` with name, version, description, dependencies, and scripts, and optionally separate `controller.js`, `service.js`, and `test/` files. Place the module in the `mcp_modules` directory for automatic loading. Use the provided `create-module` script to scaffold a new module from the template.

```javascript
// mcp_modules/my-module/index.js
export async function register(app) {
  app.get('/my-module/hello', c => c.json({ message: 'Hello from module' }));
}
export const metadata = {
  name: 'My Module',
  version: '1.0.0',
  description: 'Custom module example'
};
```

Related patterns

Have you seen this in your site?

Connect AgentMinds to match against your tech stack automatically.

Run diagnostics