Xano API와 상호 작용하기 위한 모델 컨텍스트 프로토콜(MCP) 서버 구현입니다. 이 서버는 MCP 인터페이스를 통해 Xano 데이터베이스 작업을 관리하기 위한 도구와 리소스를 제공합니다.
xano_mcp/
├── src/
│ ├── api/
│ │ └── xano/
│ │ ├── client/ # API client implementation
│ │ ├── models/ # Data models and types
│ │ ├── services/ # API service implementations
│ │ └── utils/ # Utility functions
│ ├── mcp/
│ │ ├── server/ # MCP server implementation
│ │ ├── tools/ # MCP tool implementations
│ │ └── types/ # Tool-specific types
│ ├── config.ts # Configuration management
│ └── index.ts # Main entry point
├── .env # Environment variables (not in git)
├── .env.example # Example environment variables
└── tsconfig.json # TypeScript configuration
// List available workspaces
const result = await mcp.use_tool("get_workspaces", {});
console.log('Workspaces:', result);
// Create a new table
const createResult = await mcp.use_tool("create_table", {
workspaceId: 123,
name: "MyTable"
});
// Add content to a table
const addResult = await mcp.use_tool("add_table_content", {
workspaceId: 123,
tableId: 456,
content: {
created_at: "2024-01-22T17:07:00.000Z"
}
});
// Get table content with pagination
const getResult = await mcp.use_tool("get_table_content", {
workspaceId: 123,
tableId: 456,
pagination: {
page: 1,
items: 50
}
});
// Update table content
const updateResult = await mcp.use_tool("update_table_content", {
workspaceId: 123,
tableId: 456,
contentId: "789",
content: {
created_at: "2024-01-22T17:07:00.000Z"
}
});
// List all tables in a workspace
const tables = await mcp.use_tool("get_all_tables", {
workspaceId: 123
});
console.log('Tables:', tables);
// Returns an array of tables with their details:
// [
// {
// id: number,
// name: string,
// description: string,
// created_at: string,
// updated_at: string,
// guid: string,
// auth: boolean,
// tag: string[],
// workspaceId: number
// },
// ...
// ]
서버는 다음에 대한 자세한 오류 메시지를 제공합니다.