MCP
维基数据实体MCP服务器
维基数据是一个共同维护的知识库,拥有超过1.21亿个项目,涵盖人员、组织、地点、作品和概念。它对于实体解析、知识图谱、搜索增强和结构化研究非常重要。
MCP 版本: 1.0.0 10 MCP工具 身份验证
基本网址
https://mcp.pressmonitor.com 身份验证
MCP 调用也使用 Bearer 令牌通过 JSON-RPC 2.0 请求。
Authorization: Bearer YOUR_TOKEN suggest_entities
建议实体
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| query_text | string | 是 | 查询文本 |
| lang | string | 不 | 语言 |
| limit | string | 不 | 限制 |
| offset | string | 不 | 偏移量 |
代码示例
curl -X POST "" -H "Authorization: Bearer YOUR_API_KEY" -H "x-subscription-id: YOUR_SUB_ID" -H "Content-Type: application/json" -d '{
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"name": "suggest_entities",
"arguments": {
"query_text": "VALUE"
}
},
"id": 1
}' search_entities_by_label
按标签搜索实体
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| query_text | string | 是 | 查询文本 |
| lang | string | 不 | 语言 |
| limit | string | 不 | 限制 |
| offset | string | 不 | 偏移量 |
代码示例
curl -X POST "" -H "Authorization: Bearer YOUR_API_KEY" -H "x-subscription-id: YOUR_SUB_ID" -H "Content-Type: application/json" -d '{
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"name": "search_entities_by_label",
"arguments": {
"query_text": "VALUE"
}
},
"id": 1
}' search_entities_by_description
按描述搜索实体
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| query_text | string | 是 | 查询文本 |
| lang | string | 不 | 语言 |
| limit | string | 不 | 限制 |
| offset | string | 不 | 偏移量 |
代码示例
curl -X POST "" -H "Authorization: Bearer YOUR_API_KEY" -H "x-subscription-id: YOUR_SUB_ID" -H "Content-Type: application/json" -d '{
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"name": "search_entities_by_description",
"arguments": {
"query_text": "VALUE"
}
},
"id": 1
}' search_entities_by_type
按类型搜索实体
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| type | string | 是 | 类型 |
| query_text | string | 不 | 查询文本 |
| lang | string | 不 | 语言 |
| limit | string | 不 | 限制 |
| offset | string | 不 | 偏移量 |
代码示例
curl -X POST "" -H "Authorization: Bearer YOUR_API_KEY" -H "x-subscription-id: YOUR_SUB_ID" -H "Content-Type: application/json" -d '{
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"name": "search_entities_by_type",
"arguments": {
"type": "VALUE"
}
},
"id": 1
}' search_entities_by_claim_value
按声明值搜索实体
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| property | string | 是 | 属性 |
| value | string | 不 | 值 |
| mode | string | 不 | 模式 |
| lang | string | 不 | 语言 |
| limit | string | 不 | 限制 |
| offset | string | 不 | 偏移量 |
代码示例
curl -X POST "" -H "Authorization: Bearer YOUR_API_KEY" -H "x-subscription-id: YOUR_SUB_ID" -H "Content-Type: application/json" -d '{
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"name": "search_entities_by_claim_value",
"arguments": {
"property": "VALUE"
}
},
"id": 1
}' search_entities_by_property
按属性搜索实体
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| property | string | 是 | 属性 |
| value | string | 不 | 值 |
| qualifier | string | 不 | 限定符 |
| rank | string | 不 | 等级 |
| lang | string | 不 | 语言 |
| limit | string | 不 | 限制 |
| offset | string | 不 | 偏移量 |
代码示例
curl -X POST "" -H "Authorization: Bearer YOUR_API_KEY" -H "x-subscription-id: YOUR_SUB_ID" -H "Content-Type: application/json" -d '{
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"name": "search_entities_by_property",
"arguments": {
"property": "VALUE"
}
},
"id": 1
}' search_entities_by_date_range
按日期范围搜索实体
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| property | string | 是 | 属性 |
| from | string | 不 | 起始 |
| to | string | 不 | 终止 |
| value | string | 不 | 值 |
| lang | string | 不 | 语言 |
| limit | string | 不 | 限制 |
| offset | string | 不 | 偏移量 |
代码示例
curl -X POST "" -H "Authorization: Bearer YOUR_API_KEY" -H "x-subscription-id: YOUR_SUB_ID" -H "Content-Type: application/json" -d '{
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"name": "search_entities_by_date_range",
"arguments": {
"property": "VALUE"
}
},
"id": 1
}' get_entity_by_id
通过ID获取实体
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| wikidata_id | string | 是 | 维基数据ID |
| lang | string | 不 | 语言 |
代码示例
curl -X POST "" -H "Authorization: Bearer YOUR_API_KEY" -H "x-subscription-id: YOUR_SUB_ID" -H "Content-Type: application/json" -d '{
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"name": "get_entity_by_id",
"arguments": {
"wikidata_id": "VALUE"
}
},
"id": 1
}' get_entity_claims
获取实体声明
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| wikidata_id | string | 是 | 维基数据ID |
| lang | string | 不 | 语言 |
| limit | string | 不 | 限制 |
| offset | string | 不 | 偏移量 |
代码示例
curl -X POST "" -H "Authorization: Bearer YOUR_API_KEY" -H "x-subscription-id: YOUR_SUB_ID" -H "Content-Type: application/json" -d '{
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"name": "get_entity_claims",
"arguments": {
"wikidata_id": "VALUE"
}
},
"id": 1
}' get_properties
获取属性
代码示例
curl -X POST "" -H "Authorization: Bearer YOUR_API_KEY" -H "x-subscription-id: YOUR_SUB_ID" -H "Content-Type: application/json" -d '{
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"name": "get_properties",
"arguments": {}
},
"id": 1
}'