background image

MCP server

Let Claude, VS Code and other AI assistants work with your projects through the Model Context Protocol.

MCP server

Introduction

The StellarDS MCP server lets AI assistants such as Claude, VS Code's Copilot Chat or any other Model Context Protocol client work with your Stellar DataStore projects. Ask the assistant to list your tables, add a field, import some records or tidy up a table, and it calls the Stellar DataStore API for you.

There are two ways to connect:

Hosted server Local server
Address https://stellards.io/mcp a program on your own PC
How the assistant signs in each person signs in with their own account (OAuth) with an API key on the command line
What you set up an MCP client OAuth application a download and an API key
Works on any system, and cloud assistants such as claude.ai Windows 10 or later (64-bit)

Use the hosted server unless your assistant can only start local programs.

What the assistant can do

The server offers these tools. Each one calls the matching endpoint of the API, so the role of your OAuth application or API key decides which ones succeed.

Area Tools
Projects GetProjects, UpdateProject
Tables GetTables, CreateTable, UpdateTable, DeleteTable
Fields GetFields, CreateField, UpdateField, DeleteField
Records GetTableData, CreateRecords, UpdateRecords, DeleteRecord, DeleteRecords, ClearTable

An assistant can delete tables, fields and records just as you can. Give it a role that only allows what you want it to do, for example a role that can read and add records but not delete them. Most clients also ask before they run a tool; keep that switched on for tools that change data.

Hosted server

The hosted server is at https://stellards.io/mcp. It holds no key of its own: when you connect, your assistant sends you to Stellar DataStore to sign in, and every tool call then runs with your account, limited to the role of your OAuth application. The sign-in follows the MCP authorization specification; how it works is described in OAuth.

1. Create an MCP client application

  1. In the Stellar DataStore application, open Applications & API keys, go to the OAuth applications tab and click Add application.
  2. Choose MCP client (OAuth 2.1) as the application type.
  3. Enter the redirect URLs of the assistants you will use (see Connect an assistant below). Separate several with ;.
  4. Pick the role the assistant may use, and create the application.
  5. Copy the client ID. You get a client secret too, but MCP clients don't need it.

The application decides the project the assistant works on. You can share one application with your team, or make one per assistant so you can give them different roles.

2. Connect an assistant

Every assistant needs the server address https://stellards.io/mcp and the client ID of your MCP client application, and its redirect URL must be registered on that application.

Claude Code

claude mcp add --transport http stellards https://stellards.io/mcp --client-id YOUR_CLIENT_ID --callback-port 8765

Register http://localhost:8765/callback on the application. Then run /mcp in Claude Code, pick stellards and choose Authenticate: your browser opens the Stellar DataStore sign-in page, and Claude Code is connected once you have signed in. Add --scope user to use the server in every project.

Claude (claude.ai and Claude Desktop)

  1. Register https://claude.ai/api/mcp/auth_callback on the application.
  2. In Claude, open Settings → Connectors and add a custom connector with the address https://stellards.io/mcp.
  3. Under Advanced settings, enter the client ID.
  4. Click Connect and sign in to Stellar DataStore.

MCP Inspector

MCP Inspector shows the tools and lets you call them by hand:

npx @modelcontextprotocol/inspector

Choose Streamable HTTP, enter https://stellards.io/mcp, and enter the client ID under the authentication settings. Register http://localhost:6274/oauth/callback on the application, and http://localhost:6274/oauth/callback/debug for the step-by-step OAuth view.

Other clients

Any MCP client that supports OAuth and lets you enter a client ID works. Stellar DataStore doesn't offer dynamic client registration, so a client that can only register itself can't connect. Register the redirect URL the client uses; for a http://localhost or http://127.0.0.1 URL the port doesn't have to match, but the path does.

Who can do what

  • Each person signs in with their own Stellar DataStore account; tool calls run as that person.
  • The application's role decides what the assistant can do, so pick it as carefully as for any other OAuth application.
  • In multi-tenant tables, the assistant sees the rows of the person who signed in.
  • The assistant's access token lasts 30 minutes and is renewed with a refresh token, which lasts 30 days. When that runs out, sign in again.
  • Deleting the application in the console signs everyone out of it. A token that was already accepted keeps working for at most a minute.

Local server

The local server is a Windows program your assistant starts itself. It uses an API key instead of a sign-in, so it suits assistants that can only start local programs.

1. Download the server

Download the server from the Libraries page and save it somewhere permanent, for example C:\Tools\StellarDS\StellarDS_MCP_Server.exe. It needs Windows 10 or later (64-bit) and nothing else.

2. Create an API key

  1. In the Stellar DataStore application, open Applications & API keys and go to the API keys tab.
  2. Add a key. Give it a name such as Claude, a lifetime and the role the assistant may use.
  3. Copy the key straight away; it is shown only once.

The key gives the assistant the same access as the role, for as long as the key is valid. Delete the key in the console to cut the assistant off.

3. Add the server to your assistant

The assistant starts the exe with -key and talks to it over standard input and output. Use the full path to the exe.

Claude Desktop

Open Settings → Developer → Edit Config and add the server to claude_desktop_config.json:

{
  "mcpServers": {
    "stellards": {
      "command": "C:\\Tools\\StellarDS\\StellarDS_MCP_Server.exe",
      "args": ["-key", "YOUR_API_KEY"]
    }
  }
}

Restart Claude Desktop. The StellarDS tools appear under the tools button in the message box.

Claude Code

claude mcp add stellards -- "C:\Tools\StellarDS\StellarDS_MCP_Server.exe" -key YOUR_API_KEY

Add --scope user to use it in every project. Run /mcp in Claude Code to check that it is connected.

VS Code

Add the server to .vscode/mcp.json in your workspace, or run MCP: Add Server from the command palette:

{
  "servers": {
    "stellards": {
      "type": "stdio",
      "command": "C:\\Tools\\StellarDS\\StellarDS_MCP_Server.exe",
      "args": ["-key", "${input:stellardsKey}"]
    }
  },
  "inputs": [
    { "id": "stellardsKey", "type": "promptString", "description": "Stellar DataStore API key", "password": true }
  ]
}

VS Code asks for the key the first time it starts the server and keeps it out of the file.

Other clients

Any MCP client that can start a local server works the same way: the command is the path to the exe, the arguments are -key YOUR_API_KEY.

Options

Option Meaning
-key <key> Your API key. Required; without it the server stops straight away. -apikey works too.
-api <url> The API to use. Default https://api.stellards.io; leave it out.

The API key sits in your client's configuration file, so keep that file to yourself and don't commit it to source control.

Troubleshooting

Problem What to check
Sign-in says the redirect URL is not allowed The client's redirect URL isn't registered on the application exactly as the client sends it, path included.
Sign-in fails on an application that works for a website Only MCP client applications accept MCP sign-ins without the secret. Create an MCP client application, or edit the existing one and change its type.
The client asks for a client ID, or says registration isn't supported Enter the client ID of your MCP client application. Clients that can only register themselves can't connect.
Tool calls are refused after signing in The application's role lacks the permission. Change the role on the application, or pick another one.
The local server's tools don't show up The path to the exe is complete and the API key is passed after -key. Start the exe yourself with the same arguments: it should wait silently for input; stop it with Ctrl+C.
Every local tool call says unauthorized The API key has expired or was deleted, or its role lacks the permission. Create a new key.