Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions docs/plugin-authoring.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,12 @@ An external product plugin can install a remote connector through the MCP
plugin's public port. Declare `uses: ['mcpConnectors']`; do not import MCP
storage, routes, OAuth helpers, or call the machine's own HTTP API.

The MCP plugin continues to expose its normal machine-local configuration and
status routes for clients that configure a connector manually. Harness does not
publish an MCP marketplace, featured catalogue, or third-party registry-search
route. A product that curates connectors owns that catalogue itself and declares
the selected connector through this port.

```ts
import { definePlugin, type McpConnectorPort } from '@hoshi/harness'

Expand Down
2 changes: 2 additions & 0 deletions src/plugins/mcp/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ describe('the public MCP connector port', () => {
beginDcrAuthorization: expect.any(Function),
status: expect.any(Function),
})
expect(routes.get).toHaveBeenCalledWith('/mcp', expect.any(Function))
expect(routes.post).toHaveBeenCalledWith('/mcp/:name/oauth', expect.any(Function))
expect(routes.get).not.toHaveBeenCalledWith('/mcp/registry', expect.any(Function))
})
})
2 changes: 0 additions & 2 deletions src/plugins/mcp/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import addServer from './mcp.index.post.js'
import updateServer from './mcp.name.patch.js'
import reconnectServer from './mcp.name.reconnect.post.js'
import removeServer from './mcp.name.delete.js'
import registry from './mcp.registry.get.js'
import oauthCallback from './mcp.oauth.callback.get.js'
import startOauth from './mcp.name.oauth.post.js'
import disconnectOauth from './mcp.name.oauth.delete.js'
Expand Down Expand Up @@ -80,7 +79,6 @@ export default definePlugin({
host.routes.patch('/mcp/:name', updateServer)
host.routes.post('/mcp/:name/reconnect', reconnectServer)
host.routes.delete('/mcp/:name', removeServer)
host.routes.get('/mcp/registry', registry)
/**
*
* OAuth for remote connectors. The callback is registered BEFORE `/mcp/:name`
Expand Down
23 changes: 0 additions & 23 deletions src/plugins/mcp/mcp.registry.get.ts

This file was deleted.

Loading
Loading