FM

foss42/mcp

Developer tools

Эта страница переведена автоматически. Технические детали смотрите в оригинале. Открыть оригинал

3 stars 0 forks Качество 76 Тренд 18Apache-2.0

Open Source foss42 MCP Server

Обзор

An MCP server exposing the foss42 utilities — country data, text and case conversion, and human-friendly number and date formatting. Built with FastMCP. , no API key, no network calls — everything runs locally against bundled data. See for the reasoning and measured before/after. Run over (the default, for local clients such as Claude Code or Claude Desktop): Or over , for a remotely reachable server: The MCP endpoint is then http:// : /mcp. Use absolute paths, and point at the venv's interpreter rather than a bare python. All five tools are annotated readOnlyHint, idempotentHint, destructiveHint: false and openWorldHint: false, so clients can skip confirmation prompts.

README

Показан фрагмент оригинального README. Открыть оригинал.

foss42 MCP Server

An MCP server exposing the foss42 utilities — country data, text and case conversion, and human-friendly number and date formatting.

Built with FastMCP. 5 workflow-shaped tools, no API key, no network calls — everything runs locally against bundled data.

See DESIGN.md for the reasoning and measured before/after.

Quick start

Requires Python 3.10+.

python3 -m venv .venv
.venv/bin/pip install -r requirements.txt

Run over stdio (the default, for local clients such as Claude Code or Claude Desktop):

.venv/bin/python server.py

Or over streamable HTTP, for a remotely reachable server:

.venv/bin/python server.py --transport http --host 0.0.0.0 --port 8000

The MCP endpoint is then http://:/mcp.

Flag Default Description
--transport stdio stdio or http
--host 127.0.0.1 Bind address (http only)
--port 8000 Bind port (http only)

To try the tools by hand, see TESTING.md.

Connecting a client

Claude Code

claude mcp add foss42 -- /path/to/mcp/.venv/bin/python /path/to/mcp/server.py

Claude Desktop — add to claude_desktop_config.json:

{
  "mcpServers": {
    "foss42": {
      "command": "/path/to/mcp/.venv/bin/python",
      "args": ["/path/to/mcp/server.py"]
    }
  }
}

Use absolute paths, and point at the venv’s interpreter rather than a bare python.

All five tools are annotated readOnlyHint, idempotentHint, destructiveHint: false and openWorldHint: false, so clients can skip confirmation prompts.

Tools

get_country_info

Look up one or more countries and return only the fields you ask for.

get_country_info(country: str | list[str], include: list[CountryField] = None)

country takes a name, alias, or ISO alpha-2/alpha-3 code. You never need to know the code. Pass a list to look up several at once.

Resolution is forgiving: diacritics, punctuation and the definite article are normalised (Türkiye, Turkiye, U.S.A., The Netherlands), historical and colloquial names resolve (Burma → Myanmar, Swaziland → Eswatini, Holland → Netherlands, Great Britain → GB), and an ambiguous input is reported rather than guessed:

"Korea" → 'Korea' matches more than one country: North Korea (KP), South Korea (KR).
          Pass the one you mean, or use search_countries to compare them.

include selects fields; the default is names, codes, flag, stats.

Field Contents
names Common name, official name, known aliases
codes ISO 3166-1 alpha-2 and alpha-3
flag Flag emoji
Открыть полный README на GitHub

Установка

This server does not publish a one-line install command.

Open the repository installation guide Новичок в MCP? Начните с руководства на mcpskill.org →

Конфигурация

{ "mcpServers": { "foss42": { "command": "/path/to/mcp/.venv/bin/python", "args": ["/path/to/mcp/server.py"] } } }