Skip to main content
Glama

Kiota MCP Server

MCP server that exposes all Kiota CLI commands as MCP tools for API client generation.

Overview

The Kiota MCP Server provides a Model Context Protocol interface to the Kiota CLI, enabling AI assistants and MCP clients to:

  • ๐Ÿ” Search for API descriptions

  • โฌ‡๏ธ Download OpenAPI specifications

  • โš™๏ธ Manage client configurations (add, edit, remove)

  • ๐Ÿš€ Generate type-safe API client code with automatic dependency detection

  • โ„น๏ธ Query language support and dependency information

Related MCP server: mcp-cli-catalog

Prerequisites

Before using the Kiota MCP Server, ensure you have:

  • Node.js v20 LTS or higher

  • MCP-compatible client (e.g., Claude Desktop, MCP Inspector)

Note: Kiota CLI is bundled as a dependency and will be installed automatically. No separate installation required.

Installation

npm install kiota-mcp

Usage

As MCP Server

Configure in your MCP client settings (e.g., Claude Desktop):

{
  "mcpServers": {
    "kiota": {
      "command": "npx",
      "args": ["kiota-mcp"]
    }
  }
}

Available Tools

The server exposes 7 MCP tools corresponding to Kiota CLI commands:

  1. kiota_search - Search for API descriptions

  2. kiota_download - Download OpenAPI specifications

  3. kiota_client_add - Add new client configuration

  4. kiota_client_edit - Update existing client configuration

  5. kiota_client_generate - Generate API client code (with automatic --ebc flag)

  6. kiota_client_remove - Remove client configuration

  7. kiota_info - Query language support and dependencies

Quick Start

1. Search for an API

{
  "tool": "kiota_search",
  "params": {
    "searchTerm": "GitHub"
  }
}

2. Download OpenAPI Specification

{
  "tool": "kiota_download",
  "params": {
    "openApiUrl": "https://api.github.com/openapi.json",
    "outputPath": "./github-api-spec.json"
  }
}

3. Add Client Configuration

{
  "tool": "kiota_client_add",
  "params": {
    "clientName": "github-api",
    "openApiPath": "./github-api-spec.json",
    "language": "typescript",
    "outputPath": "./generated/github"
  }
}

4. Generate Client Code

{
  "tool": "kiota_client_generate",
  "params": {
    "clientName": "github-api"
  }
}

The tool automatically:

  • Uses --ebc flag for error-based cancellation

  • Runs kiota info to determine required dependencies

  • Returns installation commands for dependencies

OpenAPI Requirements

The Kiota MCP Server works with:

  • โœ… OpenAPI 3.0.x and 3.1.x specifications

  • โœ… JSON and YAML formats

  • โœ… Local file paths or HTTPS URLs

  • โš ๏ธ Maximum file size: 10MB

Supported Languages

  • TypeScript

  • JavaScript

  • C#

  • Java

  • Python

  • Go

  • PHP

  • Ruby

  • Swift

Query available languages with:

{
  "tool": "kiota_info",
  "params": {}
}

Environment

The server automatically sets KIOTA_CONFIG_PREVIEW=true for all Kiota CLI operations, enabling preview features.

Development

Build

npm run build

Test

# Run all tests
npm test

# Watch mode (TDD)
npm run test:watch

# Coverage report
npm run test:coverage

Lint

npm run lint
npm run lint:fix

Documentation

Architecture

  • TypeScript 5.7+ with strict mode

  • Vitest for testing (TDD workflow)

  • MCP SDK for protocol implementation

  • Kiota CLI delegation (no reimplementation)

License

MIT

Contributing

See CONTRIBUTING.md for development guidelines.

Constitution

This project follows strict development principles documented in .specify/memory/constitution.md:

  • ๐ŸŽฏ OpenAPI-First Architecture

  • ๐Ÿ“˜ TypeScript & Modern Tooling

  • ๐Ÿงช Test-Driven Development (TDD) - NON-NEGOTIABLE

  • ๐Ÿ“š Documentation Excellence

  • ๐Ÿ‘ค User-Provided Specifications

  • ๐Ÿ’ป Local MVP Server

Available Tools

7 tools
kiota_client_addB

Add a new API client configuration to the workspace. Creates an entry in kiota-config.json.

ParametersJSON Schema
NameRequiredDescriptionDefault
languageYesTarget programming language for the generated client
namespaceNoOptional: Namespace or package name for generated code
clientNameYesUnique name for this API client (e.g., 'github', 'stripe-api')
outputPathNoOptional: Directory where generated code will be placed (default: './output/<clientName>')
openApiPathYesPath to the OpenAPI specification file (local path or HTTPS URL)
includeAdditionalDataNoOptional: Include additional data in generated models (default: true)

TDQS

B3.2/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are present, so the description must fully disclose behavior. It states that it creates an entry in kiota-config.json, but it does not address side effects like overwriting existing entries, whether the config file must already exist, validation of the OpenAPI path, or any permissions required. This is insufficient for a mutation tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two sentences with no fluff or redundancy. It is front-loaded with the primary action and adds specificity with the configuration file mention, making it appropriately concise.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with 6 parameters, no output schema, and no annotations, this description is too minimal. It fails to explain return values, conflict handling, or how this command integrates with the other kiota commands, leaving significant gaps for the agent.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema provides descriptions for all 6 parameters, achieving 100% coverage. The description adds no additional parameter-level meaning, so the baseline score of 3 is appropriate; the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly identifies the tool's function: adding a new API client configuration and creating an entry in the workspace's kiota-config.json. This specific verb-resource pairing distinguishes it from sibling tools like kiota_client_edit and kiota_client_remove.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no guidance on when to use this tool versus alternatives such as kiota_client_edit or kiota_client_generate. It does not mention prerequisites, exclusions, or what happens if a client with the same name already exists, leaving the agent to infer usage from the tool name alone.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

kiota_client_editA

Update an existing API client configuration in the Kiota workspace. Allows changing language, output path, or other settings without regenerating code.

ParametersJSON Schema
NameRequiredDescriptionDefault
languageNoOptional: Change the target programming language
namespaceNoOptional: Update the namespace or package name
clientNameYesName of the client to edit (must exist in workspace)
outputPathNoOptional: Change the output directory
openApiPathNoOptional: Update the OpenAPI specification path
includeAdditionalDataNoOptional: Update additional data inclusion setting

TDQS

A4/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description must carry the transparency burden. It discloses a key behavioral trait: the tool modifies configuration without regenerating code, which is useful context. Yet it does not elaborate on side effects, validation, or whether changes are persisted immediately, leaving some ambiguity about the update process.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise, consisting of two sentences that immediately identify the tool's purpose and key behavior. It avoids redundant information and front-loads the core action, making it easy for an agent to parse quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a configuration-editing tool with no output schema and no annotations, the description covers the essential purpose and the notable non-behavior of not regenerating code. It could be more complete by explicitly noting that changes only affect configuration and that code generation is a separate step, but it is sufficient for basic selection and invocation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema already provides 100% coverage with descriptions for all six parameters, so the description adds little beyond that. Mentioning 'language, output path, or other settings' maps to the schema but does not introduce new semantic details or clarify usage beyond what the schema already states.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool updates an existing API client configuration in the Kiota workspace, with a specific verb and resource. It also distinguishes itself from sibling tools by noting 'without regenerating code', which sets it apart from kiota_client_generate and implies a focus on configuration changes.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The phrase 'existing API client' indicates it is for modifying an already-created client, contrasting with kiota_client_add for new clients. 'Without regenerating code' suggests it is appropriate when only settings need changing, not for code generation. However, it does not explicitly mention alternatives or when not to use it, so it falls short of full explicitness.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

kiota_client_generateA

Generate API client code from a configured client in the Kiota workspace. Automatically uses --ebc flag for error-based cancellation and runs kiota info to determine required dependencies.

ParametersJSON Schema
NameRequiredDescriptionDefault
clientNameYesName of the client to generate (must be configured via kiota_client_add)
cleanOutputNoOptional: Clean the output directory before generation (default: false)
refreshDescriptionsNoOptional: Refresh the OpenAPI descriptions before generation (default: false)

TDQS

A4/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations exist, so the description must carry the burden of behavior. It adds useful details about automatically using the --ebc flag and running kiota info, which are not in the schema. Yet it does not disclose potential side effects like file overwriting or output location, leaving some behavioral gaps.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences deliver the core function and automatic behaviors without filler or repetition. The front-loaded verb 'Generate' immediately clarifies the action, making the description highly concise.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description covers purpose and key behaviors, but given the absence of an output schema and the side-effectful nature of code generation, it could be more explicit about what the tool produces and any environment requirements. Still sufficient for a basic understanding.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema provides descriptions for all three parameters, giving 100% coverage. The tool description does not add any parameter-specific meaning beyond referencing 'configured client,' so it relies entirely on the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific action: 'Generate API client code from a configured client in the Kiota workspace.' This clearly differentiates it from sibling tools like add/edit/remove/info by focusing on code generation from an existing client.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The phrase 'from a configured client' implies a prerequisite and indicates the tool should be used after client setup. However, it does not explicitly list when not to use the tool or name alternatives, leaving a small gap.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

kiota_client_removeA

Remove an API client configuration from the Kiota workspace. Optionally cleans up generated code files.

ParametersJSON Schema
NameRequiredDescriptionDefault
clientNameYesName of the client to remove
cleanOutputNoOptional: Delete generated code files when removing configuration (default: false)

TDQS

A3.7/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden of behavioral disclosure. It does mention the optional cleanup of generated code files, which is a useful side-effect, but it does not disclose whether the deletion is irreversible, whether it removes configuration files only, or what the success/error response looks like.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single sentence with two clear clauses, front-loaded with the action verb 'Remove.' Every word earns its place; no filler or repetition.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description covers the core purpose and the optional cleanOutput behavior, but for a deletion tool with no output schema and no annotations, it should also mention prerequisites, side-effects beyond code files, or return behavior. The lack of such details leaves it merely adequate.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100% (both parameters have descriptions). The description adds minimal extra meaning beyond the schema; it reinforces that cleanOutput is optional but does not provide additional semantics for clientName. Baseline 3 is appropriate since the schema already documents the parameters.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb 'Remove' and clearly identifies the resource: 'API client configuration from the Kiota workspace.' It also mentions the optional cleanup of generated code files, distinguishing it from sibling tools like kiota_client_edit or kiota_client_add.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies that this tool is used when a client configuration needs to be deleted, but it does not explicitly state when to use it versus alternatives (e.g., kiota_client_edit for modification). No exclusions or alternative recommendations are provided.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

kiota_downloadA

Download an OpenAPI specification from a URL to a local file. Validates the downloaded specification.

ParametersJSON Schema
NameRequiredDescriptionDefault
openApiUrlYesHTTPS URL of the OpenAPI specification to download
outputPathYesLocal path where the specification will be saved
cleanOutputNoOptional: Clean the output directory before downloading (default: false)

TDQS

A3.8/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are present, so the description must carry the behavioral burden. It adds 'Validates the downloaded specification,' which is a non-obvious behavior, but it does not disclose side effects such as file overwriting, the effect of cleanOutput, or failure handling. This is partial disclosure.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two short sentences front-load the core action and add one behavioral detail. No redundant words or irrelevant information, making it highly concise and well-structured.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The tool is simple (3 parameters, no output schema). The description covers the primary action and validation behavior. Combined with the schema's parameter descriptions, it's reasonably complete, though it could mention overwrite behavior or destination directory handling for full completeness.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema already describes all three parameters with 100% coverage, so the description doesn't need to add param details. The description adds no extra parameter semantics beyond the schema, but that's acceptable given the baseline.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states 'Download an OpenAPI specification from a URL to a local file,' providing a specific verb, resource, and destination. This distinguishes it from sibling tools (search, client operations), making its purpose immediately clear.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies the tool is for fetching an OpenAPI spec before client generation, but it does not explicitly state when to use it relative to other tools or any prerequisites. No exclusions or alternative guidance is provided, so it relies on implied usage.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

kiota_infoA

Query information about supported languages, their capabilities, and required dependencies for an API.

ParametersJSON Schema
NameRequiredDescriptionDefault
jsonNoOutput in JSON format
languageNoQuery dependencies for specific language
descriptionPathNoPath to OpenAPI specification

TDQS

A3.7/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. The word 'query' suggests a read-only operation, and the description discloses the scope (languages, capabilities, dependencies), but it does not explain return format, how optional parameters affect results, or any operational behavior like network access or input validation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, well-structured sentence with no filler. It front-loads the action ('Query') and immediately specifies the resource, making it easy to parse.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

This is a simple query tool with no output schema and no annotations. The description is sufficient for a basic understanding, but it omits details about the return structure and how optional parameters alter the response, which could be important for an agent deciding how to invoke and interpret the results.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema descriptions offer 100% coverage, documenting all three parameters (json, language, descriptionPath) with types, defaults, and enums. The description adds slight context by mentioning 'languages' and 'dependencies', which maps to the language parameter, but it does not add significant meaning beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Description uses a specific verb ('Query') and resource ('information about supported languages, their capabilities, and required dependencies for an API'). This clearly distinguishes it from siblings like kiota_search (searching) and kiota_client_* (client lifecycle operations).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage for retrieving language/dependency information but provides no explicit when-to-use guidance or mention of alternatives. No exclusions or prerequisites are stated, so the agent must infer when this tool is appropriate.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

TDQS

A3.7/5.0
Disambiguation5/5

Each tool performs a distinct operation: searching APIs, downloading specs, adding/editing/generating/removing clients, and querying language info. There is no overlap in functionality between tools.

Naming Consistency4/5

Naming consistently uses the 'kiota_' prefix, with a 'client_' sub-namespace for client operations. However, general verbs like 'search', 'download', and 'info' are not preceded by a domain noun, creating a slight inconsistency with the noun-verb pattern used for client tools.

Tool Count5/5

Seven tools is well-scoped for the Kiota workflow, covering all major steps from API discovery to code generation without unnecessary bloat.

Completeness3/5

The set covers search, download, client lifecycle (add/edit/generate/remove), and info, but lacks a way to list existing client configurations. This is a notable gap that could force agents to guess or manipulate config files directly.

Maintenance

ActivityInactive
ResponsivenessSyncing

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/sebastienlevert/kiota-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server