codaveri-mcp-server

satviksinha/codaveri-mcp-server

3.1

If you are the rightful owner of codaveri-mcp-server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to dayong@mcphub.com.

The Codaveri MCP Server is a Model-Context-Protocol server designed to execute code snippets in various programming languages through the Codaveri API.

Tools
1
Resources
0
Prompts
0

Codaveri MCP Server

This is a Model-Context-Protocol (MCP) server for the Codaveri API, allowing you to execute code in various languages.

Installation

  1. Clone the repository:

    git clone https://github.com/satviksinha/codaveri-mcp-server.git
    
  2. Install the dependencies:

    npm install
    

Configuration

  1. Create a .env.development.local file in the root of the project.
  2. Add your Codaveri API key to the file:
    API_KEY=<your_codaveri_api_key>
    CODAVERI_API_BASE_URL=<codaveri-url>
    

Using this MCP server from any repo

When you run the codaveri MCP server from another repository (your client repo or any working directory), it looks for environment variables in a .env.development.local file in the current working directory.

  • Create a .env.development.local file in that repo as well, with the same variables:
API_KEY=your_codaveri_api_key
CODAVERI_API_BASE_URL=https://staging.codaveri.com

Notes:

  • The file must be placed in the repo where you execute the codaveri command (because dotenv loads from the current working directory).
  • Alternatively, you can export these variables in your shell environment instead of using the file.

Building the Server

To build the server, run the following command:

npm run build

This will compile the TypeScript code into JavaScript and place it in the build directory.

Running the Server

You can run the server locally using npm link:

  1. Link the package to make the codaveri command available globally:

    npm link
    
  2. Now you can run the server by simply typing codaveri in your terminal.

Client Integration

To use this server in an MCP client, you need to configure the client to connect to the codaveri command.

Here is an example of how you might configure your MCP client:

{
  "mcpServers": {
    "codaveri": {
      "command": "codaveri"
    }
  }
}

executeCode Tool

This server provides a single tool, executeCode.

Description

Executes a given code snippet in a specified language and returns the output.

Parameters

  • code (string, required): The code to be executed.
  • language (string, required): The programming language of the code. Supported languages are:
    • python
    • javascript
    • java
    • c
    • cpp
    • typescript
    • go
    • rust
    • csharp

Example Usage in an MCP Client

executeCode(code="print('Hello, world!')", language="python")

Example Output

The tool will return the standard output of the executed code.

{
  "content": [
    {
      "type": "text",
      "text": "Hello, world!\\n"
    }
  ]
}