XibeCode

MCP Integration

Connect to external servers via the Model Context Protocol for databases, APIs, file systems, and more. Configure GitHub, PostgreSQL, Slack, filesystem, and custom MCP servers.

XibeCode supports the Model Context Protocol (MCP), an open protocol that standardizes how applications provide context to LLMs. Connect to external servers for databases, APIs, file systems, and more.

What is MCP?

MCP enables:

  • Extended Tools — Add tools from external servers (databases, APIs, etc.)
  • Access Resources — Read data from external sources
  • Prompt Templates — Use pre-built prompts from servers
  • Context Sharing — Share context between different AI tools

Quick Start

# Initialize MCP configuration
xibecode mcp init

# Add a server
xibecode mcp add

# List configured servers
xibecode mcp list

# Reload after editing
xibecode mcp reload

Adding MCP Servers

# Show the config file path
xibecode mcp file

# Open in your default editor
xibecode mcp edit

Configuration Format

{
  "mcpServers": {
    "filesystem": {
      "command": "mcp-server-filesystem",
      "args": ["--root", "/path/to/files"]
    },
    "github": {
      "command": "mcp-server-github",
      "env": {
        "GITHUB_TOKEN": "your_token_here"
      }
    },
    "postgres": {
      "command": "mcp-server-postgres",
      "env": {
        "DATABASE_URL": "postgresql://user:pass@localhost/db"
      }
    }
  }
}

MCP Commands

xibecode mcp init      # Initialize default config
xibecode mcp add       # Add a server
xibecode mcp edit      # Edit configuration
xibecode mcp list      # List configured servers
xibecode mcp remove    # Remove a server
xibecode mcp reload    # Reload after editing
xibecode mcp file      # Show file path
xibecode mcp status    # Check connection status

Using MCP Tools

Once configured, MCP tools are automatically available. Tools are prefixed with the server name:

filesystem::read_file
github::create_issue
github::list_repos
postgres::query
slack::send_message

In chat mode, view MCP tools:

xibecode chat
> /mcp              # Show MCP status and tools
> /mcp list         # List all MCP tools
> /mcp reload       # Reload MCP servers

Server Configuration Options

OptionDescriptionRequired
commandThe command to start the MCP serverYes
argsArray of command-line argumentsNo
envEnvironment variables for the serverNo
cwdWorking directory for the serverNo

Example Configurations

GitHub MCP Server

npm install -g @modelcontextprotocol/server-github
{
  "mcpServers": {
    "github": {
      "command": "mcp-server-github",
      "env": {
        "GITHUB_TOKEN": "ghp_your_token_here"
      }
    }
  }
}
xibecode chat
> Create an issue about the login bug in the main repo

PostgreSQL MCP Server

npm install -g @modelcontextprotocol/server-postgres
{
  "mcpServers": {
    "postgres": {
      "command": "mcp-server-postgres",
      "env": {
        "DATABASE_URL": "postgresql://user:pass@localhost:5432/mydb"
      }
    }
  }
}

Filesystem MCP Server

npm install -g @modelcontextprotocol/server-filesystem
{
  "mcpServers": {
    "docs": {
      "command": "mcp-server-filesystem",
      "args": ["--root", "/path/to/documentation"]
    }
  }
}

Slack MCP Server

{
  "mcpServers": {
    "slack": {
      "command": "mcp-server-slack",
      "env": {
        "SLACK_BOT_TOKEN": "xoxb-your-token",
        "SLACK_TEAM_ID": "T01234567"
      }
    }
  }
}
ServerDescriptionPackage
FilesystemFile system access@modelcontextprotocol/server-filesystem
GitHubGitHub API integration@modelcontextprotocol/server-github
PostgreSQLPostgreSQL database@modelcontextprotocol/server-postgres
SlackSlack messaging@modelcontextprotocol/server-slack
Google DriveGoogle Drive access@modelcontextprotocol/server-gdrive
SQLiteSQLite database@modelcontextprotocol/server-sqlite
PuppeteerBrowser automation@modelcontextprotocol/server-puppeteer

Transport Types

XibeCode supports stdio transport — MCP servers run as local subprocesses. The server communicates via standard input/output streams using JSON-RPC messages.

Debugging MCP Connections

# Check server status
xibecode mcp status

# View server logs (verbose mode)
xibecode chat --verbose
> /mcp

# Test a specific tool
xibecode chat
> Use the github::list_repos tool to list my repositories

Security Considerations

  • Store sensitive tokens in environment variables, not in config files
  • Use read-only database credentials when possible
  • Limit filesystem access to specific directories
  • Review MCP server permissions before installation

Building Custom MCP Servers

import { Server } from "@modelcontextprotocol/sdk/server/index.js";
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";

const server = new Server(
  {
    name: "my-custom-server",
    version: "1.0.0",
  },
  {
    capabilities: { tools: {} },
  },
);

server.setRequestHandler(ListToolsRequestSchema, async () => ({
  tools: [
    {
      name: "my_custom_tool",
      description: "Does something custom",
      inputSchema: {
        type: "object",
        properties: {
          input: { type: "string" },
        },
      },
    },
  ],
}));

const transport = new StdioServerTransport();
await server.connect(transport);

XibeCode Docs MCP Server

XibeCode exposes its own documentation as an MCP server, allowing any AI tool (Claude Code, Cursor, Windsurf, etc.) to search and read XibeCode docs in real-time.

Endpoint: https://xibeai.in/api/mcp

Available Tools

ToolDescription
search_docsSearch XibeCode documentation by keyword. Returns matching page titles, descriptions, and URLs.
read_docRead the full content of a documentation page by its slug.
list_docsList all available documentation pages with titles, descriptions, and URLs.

Connect from Claude Code

claude mcp add --transport http xibecode-docs https://xibeai.in/api/mcp

Connect from Cursor

Add to your .cursor/mcp.json:

{
  "mcpServers": {
    "xibecode-docs": {
      "url": "https://xibeai.in/api/mcp"
    }
  }
}

Connect from Any MCP Client

The server supports the Streamable HTTP transport. Connect to:

https://xibeai.in/api/mcp

For stdio-only clients, use the mcp-remote proxy:

npx mcp-remote https://xibeai.in/api/mcp

Next Steps

Ctrl+I
Assistant

How can I help?

Ask me about configuration, installation, or specific features.