Skip to main content
Glama
TanvirIslam-BD

Next-Generation MCP Server

A sandboxed file-operations MCP server that showcases the advanced Context features โ€” logging, progress reporting, and user elicitation โ€” with two ways to drive it: a Claude CLI (client.py) and a Groq web chat (app.py).

Capabilities

๐Ÿ› ๏ธ Tools (model-controlled โ€” the agent calls them):

Tool

Description

write_file(file_path, content)

Create/overwrite a file (with progress reporting)

read_file(file_path)

Read a file's content

append_to_file(file_path, content)

Append to a file

delete_file(file_path)

Delete a file

move_file(source, destination)

Move / rename

copy_file(source, destination)

Copy a file

make_directory(dir_path)

Create a directory

search_files(query, extension)

Search file contents across the project

file_info(file_path)

File/dir metadata

๐Ÿ“„ Resources (app-controlled): file:///{file_name} (read file) ยท dir://. (list dir) ยท stats://project (project statistics)

๐Ÿ’ฌ Prompts (user-controlled): code_review ยท documentation_generator (elicitation) ยท generate_tests ยท explain_code

Related MCP server: Sparkle MCP Server

Project structure

next-generation-mcp-server/
โ”œโ”€โ”€ fileops/                # modular MCP server package
โ”‚   โ”œโ”€โ”€ config.py           # BASE_DIR, server name/instructions, ignore list
โ”‚   โ”œโ”€โ”€ paths.py            # get_path() path-traversal guard
โ”‚   โ”œโ”€โ”€ schemas.py          # Pydantic models (elicitation)
โ”‚   โ”œโ”€โ”€ server.py           # builds `mcp`, registers tools/resources/prompts
โ”‚   โ”œโ”€โ”€ tools.py            # @mcp.tool definitions
โ”‚   โ”œโ”€โ”€ resources.py        # @mcp.resource definitions
โ”‚   โ””โ”€โ”€ prompts.py          # @mcp.prompt definitions
โ”œโ”€โ”€ server.py               # entry point  โ†’  python server.py
โ”œโ”€โ”€ client.py               # Claude CLI client (Anthropic)
โ”œโ”€โ”€ app.py                  # Groq chat UI (Chainlit)
โ”œโ”€โ”€ chainlit.md
โ”œโ”€โ”€ tests/test_server.py    # smoke test of all capabilities
โ”œโ”€โ”€ pyproject.toml ยท requirements.txt ยท .env.example ยท .gitignore ยท README.md

Setup

cd next-generation-mcp-server
python -m venv .venv
.\.venv\Scripts\Activate.ps1        # Windows  (macOS/Linux: source .venv/bin/activate)
pip install -r requirements.txt

Add a key to .env (Copy-Item .env.example .env):

  • GROQ_API_KEY โ€” free at console.groq.com, used by the web UI (app.py).

  • ANTHROPIC_API_KEY โ€” used by the CLI (client.py).

Run

Web chat UI (Groq):

chainlit run app.py -w          # โ†’ http://localhost:8200

Chat to use the file tools; slash commands for the rest: /dir ยท /read <f> ยท /stats ยท /tools ยท /review <f> ยท /tests <f> ยท /explain <f> ยท /docs ยท /help. You can also attach a file and say "review this file".

Claude CLI (Anthropic):

python client.py server.py

Run the server directly / tests:

python server.py
python tests\test_server.py     # or: python -m pytest

How it works

  • The server runs over STDIO; the client/UI spawn it as a subprocess.

  • Tools are model-controlled (the agent calls them in its loop).

  • Resources are app-controlled (/dir, /read, /stats).

  • Prompts are user-controlled (/review, /tests, /explain, /docs).


Based on the IBM Skills Network "Enhanced MCP Server" lab, refactored into a modular package and extended with more tools, resources, prompts, and a Groq UI.

Maintenance

ActivityInactive
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    Provides secure file access and clipboard history management for Claude AI and other MCP-compatible clients, with sandboxed file operations and search capabilities.
    12
    5
    MIT