mcp-aladin-books-server
MCP 服务配置
复制以下 JSON 到 OPClaw 或其他 MCP 客户端的配置文件中即可使用
{
"mcpServers": {
"aladin-books": {
"args": [
"\u003c\u003e/mcp-aladin-books-server/dist/index.js"
],
"command": "node",
"env": {
"ALADIN_TTB_KEY": "_TTB_"
}
}
}
}
服务介绍
MCP (Node.js)
API MCP(Model Context Protocol) .
- ** **: , , ,
- ** **: ISBN
- ****: ( )
- ** **: ( )
API
MCP API .
- TTB
- API
DXT
- [] - []
- DXT
- API
1.
npm install
npm run build
2. MCP
{
"mcpServers": {
"aladin-books": {
"command": "node",
"args": [
"<>/mcp-aladin-books-server/dist/index.js"
],
"env": {
"ALADIN_TTB_KEY": "_TTB_"
}
}
}
}
(Tools)
1. search_books
.
:
query(string):searchType(enum): (Title, Author, Publisher, Keyword)maxResults(number): (1-100, : 10)start(number): (: 1)
2. get_book_detail
ISBN .
:
isbn(string): ISBN (10 13)
3. get_bestsellers
. .
:
maxResults(number): (1-100, : 10)start(number): (: 1)categoryId(string, optional): ID (CID) -
4. get_new_books
. .
:
maxResults(number): (1-100, : 10)start(number): (: 1)categoryId(string, optional): ID (CID) -
5. get_special_new_books
. .
:
maxResults(number): (1-100, : 10)start(number): (: 1)categoryId(string, optional): ID (CID) -
6. get_editor_choice
. .
:
maxResults(number): (1-100, : 10)start(number): (: 1)categoryId(string, optional): ID (CID) -
7. get_blogger_best
. , .
:
maxResults(number): (1-100, : 10)start(number): (: 1)categoryId(string, optional): ID (CID) -
8. search_categories
. .
:
searchTerm(string):maxResults(number): (1-50, : 20)
9. get_popular_categories
. .
:
limit(number): (1-50, : 20)
10. format_books_table
. , ISBN , .
:
type(enum): (search, isbn, bestseller, new_books, special_new_books, editor_choice, blogger_best)query(string, optional): (type search )isbn(string, optional): ISBN (type isbn )searchType(enum): (Title, Author, Publisher, Keyword, : Title)maxResults(number): (1-50, : 10)categoryId(string, optional): ID ( )
MCP :
//
await callTool('search_books', {
query: '',
searchType: 'Title',
maxResults: 5
});
//
await callTool('get_book_detail', {
isbn: '9788966262755'
});
//
await callTool('get_bestsellers', {
maxResults: 10
});
//
await callTool('get_bestsellers', {
maxResults: 10,
categoryId: '798' // :
});
//
await callTool('get_new_books', {
maxResults: 10
});
//
await callTool('get_new_books', {
maxResults: 10,
categoryId: '798' // :
});
//
await callTool('get_special_new_books', {
maxResults: 10
});
//
await callTool('get_editor_choice', {
maxResults: 10
});
// ()
await callTool('get_blogger_best', {
maxResults: 10,
categoryId: '798' // :
});
// ( )
await callTool('search_categories', {
searchTerm: '',
maxResults: 10
});
// ( )
await callTool('get_popular_categories', {
limit: 10
});
// ()
await callTool('format_books_table', {
type: 'search',
query: '',
searchType: 'Title',
maxResults: 5
});
// ()
await callTool('format_books_table', {
type: 'bestseller',
maxResults: 10,
categoryId: '798'
});
// ( )
await callTool('format_books_table', {
type: 'new_books',
maxResults: 10
});
// ( )
await callTool('format_books_table', {
type: 'special_new_books',
maxResults: 10
});
// ( )
await callTool('format_books_table', {
type: 'editor_choice',
maxResults: 10
});
// ( )
await callTool('format_books_table', {
type: 'blogger_best',
maxResults: 10,
categoryId: '798'
});
server/
src/
index.ts #
aladin_book_categories.json # ()
dist/ #
package.json #
tsconfig.json # TypeScript
env.example #
test.js #
README.md #
- Node.js:
- TypeScript: (ES2020 , ESNext )
- @modelcontextprotocol/sdk: MCP
- axios: HTTP
- zod:
- tsx: TypeScript
- @types/node: Node.js
- ****: ES2020
- ****: ESNext
- ** **: dist/
- ****:
- ** **:
- **JSON **:
# TTB ()
ALADIN_TTB_KEY=your_aladin_ttb_key_here
MIT .