MCP Connector

Connect to iFlytek SparkAgent Platform

Minimal MCP server example for invoking the iFlytek SparkAgent Platform's task chain via a file upload tool.

Works with iflytek sparkagent

Maintainer of this project? Claim this page to edit the listing.


86
Spark score
out of 100
Updated Jun 2025
Version 1.0.0
Models
universal

Add to Favorites

Why it matters

Integrate with the iFlytek SparkAgent platform to invoke task chains and upload files. This connector enables seamless interaction with SparkAgent functionalities through the Model Context Protocol.

Outcomes

What it gets done

01

Upload files to the iFlytek SparkAgent platform.

02

Invoke task chains on the iFlytek SparkAgent platform.

03

Configure connection details via environment variables.

04

Utilize stdio or SSE transport protocols for communication.

Install

Add it to your toolbox

Run in your project directory:

curl -fsSL https://spark.entire.vc/get/vb-iflytek-sparkagent-platform | bash

Capabilities

Tools your agent gets

upload_file

Accepts a file path to upload files to the iFlytek SparkAgent platform

Overview

iFlytek SparkAgent Platform MCP Server

ifly-spark-agent-mcp is a minimal example MCP server exposing a single upload_file tool that triggers an iFlytek SparkAgent Platform task chain. Use it as a starting example for wiring file-driven SparkAgent task chains into an MCP client; it's a single-tool example, not a full SparkAgent API client.

What it does

ifly-spark-agent-mcp is a simple example MCP server that invokes a task chain on the iFlytek SparkAgent Platform. It exposes a single tool, upload_file, which accepts a file path and passes it into the configured SparkAgent task chain. The server supports both stdio (default) and SSE transport for local debugging.

When to use - and when NOT to

Use this connector as a starting point when you want an AI assistant to trigger an iFlytek SparkAgent Platform task chain by uploading a file - for example, feeding a document or data file into a pre-configured SparkAgent workflow.

Do not expect a broad feature set - this is explicitly described as a simple example implementation with one tool, not a full-coverage SparkAgent API client. It also requires an iFlytek SparkAgent account with a base URL, app ID, and app secret already provisioned.

Inputs and outputs

The upload_file tool takes a required file parameter (the path of the file to upload). The output is the result returned by the invoked SparkAgent task chain after processing that file.

Capabilities

  • upload_file: upload a file by path to trigger the configured iFlytek SparkAgent Platform task chain

How to install

Run locally with stdio (default) or SSE transport:

uv run ifly-spark-agent-mcp
# or
uv run ifly-spark-agent-mcp --transport sse --port 8000

For Claude Desktop, add to claude_desktop_config.json:

{
  "mcpServers": {
    "ifly-spark-agent-mcp": {
      "command": "uv",
      "args": ["--directory", "/path/to/ifly-spark-agent-mcp", "run", "ifly-spark-agent-mcp"],
      "env": {
        "IFLY_SPARK_AGENT_BASE_URL": "xxxx",
        "IFLY_SPARK_AGENT_APP_ID": "xxxx",
        "IFLY_SPARK_AGENT_APP_SECRET": "xxxx"
      }
    }
  }
}

Or run directly from GitHub via uvx --from git+https://github.com/iflytek/ifly-spark-agent-mcp ifly-spark-agent-mcp with the same environment variables.

Who it's for

Developers experimenting with the iFlytek SparkAgent Platform who want a minimal example of triggering a task chain via file upload from an MCP client.

Source README

ifly-spark-agent-mcp

This is a simple example of using MCP Server to invoke the task chain of the iFlytek SparkAgent Platform.

Usage

Local debugging

Start the server using either stdio (default) or SSE transport:

# Using stdio transport (default)
uv run ifly-spark-agent-mcp

# Using SSE transport on custom port
uv run ifly-spark-agent-mcp --transport sse --port 8000

By default, the server exposes a tool named "upload_file" that accepts one required argument:

  • file: The path of the uploaded file

MCP Client Example

Using the MCP client, you can use the tool like this using the STDIO transport:

import asyncio
from mcp.client.session import ClientSession
from mcp.client.stdio import StdioServerParameters, stdio_client


async def main():
    async with stdio_client(
        StdioServerParameters(command="uv", args=["run", "ifly-spark-agent-mcp"])
    ) as (read, write):
        async with ClientSession(read, write) as session:
            await session.initialize()

            # List available tools
            tools = await session.list_tools()
            print(tools)

            # Call the upload_file tool
            result = await session.call_tool("upload_file", {"file": "/path/to/file"})
            print(result)


asyncio.run(main())

Usage with MCP client

Use on Claude

To add a persistent client, add the following to your claude_desktop_config.json or mcp.json file:

1. Use uv
{
  "mcpServers": {
    "ifly-spark-agent-mcp": {
      "command": "uv",
      "args": [
        "--directory",
        "/path/to/ifly-spark-agent-mcp",
        "run",
        "ifly-spark-agent-mcp"
      ],
      "env": {
        "IFLY_SPARK_AGENT_BASE_URL": "xxxx",
        "IFLY_SPARK_AGENT_APP_ID": "xxxx",
        "IFLY_SPARK_AGENT_APP_SECRET": "xxxx"
      }
    }
  }
}
2. Use uvx with github repository
{
    "mcpServers": {
        "ifly-spark-agent-mcp": {
            "command": "uvx",
            "args": [
                "--from",
                "git+https://github.com/iflytek/ifly-spark-agent-mcp",
                "ifly-spark-agent-mcp"
            ],
            "env": {
              "IFLY_SPARK_AGENT_BASE_URL": "xxxx",
              "IFLY_SPARK_AGENT_APP_ID": "xxxx",
              "IFLY_SPARK_AGENT_APP_SECRET": "xxxx"
            }
        }
    }
}

FAQ

Common questions

Discussion

Questions & comments · 0

Sign In Sign in to leave a comment.