Skip to main content

MCP File Parser

PyPI version

A file parser using Kimi AI. However, all of this is free.

Installation

pip install mcp-fileparser

Usage

As a Python Library

  1. Set up your environment variables.

    Create a .env file in your project root and add your Kimi API key:

    KIMI_API_KEY="your_api_key"
    
  2. Use the parse_file function.

    from mcp_fileparser import parse_file
    
    content = parse_file("/path/to/your/file.xlsx")
    print(content)
    

As an MCP Server

This package can also be used as an MCP (Model Context Protocol) server, providing file parsing capabilities to MCP clients.

Installation

  1. Install the package:

    pip install mcp-fileparser
    
  2. Set up your environment variables:

    Create a .env file in your project root and add your Kimi API key:

    KIMI_API_KEY="your_api_key"
    

Configuration

Add the MCP server to your MCP client configuration. For example, in Claude Desktop or other MCP-compatible clients:

{
  "mcpServers": {
    "mcp-fileparser": {
      "command": "npx",
      "args": [
        "--from",
        "mcp-fileparser",
        "parse_file"
      ],
      "env": {
        "KIMI_API_KEY": "your_api_key"
      }
    }
  }
}

Available Tools

Once connected, the MCP server provides the following tool:

  • parse_file: Parse a file and extract its content using Kimi AI
    • Parameters:
      • fpath (string): The path to the file you want to parse
    • Returns: The extracted content as a string

Example Usage

In an MCP-compatible client, you can use the parse_file tool like this:

# Example of how the tool would be called by an MCP client
result = await client.call_tool("parse_file", {
  "fpath": "/path/to/your/document.pdf"
})
print(result.content)

Supported File Types

The file parser supports various file types including:

  • PDF documents
  • Word documents (.docx)
  • Excel spreadsheets (.xlsx)
  • Text files (.txt)
  • And many other formats supported by Kimi AI

Running the Server Manually

You can also run the MCP server manually for testing:

# Set your API key
export KIMI_API_KEY="your_api_key"

# Run the server
fileparser

The server will start and listen for MCP connections via stdio transport.

License

This project is licensed under the MIT License.

Metadata

Release files for mcp-fileparser 0.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mcp-fileparser 0.1.3
File Size Uploaded Provenance
mcp_fileparser-0.1.3.tar.gz 3.2 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for mcp-fileparser 0.1.3
File Interpreter ABI Platform
mcp_fileparser-0.1.3-py3-none-any.whl Python 3 none any Details

Total release size: 6.7 kB

Release files / mcp_fileparser-0.1.3.tar.gz

Download URL mcp_fileparser-0.1.3.tar.gz
Size 3.2 kB
Tags Source
SHA-256 checksum
How to use checksums
dc92cbb60a68ac29f87bb569f51af613df5477a54010f5b82066282c83a25729
BLAKE2b-256 checksum
How to use checksums
77da9fcb1603d4fa3be702135ebea89dda6ee931a2b3b99da0901cedc031f659
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.8.4

Release files / mcp_fileparser-0.1.3-py3-none-any.whl

Download URL mcp_fileparser-0.1.3-py3-none-any.whl
Size 3.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0057a3b4002d4f11cde36cc3e29d99c9223f0c87ec7d6cd4e97a474d3c5e40cd
BLAKE2b-256 checksum
How to use checksums
7e9b2acf7c11dc025bc93e0ef32d7fed93ab56ee1945d265fa1bc08fa545dc51
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.8.4

Security for mcp-fileparser 0.1.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.3 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page