diff --git a/README.md b/README.md index 3feeae8..0453008 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ Build interactive React UIs for MCP tools. ## Installation ```bash -npm install @mcp-ui-kit +npm install mcp-ui-kit ``` ## Server Usage @@ -13,7 +13,7 @@ npm install @mcp-ui-kit Create UI components that bundle on-demand: ```typescript -import { createUI } from '@mcp-ui-kit/server'; +import { createUI } from 'mcp-ui-kit/server'; const dashboardUI = createUI('my-dashboard', import.meta.resolve('./MyComponent.tsx')); @@ -32,7 +32,7 @@ server.registerTool('dashboard', { Helper functions for your React components: ```typescript -import { sendPrompt, callTool, useProps } from '@mcp-ui-kit/react'; +import { sendPrompt, callTool, useProps } from 'mcp-ui-kit/ui'; function MyComponent() { const { title } = useProps({ title: 'Default' }); @@ -53,7 +53,7 @@ function MyComponent() { ## API -### Server (`@mcp-ui-kit/server`) +### Server (`mcp-ui-kit/server`) **`createUI(name, entryUrl)`** - Creates a UI component - `name`: Component identifier @@ -72,9 +72,7 @@ createUI('dashboard', require.resolve('./MyComponent.tsx')); createUI('dashboard', path.join(__dirname, './MyComponent.tsx')); ``` -The library automatically converts `file://` URLs to file paths, so both approaches work seamlessly. - -### UI (`@mcp-ui/library/ui`) +### UI (`mcp-ui-kit/ui`) - **`useProps(defaults)`** - Get props passed from the server - **`sendPrompt(message)`** - Send a message to the AI chat diff --git a/package.json b/package.json index bf95784..1da743c 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,8 @@ "watch:library": "npm run watch --workspace=@mcp-ui-kit", "watch:inspector": "npm run watch --workspace=@mcp-ui-kit/inspector", "inspector": "npx @modelcontextprotocol/inspector", - "nanobot": "dotenv -e .env -- nanobot run ./nanobot.yaml" + "nanobot": "dotenv -e .env -- nanobot run ./nanobot.yaml", + "publish:library": "npm publish --workspace=packages/library" }, "devDependencies": { "dotenv-cli": "^11.0.0",