Skip to main content
Glama

get-github-user

Retrieve GitHub user information by providing a username to access profile data through the MCP server.

Instructions

根据用户名获取 Github 用户信息

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
usernameNo

Implementation Reference

  • Handler function that fetches GitHub user information from the GitHub API based on the provided username and returns it as a JSON string in text content.
    async ({ username }) => { // 获取网格点数据的 URL const pointsUrl = `https://api.github.com/users/${username}`; const data: Root = await fetch(pointsUrl).then((response) => response.json(), ); return { content: [ { type: 'text', text: JSON.stringify(data), }, ], }; },
  • src/index.ts:77-102 (registration)
    Registration of the 'get-github-user' tool using server.tool, specifying name, description, input schema, and handler function.
    server.tool( // 工具名称 'get-github-user', // 工具描述 '根据用户名获取 Github 用户信息', // 工具参数 { username: z.string().optional(), }, // 工具的异步处理函数 async ({ username }) => { // 获取网格点数据的 URL const pointsUrl = `https://api.github.com/users/${username}`; const data: Root = await fetch(pointsUrl).then((response) => response.json(), ); return { content: [ { type: 'text', text: JSON.stringify(data), }, ], }; }, );
  • Zod schema defining the input parameter 'username' as an optional string.
    { username: z.string().optional(), },
Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/chenshuai2144/mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server