MCP Chat
The server provides document management tools via MCP.
read_doc: Retrieve the full contents of a specified document by its ID.
edit_doc: Modify a document by replacing an exact old string with new content (requires doc_id, old_string, new_string).
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@MCP Chat summarize @deposition.md"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
MCP Chat
MCP Chat is a command-line interface application that enables interactive chat capabilities with AI models through the Anthropic API. The application supports document retrieval, command-based prompts, and extensible tool integrations via the MCP (Model Control Protocol) architecture.
Prerequisites
Python 3.9+
Anthropic API Key
Related MCP server: MCP Chat
Setup
Step 1: Configure the environment variables
Create or edit the
.envfile in the project root and verify that the following variables are set correctly:
ANTHROPIC_API_KEY="" # Enter your Anthropic API secret keyStep 2: Install dependencies
Option 1: Setup with uv (Recommended)
uv is a fast Python package installer and resolver.
Install uv, if not already installed:
pip install uvCreate and activate a virtual environment:
uv venv
source .venv/bin/activate # On Windows: .venv\Scripts\activateInstall dependencies:
uv pip install -e .Run the project
uv run main.pyOption 2: Setup without uv
Create and activate a virtual environment:
python -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activateInstall dependencies:
pip install anthropic python-dotenv prompt-toolkit "mcp[cli]==1.8.0"Run the project
python main.pyUsage
Basic Interaction
Simply type your message and press Enter to chat with the model.
Document Retrieval
Use the @ symbol followed by a document ID to include document content in your query:
> Tell me about @deposition.mdCommands
Use the / prefix to execute commands defined in the MCP server:
> /summarize deposition.mdCommands will auto-complete when you press Tab.
Development
Adding New Documents
Edit the mcp_server.py file to add new documents to the docs dictionary.
Implementing MCP Features
To fully implement the MCP features:
Complete the TODOs in
mcp_server.pyImplement the missing functionality in
mcp_client.py
Linting and Typing Check
There are no lint or type checks implemented.
Developemnt Testing
To see the tool available to MCP client (in MCP server), run the below command:
If not running on uv:
python mcp_client.pyIf running on uv:
uv run mcp_client.pyOutput:
> Tools: meta=None nextCursor=None tools=[Tool(name='read_doc', title=None, description='Read the contents of a document.', inputSchema={'properties': {'doc_id': {'description': 'The ID of the document to read.', 'title': 'Doc Id', 'type': 'string'}}, 'required': ['doc_id'], 'title': 'read_documentArguments', 'type': 'object'}, outputSchema=None, icons=None, annotations=None, meta=None, execution=None), Tool(name='edit_doc', title=None, description='Edit the contents of a document by replacing the old content with new content.', inputSchema={'properties': {'doc_id': {'description': 'The ID of the document to edit.', 'title': 'Doc Id', 'type': 'string'}, 'old_string': {'description': 'The old string of the document, must match including whitespace and punctuation.', 'title': 'Old String', 'type': 'string'}, 'new_string': {'description': 'The new content for the document.', 'title': 'New String', 'type': 'string'}}, 'required': ['doc_id', 'old_string', 'new_string'], 'title': 'edit_documentArguments', 'type': 'object'}, outputSchema=None, icons=None, annotations=None, meta=None, execution=None)]
To run MCP inspector:
If want to test whether MCP server tools work correctly before connecting to a full application.
uv run mcp dev mcp_server.py
It opens a window like this in Default browser or enables this local URL http://127.0.0.1:6275/
Showing tools

Showing Resources:
Resources in MCP servers allow you to expose data to clients, similar to GET request handlers in a typical HTTP server. They're perfect for scenarios where you need to fetch information rather than perform actions.

Showing Prompts:
Prompts in MCP servers let you define pre-built, high-quality instructions that clients can use instead of writing their own prompts from scratch.

Running the MCP Client:
uv run main.pyOuput for testing tools:
(app) anthropic_introduction_to_mcp> uv run main.py > what is the contents of the report.pdf document ? I'll read the contents of the report.pdf document for you. Response: The report.pdf document contains details about the state of a 20m condenser tower.Output for testing resources:
(app) anthropic_introduction_to_mcp> uv run main.py > what's in the @report.pdf Response: The report.pdf contains details about the state of a 20m condenser tower. > What's in the @financials.docx deposition.md Resource report.pdf Resource financials.docx Resource outlook.pdf Resource plan.md Resource spec.txt ResourceOutput for testing prompts:
(app) anthropic_introduction_to_mcp> uv run main.py `> /format plan.md I'll help you reformat the document with proper markdown syntax. Let me first read the document to see its current content. I can see the document already has a basic markdown header structure. However, it's very minimal with just a title and one sentence. Let me enhance it with more structure to make it a more complete and useful plan document: Response: Perfect! I've successfully reformatted and enhanced the document with comprehensive markdown syntax. Here's what I added: **Changes made:** 1. **Multiple Header Levels**: Added `##` level 2 headers for different sections (Overview, Implementation Steps, Timeline, Key Stakeholders, Success Criteria) 2. **Bullet Points**: Created a bulleted list with bold phase names for the Implementation Steps section 3. **Table**: Added a formatted markdown table showing the Timeline with columns for Phase, Duration, and Status 4. **Unordered List**: Added a simple bullet list for Key Stakeholders 5. **Checkboxes**: Used markdown task list syntax (`- [ ]`) for Success Criteria to make it interactive The document now has a professional structure with clear organization, making it much more useful as an actual project implementation plan. The markdown formatting makes it easy to read and navigate through different sections. > Where the above formatted doc is stored? Response: The formatted document is stored in **plan.md**. This is the document ID that was specified at the beginning, and all the markdown formatting changes I made (including the headers, bullet points, table, and task list) have been saved to this file. > I want to see the contents of this document Response: # Project Implementation Plan ## Overview The plan outlines the steps for the project's implementation. ## Implementation Steps - **Phase 1**: Planning and Requirements Gathering - **Phase 2**: Design and Architecture - **Phase 3**: Development and Testing - **Phase 4**: Deployment and Launch - **Phase 5**: Monitoring and Maintenance ## Timeline | Phase | Duration | Status | |-------|----------|--------| | Phase 1 | 2 weeks | Pending | | Phase 2 | 3 weeks | Pending | | Phase 3 | 6 weeks | Pending | | Phase 4 | 1 week | Pending | | Phase 5 | Ongoing | Pending | ## Key Stakeholders - Project Manager - Development Team - Quality Assurance Team - Operations Team ## Success Criteria - [ ] All phases completed on schedule - [ ] Requirements met and validated - [ ] Quality standards achieved - [ ] Successful deployment with minimal issues-> Summary:
- Need to give Claude new capabilities? Use tools - Need to get data into your app for UI or context? Use resources - Want to create predefined workflows for users? Use prompts
Available Tools
2 toolsTool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 2 tools
read_doc and edit_doc have clearly distinct purposes: one retrieves contentaren't and the other modifies it. There is no overlap or ambiguity between the two tools.
Both tools follow the same verb_noun snake_case pattern: read_doc and edit_doc. The naming convention is perfectly consistent across the set.
With only two tools, the server feels minimal and borderline thin for most use cases. However, for a narrowly scoped document read/edit utility, the count is not unreasonable.
The tool surface covers reading and editing but lacks create, delete, list, or search operations, preventing any real document lifecycle management. Agents cannot discover or create documents, which creates significant workflow gaps.
Maintenance
Related MCP Connectors
Talk to your public-facing AI from any MCP client — Claude, ChatGPT, Cursor, Cline, Windsurf.
Real-time chat for AI agents. Claude Code, Cursor, Cline and Codex join channels over MCP.
Persistent memory for AI assistants. Save once; recall from Claude, ChatGPT, or any MCP client.
Connect ChatGPT and Claude to your Mac, Windows or Linux with secure MCP remote access.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceA command-line interface application for interactive chat with AI models via the Anthropic API. It supports document retrieval, command-based prompts, and extensible tool integrations through the MCP architecture.-
- FlicenseAqualityDmaintenanceA command-line interface application enabling interactive chat with AI models via the Anthropic API. It supports document retrieval, command-based prompts, and extensible tool integrations through the MCP architecture.2-
- FlicenseNot gradedqualityDmaintenanceA command-line interface application that enables interactive chat with AI models via the Anthropic API, supporting document retrieval and command-based prompts through the MCP architecture.-
- FlicenseBqualityDmaintenanceCommand-line interface for interactive chat with AI models via Anthropic API, supporting document retrieval and command-based prompts through MCP.2-