CoinPilot (Aptos DCA) MCP server

Bridges cryptocurrency investment platforms with the Aptos blockchain, enabling automated dollar-cost averaging strategies through tools for creating and managing investment plans, retrieving user data, and accessing liquidity pools.
Back to servers
Setup instructions
Provider
Sparsh
Release date
Mar 24, 2025
Language
TypeScript

This server implements the Model Context Protocol (MCP), a standardized API for interacting with large language models. It provides a unified abstraction layer that supports multiple model providers under a consistent interface, making it easier to switch between models without changing your application code.

Installation

Requirements

  • Go 1.21 or higher
  • Access credentials for at least one of the supported model providers

Install from Source

Clone the repository and build the server:

git clone https://github.com/model-protocol/mcp-server.git
cd mcp-server
go build -o mcp-server

Using Docker

You can also run the server using Docker:

docker run -p 8080:8080 -v /path/to/config.yaml:/config.yaml ghcr.io/model-protocol/mcp-server:latest

Configuration

Create a configuration file config.yaml with your model provider credentials:

listen_addr: ":8080"
providers:
  openai:
    api_key: "sk-..."
    models:
      - name: "gpt-4"
        provider_model_id: "gpt-4"
      - name: "gpt-3.5-turbo"
        provider_model_id: "gpt-3.5-turbo"
  anthropic:
    api_key: "sk-ant-..."
    models:
      - name: "claude-3-opus"
        provider_model_id: "claude-3-opus-20240229"
      - name: "claude-3-sonnet"
        provider_model_id: "claude-3-sonnet-20240229"

Configuration Options

  • listen_addr: The address and port the server will listen on
  • providers: Configuration for each model provider
    • Each provider needs an API key and a list of models
    • Each model needs a name (how clients will refer to it) and a provider_model_id (the ID used by the provider)

Running the Server

Start the server by specifying your configuration file:

./mcp-server -config config.yaml

With Docker:

docker run -p 8080:8080 -v /path/to/config.yaml:/config.yaml ghcr.io/model-protocol/mcp-server:latest

Using the MCP Server

List Available Models

To get a list of available models:

curl http://localhost:8080/models

The response will include all configured models:

{
  "models": [
    {
      "id": "gpt-4",
      "provider": "openai"
    },
    {
      "id": "claude-3-opus",
      "provider": "anthropic"
    }
  ]
}

Chat Completion

To generate a chat completion:

curl -X POST http://localhost:8080/chat/completions \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-4",
    "messages": [
      {"role": "system", "content": "You are a helpful assistant."},
      {"role": "user", "content": "Hello, how are you?"}
    ],
    "temperature": 0.7
  }'

Streaming Completion

To stream the response in real-time:

curl -X POST http://localhost:8080/chat/completions \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-4",
    "messages": [
      {"role": "system", "content": "You are a helpful assistant."},
      {"role": "user", "content": "Write a short poem."}
    ],
    "stream": true
  }'

Using Different Models

To use a different model, simply change the model parameter in your request:

curl -X POST http://localhost:8080/chat/completions \
  -H "Content-Type: application/json" \
  -d '{
    "model": "claude-3-opus",
    "messages": [
      {"role": "user", "content": "Explain quantum computing in simple terms."}
    ]
  }'

Troubleshooting

Common Issues

  • Connection refused: Ensure the server is running and the listen_addr is correctly configured
  • Authentication error: Verify your API keys are correct in the configuration file
  • Model not found: Check that the model name in your request matches one defined in your configuration

How to install this MCP server

For Claude Code

To add this MCP server to Claude Code, run this command in your terminal:

claude mcp add-json "mcp-server" '{"command":"npx","args":["-y","mcp-server"]}'

See the official Claude Code MCP documentation for more details.

For Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

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

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.

For Claude Desktop

To add this MCP server to Claude Desktop:

1. Find your configuration file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json

2. Add this to your configuration file:

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

3. Restart Claude Desktop for the changes to take effect

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later