Example MCP servers demonstrating local file operations and external API integrations

Example MCP servers demonstrating local file operations and external API integrations

gritai-basic-mcp-server•byastensby

A beginner-focused demonstration project containing two Model Context Protocol servers: one for motivational quotes and local task management, and one for fetching Norwegian police incidents and stock market data.

License: Not specified•Runtime: Awaiting documentation review•Category: developer tools

WHAT IT DOES

  • •Provides a quotes and task manager server that returns a greeting, serves random motivational quotes from a local JSON file, and can add, list, and complete tasks stored locally.
  • •Provides an API integration server that fetches real-time Norwegian police incidents and offers stock ticker search and current stock price tools.
  • •Exposes tools for greeting, fetching police incidents, filtering incidents by district or municipality, searching stock tickers, and getting stock prices.

BEST FOR

  • •Beginners learning how to build MCP servers with minimal coding experience.
  • •Developers who want examples of MCP tools that interact with local files and external APIs.

ABOUT GRITAI-BASIC-MCP-SERVER

Example MCP servers demonstrating local file operations and external API integrations is cataloged as an MCP server attributed to astensby. A beginner-focused demonstration project containing two Model Context Protocol servers: one for motivational quotes and local task management, and one for fetching Norwegian police incidents and stock market data. It is categorized under developer tools. See the capability inspector for recorded interfaces and their independent review status; consult upstream documentation for the current interface.

HOW TO INSTALL

Installation configuration is not reviewed. No executable setup is offered for this entry; inspect the source repository before proceeding.

LICENSE

Catalog license label: Not specified. Check the source repository's current license and terms before using, modifying or distributing this software.

能力检查器

能力定义尚未审核。未核验的采集内容不会作为可信接口展示。

Tools (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

Resources (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

Prompts (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

NEWSLETTER - COMING LATER

Newsletter subscriptions are not open yet

Email delivery is not connected. This page does not collect email addresses or create subscriptions.

Browse the registry for current listings instead.

Community Reviews

Coming later

Reviews for Example MCP servers demonstrating local file operations and external API integrations are not available yet

Review publishing and storage are not connected. This page does not collect or publish ratings or comments, including after sign-in.

FREQUENTLY ASKED QUESTIONS

What tools does the motivational server provide?

It provides a greeting, a random motivational quote tool, and task management tools to add, list, and mark tasks complete.

Does the stock market functionality require an API key?

Yes, the stock market tools require a free Alpha Vantage API key.

上游原版 README

在 GitHub 查看同一版本原文

README.md · 88a4d6c45f19 · 采集于 2026-11-13 12:06:37 UTC

保留上游原文,不做 AI 改写。为安全起见过滤脚本、表单和不安全链接。

当前显示最后一次成功采集的文档快照,请以来源页面为准。

Beginner's Guide to MCP Servers

A simple demonstration project to help beginners understand and build Model Context Protocol (MCP) servers with minimal coding experience.

What is MCP?

Model Context Protocol (MCP) is a way for AI assistants (like Claude, ChatGPT, etc.) to connect to external tools and data sources. Think of it as a bridge that allows AI to:

  • Fetch real-time information from the internet
  • Interact with your local files and applications
  • Perform specific tasks on your behalf

This project contains two example MCP servers that demonstrate different types of functionality.

What's Included

This project includes two MCP servers:

1. Motivational Quotes & Task Manager Server (motivational_server.py)

Demonstrates local file operations and task management:

  • Hello Tool: A simple greeting function
  • Random Quotes: Gets motivational quotes from a local JSON file
  • Task Manager: Add, list, and complete tasks stored locally

1. Any API Server (server.py)

Demonstrates connecting to external APIs:

  • Norwegian Police Incidents: Fetches real-time police incidents from Norway's public API
  • Stock Market Tools: Search for company stock tickers and get current stock prices (requires a free Alpha Vantage API key)

Prerequisites

Before you start, make sure you have:

  • Python 3.11 or higher installed on your computer

Installation & Setup

Step 1: Clone or Download This Project

Download this project to your computer and navigate to the project folder in your terminal.

Step 2: Create a Virtual Environment

python -m venv .venv

Step 3: Activate the Virtual Environment

On macOS/Linux:

source .venv/bin/activate

On Windows:

.venv\Scripts\activate

Step 4: Install Dependencies

pip install -e .

Step 5: (Optional) Set Up Stock Market API

To use the stock market features, you'll need a free API key from Alpha Vantage:

  1. Go to Alpha Vantage and get a free API key
  2. Set it as an environment variable:
    export ALPHA_VANTAGE_API_KEY=your_api_key_here
    

How to Use With AI Assistants

With Claude Desktop

  1. Open your Claude Desktop configuration file
  2. Add the server configuration:
{
  "mcpServers": {
    "HelloServer": {
      "command": "/opt/homebrew/bin/uv",
      "args": [
        "--directory",
        "/path/to/your/project",
        "run",
        "--with",
        "mcp[cli]",
        "mcp",
        "run",
        "server.py"        
      ],
      "env": {
        "ALPHA_VANTAGE_API_KEY": "demo"
      }
    }
  }
}

With Other MCP Clients

Refer to your MCP client's documentation for connection instructions.

Available Tools

Main Server Tools

  • hello() - Returns a greeting message
  • get_police_incidents() - Fetches latest police incidents from Norway
  • get_incidents_by_district(district_name) - Get incidents from a specific police district
  • get_incidents_by_municipality(municipality_name) - Get incidents from a specific municipality
  • search_stock_ticker(company_name) - Search for a company's stock ticker symbol
  • get_stock_price(symbol) - Get current stock price for a ticker symbol

Motivational Server Tools

  • hello() - Returns a greeting message
  • get_random_quote() - Returns a random motivational quote
  • add_task(description) - Adds a new task to your task list
  • list_tasks(status_filter) - Lists tasks (optionally filter by "pending" or "complete")
  • mark_task_complete(task_id) - Marks a task as complete

Project Structure

gritai-basic-mcp-server/
├── server.py              # Main server with API integrations
├── motivational_server.py # Server with local file operations
├── quotes.json           # Motivational quotes database
├── tasks.json            # Task storage file
├── pyproject.toml        # Project configuration
└── README.md            # This file

Customizing the Servers

Adding New Quotes

Edit quotes.json to add your own motivational quotes:

{
  "quote": "Your inspiring quote here",
  "author": "Quote Author"
}

Adding New Tools

To add a new tool to either server, use the @mcp.tool() decorator:

@mcp.tool()
def your_new_tool(parameter: str) -> str:
    """Description of what your tool does."""
    # Your tool logic here
    return "Result"

Troubleshooting

Common Issues

"Module not found" errors

  • Make sure you've activated your virtual environment
  • Run pip install -e . to install dependencies

API errors for stock tools

  • Check that your Alpha Vantage API key is set correctly
  • Free API keys have rate limits

File not found errors

  • Make sure you're running the server from the project directory
  • Check that quotes.json and tasks.json exist

Getting Help

  • Check the MCP documentation
  • Review the code comments for implementation details
  • The servers include error handling to help identify issues

Next Steps

Once you're comfortable with these examples:

  1. Try modifying the existing tools
  2. Add your own API integrations
  3. Create tools that interact with your local files
  4. Explore the MCP specification to understand advanced features

Install configuration

Are you the maintainer?

Claim this server with your GitHub account to request manual ownership verification.

README Embed Badge
Markdown

Link to the catalog listing for Example MCP servers demonstrating local file operations and external API integrations from your README. This badge does not certify ownership, compatibility or security.

[![MCP catalog listing](https://img.shields.io/badge/MCP-awesome--mcp-orange?style=flat-square)](https://awesome-mcp.com/servers/gritai-basic-mcp-server)

REPOSITORY STATS

GitHub StarsUnavailable
ForksUnavailable

Public repository statistics could not be verified. Check the configured source address; unavailable counts are not zero.

下载与拉取统计

来源、范围和时段分别列出;不相加,不代表安装人数、活跃用户或安全审核。

尚无已审核的包 / 镜像标识,暂不展示下载统计。

Related developer tools MCP Servers

Alternative and complementary servers in the same category

View all in developer tools →
Postbye
postbye-mcp•postbye-team

A directory listing describing a cancellation-letter and mailing-address service. The configured public GitHub repository returned 404 during source verification.

Repository stats unavailable
Developer Tools
Singapore Proxy MCP
singapore-proxy-mcp•Xavierfok

A hosted MCP service for browsing and searching through Singapore mobile-network proxies.

0
Developer Tools

A directory listing describing a Markdown-to-PDF service. The configured public GitHub repository returned 404 during source verification.

Repository stats unavailable
Developer Tools