Skip to content
Agentmart
Submit a tool

CLAUDE.md · anyproto/anytype-mcp

CLAUDE.md from anyproto/anytype-mcp: 81 lines covering Common Commands, Architecture Overview, Testing Strategy, Code Style.

Template by anyproto

IndexedMIT★ 537
Write a review

Chalk Labs

Need help deploying CLAUDE.md · anyproto/anytype-mcp?

Chalk Labs sets up agents like this inside real teams: connected to your tools, tested on your data, with a human in the loop where it matters.

Book a call

Install

Works with Claude Code. Read the repository before you give any tool access to your data.

curl -fsSL https://raw.githubusercontent.com/anyproto/anytype-mcp/main/CLAUDE.md -o CLAUDE.md

Read it and adapt it to your project before use.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

The CLAUDE.md file that anyproto/anytype-mcp (537 stars) keeps for coding agents. It has 81 lines in 4 sections: Common Commands; Architecture Overview; Testing Strategy; Code Style. Use it as a model for your own project's instructions.

Use cases: code-generation, note-taking

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

What's in it

A CLAUDE.md file: project memory Claude Code loads at the start of every session.

For
Claude Code
Length
81 lines
File
CLAUDE.md

Sections

  1. Common Commands
  2. Architecture Overview
  3. Testing Strategy
  4. Code Style

First lines (shown under the repo's MIT license)

# CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

## Common Commands

This project uses [Bun](https://bun.com) as its package manager and script runner (lockfile: `bun.lock`). The published artifact still targets Node.js.

### Development
- `bun install` - Install all dependencies including devDependencies
- `bun run dev` - Start the development server with file watching (uses tsx watch)
- `bun run build` - Build the TypeScript project and generate CLI binary (bin/cli.mjs)

### Testing
- `bun run test` - Run all tests once with Vitest
- `bun run test:dev` - Run tests in watch mode
- Run a specific test file: `bunx vitest run src/openapi/__tests__/parser.test.ts`

### Code Quality
- `bun run lint` - Check code formatting with ESLint
- `bun run lint:fix` - Auto-fix formatting issues with ESLint
- `bun run format` - Auto-fix formatting issues with Prettier
- `bun run typecheck` - Run TypeScript type checking without emitting files

### Utility Scripts
- `bun run parse-openapi` - Parse OpenAPI specification

## Architecture Overview

This is an MCP (Model Context Protocol) server that bridges Anytype's API with AI assistants. The architecture follows a proxy pattern where OpenAPI specifications are dynamically converted to MCP tools.

### Core Components

**MCP Proxy Layer (`src/mcp/proxy.ts`)**
- Central orchestrator that implements the MCP server protocol
- Converts OpenAPI operations to MCP tools dynamically at runtime
- Handles tool listing and execution through the MCP protocol
- Maintains a lookup table mapping MCP tool names to OpenAPI operations

**OpenAPI Parser (`src/openapi/parser.ts`)**
- Converts OpenAPI schemas to JSON Schema format for MCP compatibility
- Handles $ref resolution with cycle detection
- Supports multipart/form-data for file uploads
- Generates MCP tool definitions from OpenAPI paths and operations

**HTTP Client (`src/client/http-client.ts`)**
- Built on openapi-client-axios for OpenAPI-aware HTTP requests
- Handles authentication headers from environment variables
- Supports file uploads via FormData
- Executes OpenAPI operations with proper parameter mapping

**Server Initialization (`src/init-server.ts`)**
- Loads OpenAPI spec from URL (default: local Anytype API) or file
- Initializes the MCP proxy with the spec
- Connects to stdio transport for communication

### Key Design Patterns

1. **Dynamic Tool Generation**: Tools are not hardcoded but generated from the OpenAPI spec at runtime, making the server adaptable to API changes.

2. **Header Injection**: Authentication and version headers are parsed from `OPENAPI_MCP_HEADERS` environment variable and injected into all requests.

3. **Operation Mapping**: Each OpenAPI operation becomes an MCP tool with a naming convention: `{tag}-{operationId}`.

4. **Schema Caching**: The parser maintains a cache of resolved schemas to handle circular references and improve performance.

## Testing Strategy

Tests use Vitest and are colocated with source files in `__tests__` directories. Key test areas:
- OpenAPI to MCP conversion logic
- HTTP client behavior including file uploads
- MCP proxy tool execution
- Multipart form data handling

## Code Style

- Prettier with 120 character line width
- Double quotes for strings
- Automatic import organization via prettier-plugin-organize-imports
- TypeScript strict mode enabled

Signals

Stars
537
Forks
62
Open issues
19
Contributors
7
Last commit (this folder)
Jul 27, 2026 (3 months ago)
Last release
Sep 19, 2026 (1 month ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from anyproto

Done for you

Rather not set it up yourself?

Chalk Labs scopes, builds and runs agents for your team: the task audit, the eval harness, the integrations and the weekly ops report. Fixed scope, priced before we start.

See how we build AI agents →Read the case studies

Chalk Labs is a two-founder AI and growth studio. We build AI agents, CRMs and MVPs for Web3 and AI companies, and have shipped 50+ product and token launches.

launches shipped
50+
launches shipped
media placements
500+
media placements
founders on every account
2
founders on every account

Press we've placed: Forbes · CoinDesk · Decrypt · Cointelegraph · The Block

Rahil Jain, Co-founder, Chalk Labs. Ex-Goldman Sachs engineer. You talk to the person who builds it.

Get CLAUDE.md · anyproto/anytype-mcp running in your business

Tell us what you want to automate. A founder replies within one working day with a plan, not a pitch deck.

Goes to the Chalk Labs founders, not the newsletter. Privacy

Need help deploying CLAUDE.md · anyproto/anytype-mcp?

CallGet help
Cite this page

CLAUDE.md · anyproto/anytype-mcp. Agent Mart. https://agentmart.dev/templates/anyproto-anytype-mcp-claude-md (last updated 2026-10-24)