# xmcp MCP server (/docs/guides/xmcp-mcp-server)

## Getting started

### Connect to a client

<McpConnect serverName="xmcp-docs" serverUrl="https://xmcp.dev/mcp" />

Click any card to copy the connection config for your client.

### Standard connection

For clients not listed above, you can use the following connection method.

```json
{
  "command": "npx",
  "args": ["mcp-remote", "https://xmcp.dev/mcp"]
}
```

## Available tool

The server exposes a `search` tool that agents use automatically:

```typescript
// Search by query
search({ query: "how to configure transports" });

// Get specific page by ID
search({ id: "configuration/transports" });
```

## Example usage

Once connected, just ask your agent about xmcp:

* "How do I configure xmcp for Next.js?"
* "What transport options does xmcp support?"
* "How do I create a tool with authentication?"

The agent will search the docs and provide accurate answers with code examples.

## Troubleshooting

* **Not connecting**: Verify the URL `https://xmcp.dev/mcp` is correct and restart your agent
* **No results**: Try more specific queries or use exact doc IDs
* **Agent not using MCP**: Check your agent's MCP configuration and logs
