openalex-mcp
Version:
A Model Context Protocol (MCP) server that provides access to the OpenAlex API - a fully open catalog of the global research system covering over 240 million scholarly works.
16 lines (15 loc) • 475 B
JavaScript
import { makeOpenAlexRequest } from "../utils.js";
export async function getEntity(args) {
const { entity_type, openalex_id, select, mailto } = args;
const params = {};
if (select)
params.select = select;
if (mailto)
params.mailto = mailto;
return {
content: [{
type: "text",
text: JSON.stringify(await makeOpenAlexRequest(`/${entity_type}/${openalex_id}`, params), null, 2)
}]
};
}