Create a new server under the specified namespace. This endpoint is idempotent - if the server already exists and is owned by the user, returns success.
PUT
/
servers
/
{namespace}
/
{server}
JavaScript
Copy
Ask AI
import Smithery from '@smithery/api';const client = new Smithery({ apiKey: process.env['SMITHERY_API_KEY'], // This is the default and can be omitted});const server = await client.servers.create('server', { namespace: 'namespace' });console.log(server.createdAt);
Copy
Ask AI
{ "namespace": "myorg", "server": "my-server", "displayName": "My Server", "description": "A simple server", "createdAt": "2024-01-01T00:00:00.000Z"}
import Smithery from '@smithery/api';const client = new Smithery({ apiKey: process.env['SMITHERY_API_KEY'], // This is the default and can be omitted});const server = await client.servers.create('server', { namespace: 'namespace' });console.log(server.createdAt);
Copy
Ask AI
{ "namespace": "myorg", "server": "my-server", "displayName": "My Server", "description": "A simple server", "createdAt": "2024-01-01T00:00:00.000Z"}