mcp-trial
An MCP server for the GitHub API that provides repo summaries, recent commit messages, raw README resources, and a prompt template for evaluating repos as portfolio pieces.
README
mcp-trial
Me learning the Model Context Protocol by building a server for the GitHub API. Python SDK v2, running over stdio and hooked into Claude Code.
What it does
Two tools, one for a repo's summary and one for its recent commit messages. There's also a resource that serves a repo's raw README, and a prompt template for assessing a repo as a portfolio piece.
Running it
uv sync
uv run mcp dev server.py # opens the inspector
uv run python test_server.py # calls the server directly, no host needed
To register it with Claude Code:
claude mcp add gh-lab -- uv run --directory /path/to/mcp-trial mcp run server.py
What I learned
Your type hints are the actual API contract, since the SDK builds the tool's JSON
schema straight from the function signature. Writing limit: int = 5 also makes that
parameter optional, so the model can skip it.
Docstrings mattered more than I expected, because they get sent to the model as the tool description and decide which tool it picks. I asked Claude Code whether a repo was actively maintained, and it called both tools and worked it out, which only happened because the descriptions made them look combinable.
Everything a tool returns becomes text in the model's context, so each field costs tokens. GitHub hands back about a hundred fields and I return five.
Raising an error beats returning one, since raising sets a flag the host checks and the message reaches the model as something it can act on.
Async doesn't make anything faster. A single call takes the same time either way.
What await does is park the function and free the event loop so other calls can run
during the wait.
Notes
mcp-reference.md has my working notes from building this.
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.