mcp-server-context
Explain Background:
- I was working on a pet project that has sport events data in MongoDB, data about events was scraped from Web
- part of the project is UI to browse events
- using Claude Code for development MCP Servers
- explain what are MCP servers and how do they extend Cloud Code capabilities Dive deeper in wht I did
- wanted to explore how I could provide natural language search capability to explore events database. Instead of using classic UI with filters, I wanted user to be able to ask questions like "What are most popular triathlon events near Warsaw in June-August?"
- Built a custom MCP server
- explain what are tools, resources and prompts in MCP?
- Tools: running some scripts to generate test data from Claude Code. Same could be achieved by allowing Claude Code to run command line, but that was to explore the capability
- Resources: feeding Claude Code with context coming directly from my MongoDB database. Thanks to that I could ask questions via Claude prompt about data in database. That was the main use case of me. When Claude was seeing value in fetching data from DB to extend context, it was doing that automatically and formulating answers based on found information. That was exactly what I wanted to PoC for the potential use in the website directly
- Prompts: if I had well curated prompt texts, that would be instructing LLM model what to do example, for example how to efficiently use MCP resources, MCP server provide option to define templates (with placeholder values) for prompts to be then used when making request to LLM. This is a simple concept and prompt templates could me maintained also in application itself, but sometimes it makes sense to manage them centrally as part of MCP server
- sources of project are in /Users/pawel/git/scraper