HarnessAPI: A Skill-First Framework for Unified Streaming APIs and MCP Tools
- URL: http://arxiv.org/abs/2605.22733v1
- Date: Thu, 21 May 2026 17:03:44 GMT
- Title: HarnessAPI: A Skill-First Framework for Unified Streaming APIs and MCP Tools
- Abstract summary: We present HarnessAPI, a Python framework that eliminates this duplication.<n>From one handler.py plus Pydantic schemas, the framework automatically derives a streaming HTTP endpoint.<n>It reduces framework-facing validation by 74% compared with a manually maintained dual-stack implementation.
- Score: 0.0
- License: http://creativecommons.org/licenses/by/4.0/
- Abstract: Every Python function deployed as an LLM tool must today exist in two forms: an HTTP endpoint for human-facing clients and CI pipelines, and an MCP tool registration for agent runtimes such as Claude and Cursor. These representations share business logic yet diverge in all the surrounding machinery (routing, validation, serialisation, streaming, and schema maintenance), and they drift apart as the underlying code evolves. We present HarnessAPI, a Python framework that eliminates this duplication by treating a typed skill folder as the single source of truth. From one handler.py plus Pydantic schemas, the framework automatically derives a streaming HTTP endpoint with Server-Sent Events, an interactive OpenAPI/Swagger UI, and a zero-configuration MCP tool, all served from a single process. Dual-mode content negotiation lets the same handler serve SSE-streaming and JSON-returning clients with no handler changes. A dynamic code-generation mechanism ensures Pydantic type annotations propagate correctly to FastMCP's inspection layer, resolving a technical limitation that prevents naive closure-based registration. Measured across six representative skills using cloc, HarnessAPI reduces framework-facing boilerplate by 74% compared with a manually maintained dual-stack implementation (FastAPI server + FastMCP server). HarnessAPI subclasses FastAPI, inheriting its full middleware, dependency-injection, and deployment ecosystem. It is available at https://github.com/edwinjosechittilappilly/harnessapi and on PyPI (pip install harnessapi)
Related papers
- Flama: a Python framework for development and deployment of production-ready APIs, machine learning, and LLM services [0.9668407688201359]
Flama is an open-source Python framework for developing and deploying production-ready web APIs, machine learning services, and large-model (LLM) applications.<n>It offers a type-driven, async-first programming model that unifies REST API development, predictive model serving, and generative AI inference in one architecture.
arXiv Detail & Related papers (2026-08-19T09:37:00Z) - Environment-free Synthetic Data Generation for API-Calling Agents [68.95520739708304]
Training API-calling large language model (LLM) agents demands massive amounts of high-quality trajectories.<n>We propose an environment-free synthetic data generation approach that leverages LLMs as on-the-fly digital world models.<n>We evaluate our approach on the challenging AppWorld and OfficeBench benchmarks, which include both information-retrieval and state-changing tasks.
arXiv Detail & Related papers (2026-07-18T17:36:44Z) - Separating Intelligence from Execution: A Workflow Engine for the Model Context Protocol [0.0]
We present the MCP Engine, a novel orchestration layer that decouples from execution (carrying it out)<n>The engine reduces per-execution token cost by over 99%, completes the full cluster graph--comprising 1,200+ nodes and 2,800+ relationships--in under 45 seconds.
arXiv Detail & Related papers (2026-03-13T05:12:14Z) - LAPIS: Lightweight API Specification for Intelligent Systems [0.0]
Large Language Models (LLMs) increasingly serve as consumers of API specifications, whether for code generation, autonomous agent interaction, or API-assisted reasoning.<n>We present LAPIS, a domain-specific format optimized for LLM consumption that preserves the semantic information necessary for API token usage.
arXiv Detail & Related papers (2026-02-20T15:22:13Z) - Orchestral AI: A Framework for Agent Orchestration [45.946776875141666]
Orchestral is a lightweight Python framework that provides a unified, type-safe interface for building LLM agents across major providers.<n>It operates seamlessly across providers, eliminating manual format translation and reducing framework-induced complexity.<n>It supports advanced agent capabilities found in larger frameworks, including rich tool calling, context compaction, sandboxing, user approval, sub-agents, memory management, and MCP integration.
arXiv Detail & Related papers (2026-01-05T22:02:11Z) - Code2MCP: Transforming Code Repositories into MCP Services [53.234097255779744]
Model Context Protocol (MCP) aims to create a standard for how Large Language Models use tools.<n>We introduce Code2MCP, an agent-based framework that automatically transforms a GitHub repository into a functional MCP service.<n>We demonstrate that Code2MCP successfully transforms open-source computing libraries in scientific fields such as bioinformatics, mathematics, and fluid dynamics.
arXiv Detail & Related papers (2025-09-07T06:13:25Z) - Making REST APIs Agent-Ready: From OpenAPI to MCP Servers for Tool-Augmented LLMs [0.0]
We present AutoMCP, a compiler that generates MCP servers from OpenAPI 2.0/3.0 specifications.<n>We evaluate AutoMCP on 50 real-world APIs spanning 5,066 endpoints across over 10 domains.
arXiv Detail & Related papers (2025-07-21T20:20:31Z) - Doc2Agent: Scalable Generation of Tool-Using Agents from API Documentation [2.4117201298131232]
Doc2Agent is a scalable pipeline to build tool agents that can call Python-based tools generated from API documentation.<n>We evaluate our approach on real-world APIs, WebArena APIs, and research APIs, producing validated tools.
arXiv Detail & Related papers (2025-06-24T20:30:44Z) - ExploraCoder: Advancing code generation for multiple unseen APIs via planning and chained exploration [70.26807758443675]
ExploraCoder is a training-free framework that empowers large language models to invoke unseen APIs in code solution.<n> Experimental results demonstrate that ExploraCoder significantly improves performance for models lacking prior API knowledge.
arXiv Detail & Related papers (2024-12-06T19:00:15Z) - ToolACE: Winning the Points of LLM Function Calling [139.07157814653638]
ToolACE is an automatic agentic pipeline designed to generate accurate, complex, and diverse tool-learning data.<n>We demonstrate that models trained on our synthesized data, even with only 8B parameters, achieve state-of-the-art performance on the Berkeley Function-Calling Leaderboard.
arXiv Detail & Related papers (2024-09-02T03:19:56Z) - Continual Learning From a Stream of APIs [90.41825351073908]
Continual learning (CL) aims to learn new tasks without forgetting previous tasks.
Existing CL methods require a large amount of raw data, which is often unavailable due to copyright considerations and privacy risks.
This paper considers two practical-yet-novel CL settings: data-efficient CL (DECL-APIs) and data-free CL (DFCL-APIs)
arXiv Detail & Related papers (2023-08-31T11:16:00Z)
This list is automatically generated from the titles and abstracts of the papers in this site.
This site does not guarantee the quality of this site (including all information) and is not responsible for any consequences.